当前位置: 首页>>代码示例>>Java>>正文


Java ProcessOutputTypes.STDERR属性代码示例

本文整理汇总了Java中com.intellij.execution.process.ProcessOutputTypes.STDERR属性的典型用法代码示例。如果您正苦于以下问题:Java ProcessOutputTypes.STDERR属性的具体用法?Java ProcessOutputTypes.STDERR怎么用?Java ProcessOutputTypes.STDERR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.execution.process.ProcessOutputTypes的用法示例。


在下文中一共展示了ProcessOutputTypes.STDERR属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

@Override
protected void setUp() throws Exception {
  super.setUp();

  mySplitter = new OutputLineSplitter(false) {
    @Override
    protected void onLineAvailable(@NotNull String text, @NotNull Key outputType, boolean tcLikeFakeOutput) {
      if (ProcessOutputTypes.STDERR != outputType && ProcessOutputTypes.SYSTEM != outputType) outputType = ProcessOutputTypes.STDOUT;
      synchronized (myOutput) {
        List<String> list = myOutput.get(outputType);
        if (list == null) {
          myOutput.put(outputType, list = new ArrayList<String>());
        }
        list.add(text);
      }
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:OutputLineSplitterTest.java

示例2: notifyTextAvailable

@Override
public void notifyTextAvailable(String text, Key outputType) {
  super.notifyTextAvailable(text, outputType);
  
  if (StringUtil.isEmptyOrSpaces(text)) {
    return;
  }
  String[] lines = text.split("[\\n\\r]+");
  for (String line : lines) {
    String l = line.toLowerCase();
    if (outputType == ProcessOutputTypes.STDOUT) {
      myInfoMessages.add(line);
    }
    else if (outputType == ProcessOutputTypes.STDERR) {
      if (l.contains(IGNORING) || l.contains(SKIPPING) || l.contains(DEBUGGABLE_ERROR)) {
        myInfoMessages.add(line);
      }
      else {
        myErrorMessages.add(line);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AndroidOSProcessHandler.java

示例3: notifyLine

/**
 * Notify single line
 *
 * @param line       a line to notify
 * @param outputType output type
 */
private void notifyLine(final String line, final Key outputType) {
  String trimmed = LineHandlerHelper.trimLineSeparator(line);
  // if line ends with return, then it is a progress line, ignore it
  if (myVcs != null && !"\r".equals(line.substring(trimmed.length()))) {
    if (outputType == ProcessOutputTypes.STDOUT) {
      if (!isStdoutSuppressed() && !mySilent && !StringUtil.isEmptyOrSpaces(line)) {
        myVcs.showMessages(trimmed);
        LOG.info(line.trim());
      }
      else {
        OUTPUT_LOG.debug(line.trim());
      }
    }
    else if (outputType == ProcessOutputTypes.STDERR && !isStderrSuppressed() && !mySilent && !StringUtil.isEmptyOrSpaces(line)) {
      myVcs.showErrorMessages(trimmed);
      LOG.info(line.trim());
    }
    else {
      LOG.debug(line.trim());
    }
  }
  myLineListeners.getMulticaster().onLineAvailable(trimmed, outputType);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:GitLineHandler.java

示例4: notifyTextAvailable

public void notifyTextAvailable(final String text, final Key outputType) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Received from groovyc " + outputType + ": " + text);
  }

  if (outputType == ProcessOutputTypes.SYSTEM) {
    return;
  }

  if (outputType == ProcessOutputTypes.STDERR && !isSafeStderr(text)) {
    stdErr.append(StringUtil.convertLineSeparators(text));
    return;
  }


  parseOutput(text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GroovycOutputParser.java

示例5: notifyLine

/**
 * Notify single line
 *
 * @param line       a line to notify
 * @param outputType output type
 */
private void notifyLine(final String line, final Key outputType) {
  String trimmed = LineHandlerHelper.trimLineSeparator(line);
  // if line ends with return, then it is a progress line, ignore it
  if (myVcs != null && !"\r".equals(line.substring(trimmed.length()))) {
    if (outputType == ProcessOutputTypes.STDOUT && !isStdoutSuppressed() && !mySilent && !StringUtil.isEmptyOrSpaces(line)) {
      myVcs.showMessages(trimmed);
      LOG.info(line.trim());
    }
    else if (outputType == ProcessOutputTypes.STDERR && !isStderrSuppressed() && !mySilent && !StringUtil.isEmptyOrSpaces(line)) {
      myVcs.showErrorMessages(trimmed);
      LOG.info(line.trim());
    }
    else {
      LOG.debug(line.trim());
    }
  }
  myLineListeners.getMulticaster().onLineAvailable(trimmed, outputType);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:GitLineHandler.java

示例6: notifyTextAvailable

public void notifyTextAvailable(final String text, final Key outputType) {
  super.notifyTextAvailable(text, outputType);

  if (LOG.isDebugEnabled()) {
    LOG.debug("Received from groovyc: " + text);
  }

  if (outputType == ProcessOutputTypes.SYSTEM) {
    return;
  }

  if (outputType == ProcessOutputTypes.STDERR) {
    stdErr.append(StringUtil.convertLineSeparators(text));
    return;
  }


  parseOutput(text);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:GroovycOSProcessHandler.java

示例7: notifyLines

/**
 * Notify listeners for each complete line. Note that in the case of stderr, the last line is
 * saved.
 */
protected void notifyLines(final Key outputType, final Iterable<String> lines) {
  BuckEventsConsumer buckEventsConsumer =
      project.getComponent(BuckModule.class).getBuckEventsConsumer();
  if (outputType == ProcessOutputTypes.STDERR) {
    StringBuilder stderr = new StringBuilder();
    for (String line : lines) {
      // Check if the line has at least one character or digit
      if (CHARACTER_DIGITS_PATTERN.matcher(line).matches()) {
        stderr.append(line);
      }
    }
    if (stderr.length() != 0) {
      buckEventsConsumer.consumeConsoleEvent(stderr.toString());
    }
  }
}
 
开发者ID:facebook,项目名称:buck,代码行数:20,代码来源:BuckCommandHandler.java

示例8: setUp

@Override
protected void setUp() throws Exception {
  super.setUp();

  mySplitter = new OutputLineSplitter(false) {
    @Override
    protected void onLineAvailable(@Nonnull String text, @Nonnull Key outputType, boolean tcLikeFakeOutput) {
      if (ProcessOutputTypes.STDERR != outputType && ProcessOutputTypes.SYSTEM != outputType) outputType = ProcessOutputTypes.STDOUT;
      synchronized (myOutput) {
        List<String> list = myOutput.get(outputType);
        if (list == null) {
          myOutput.put(outputType, list = new ArrayList<String>());
        }
        list.add(text);
      }
    }
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:OutputLineSplitterTest.java

示例9: onTextAvailable

@Override
public void onTextAvailable(ProcessEvent event, Key outputType) {
  if (outputType == ProcessOutputTypes.STDERR) {
    err.append(event.getText());
  }
  else if (outputType == ProcessOutputTypes.SYSTEM) {
    // skip
  }
  else {
    out.append(event.getText());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:OutputListener.java

示例10: processLine

@Override
@NotNull
public MyProcessingResult processLine(String line) {
  final String type = LogConsolePreferences.getType(line);
  Key contentType = type != null
                    ? LogConsolePreferences.getProcessOutputTypes(type)
                    : (LogConsolePreferences.ERROR.equals(myPrevType) ? ProcessOutputTypes.STDERR : ProcessOutputTypes.STDOUT);
  if (type != null) {
    myPrevType = type;
  }
  final boolean applicable = isApplicable(line);
  return new MyProcessingResult(contentType, applicable, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:DefaultLogFilterModel.java

示例11: outputTypeForAttributes

public ConsoleViewContentType outputTypeForAttributes(Key attributes) {
  final ConsoleViewContentType outputType;
  if (attributes == ProcessOutputTypes.STDERR) {
    outputType = ConsoleViewContentType.ERROR_OUTPUT;
  }
  else if (attributes == ProcessOutputTypes.SYSTEM) {
    outputType = ConsoleViewContentType.SYSTEM_OUTPUT;
  }
  else {
    outputType = ConsoleViewContentType.getConsoleViewType(attributes);
  }

  return outputType;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:PythonConsoleView.java

示例12: onTextAvailable

protected void onTextAvailable(final String text, final Key outputType) {
  Iterator<String> lines = LineHandlerHelper.splitText(text).iterator();
  if (ProcessOutputTypes.STDOUT == outputType) {
    notifyLines(outputType, lines, myStdoutLine);
  }
  else if (ProcessOutputTypes.STDERR == outputType) {
    notifyLines(outputType, lines, myStderrLine);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:GitLineHandler.java

示例13: resolveOutputType

@NotNull
protected Key resolveOutputType(@NotNull String line, @NotNull Key outputType) {
  Key result = outputType;

  if (!ProcessOutputTypes.SYSTEM.equals(outputType)) {
    Matcher errorMatcher = SvnUtil.ERROR_PATTERN.matcher(line);
    Matcher warningMatcher = SvnUtil.WARNING_PATTERN.matcher(line);

    result = errorMatcher.find() || warningMatcher.find() ? ProcessOutputTypes.STDERR : ProcessOutputTypes.STDOUT;
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TerminalProcessHandler.java

示例14: onTextAvailable

private void onTextAvailable(final String text, final Key outputType) {
  Iterator<String> lines = LineHandlerHelper.splitText(text).iterator();
  if (ProcessOutputTypes.STDOUT == outputType) {
    notifyLines(outputType, lines, myStdoutLine);
  }
  else if (ProcessOutputTypes.STDERR == outputType) {
    notifyLines(outputType, lines, myStderrLine);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ResultBuilderNotifier.java

示例15: notifyTextAvailable

@Override
public void notifyTextAvailable(String text, Key outputType) {
  text = StringUtil.convertLineSeparators(text);
  if (LOG.isDebugEnabled()) {
    LOG.debug(outputType + text);
  }
  if (outputType == ProcessOutputTypes.STDOUT) {
    myStdOut.append(text);
  }
  else if (outputType == ProcessOutputTypes.STDERR) {
    myStdErr.append(text);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:GrabDependencies.java


注:本文中的com.intellij.execution.process.ProcessOutputTypes.STDERR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。