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


Java ConsoleViewContentType.ERROR_OUTPUT属性代码示例

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


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

示例1: doPrint

protected void doPrint(String text, OutputType type) {
  ensureAttachedToToolWindow();

  ConsoleViewContentType contentType;
  switch (type) {
    case SYSTEM:
      contentType = ConsoleViewContentType.SYSTEM_OUTPUT;
      break;
    case ERROR:
      contentType = ConsoleViewContentType.ERROR_OUTPUT;
      break;
    case NORMAL:
    default:
      contentType = ConsoleViewContentType.NORMAL_OUTPUT;
  }
  myConsoleView.print(text, contentType);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:MavenConsoleImpl.java

示例2: print

private void print(String text, ConsoleViewContentType contentType) {
  consoleStream.print(text, contentType);
  consoleStream.print("\n", contentType);

  if (activated) {
    return;
  }
  boolean activate =
      popupBehavior == BlazeConsolePopupBehavior.ALWAYS
          || (popupBehavior == BlazeConsolePopupBehavior.ON_ERROR
              && contentType == ConsoleViewContentType.ERROR_OUTPUT);
  if (activate) {
    activated = true;
    ApplicationManager.getApplication().invokeLater(blazeConsoleService::activateConsoleWindow);
  }
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:16,代码来源:BlazeConsoleScope.java

示例3: print

@Override
public void print(String s, ConsoleViewContentType contentType) {
  myHasPrinted = true;
  myAllOut.append(s);
  if (contentType == ConsoleViewContentType.NORMAL_OUTPUT) {
    myStdOut.append(s);
  }
  else if (contentType == ConsoleViewContentType.ERROR_OUTPUT) {
    myStdErr.append(s);
  }
  else if (contentType == ConsoleViewContentType.SYSTEM_OUTPUT) {
    myStdSys.append(s);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:MockPrinter.java

示例4: writeToConsole

private void writeToConsole(PyIo io) {
  ConsoleViewContentType contentType;
  if (io.getCtx() == 2) {
    contentType = ConsoleViewContentType.ERROR_OUTPUT;
  }
  else {
    contentType = ConsoleViewContentType.NORMAL_OUTPUT;
  }
  myDebugProcess.printToConsole(io.getText(), contentType);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:RemoteDebugger.java

示例5: print

@Override
public void print(@NotNull String text, @NotNull final ConsoleViewContentType outputType) {
  detectIPython(text, outputType);
  if (PyConsoleUtil.detectIPythonEnd(text)) {
    myIsIPythonOutput = false;
    mySourceHighlighter = null;
  }
  else if (PyConsoleUtil.detectIPythonStart(text)) {
    myIsIPythonOutput = true;
  }
  else {
    if (mySourceHighlighter == null || outputType == ConsoleViewContentType.ERROR_OUTPUT) {
      if (myHyperlink) {
        printHyperlink(text, outputType);
      }
      else {
        //Print text normally with converted attributes
        super.print(text, outputType);
      }
      myHyperlink = detectHyperlink(text);
      if (mySourceHighlighter == null && myIsIPythonOutput && PyConsoleUtil.detectSourcePrinting(text)) {
        mySourceHighlighter = new PyConsoleSourceHighlighter(this, myScheme, myPyHighlighter);
      }
    }
    else {
      try {
        mySourceHighlighter.printHighlightedSource(text);
      }
      catch (Exception e) {
        LOG.error(e);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:PythonConsoleView.java

示例6: 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

示例7: print

@SuppressWarnings("UseOfSystemOutOrSystemErr")
public void print(String message, ConsoleViewContentType contentType) {
  if (myProgressStep != null) {
    myProgressStep.print(message, contentType);
  }
  else {
    if (contentType == ConsoleViewContentType.ERROR_OUTPUT) {
      System.err.println(message);
    }
    else {
      System.out.println(message);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:InstallContext.java

示例8: print

@Override
public void print(String text, ConsoleViewContentType contentType) {
  Key<?> key =
      contentType == ConsoleViewContentType.ERROR_OUTPUT
          ? ProcessOutputTypes.STDERR
          : ProcessOutputTypes.STDOUT;
  ansiEscapeDecoder.escapeText(text, key, this);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:8,代码来源:ColoredConsoleStream.java

示例9: value

@Override
public boolean value(ConsoleViewContentType contentType) {
  return ConsoleViewContentType.ERROR_OUTPUT == contentType;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TestProxyPrinterProvider.java

示例10: getContentType

public static ConsoleViewContentType getContentType(String type) {
  if (type.equals(ERROR)) return ConsoleViewContentType.ERROR_OUTPUT;
  return ConsoleViewContentType.NORMAL_OUTPUT;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:LogConsolePreferences.java

示例11: getTypeString

private static String getTypeString(ConsoleViewContentType type) {
  return type == ConsoleViewContentType.ERROR_OUTPUT ? "stderr" : "stdout";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:TestResultsXmlFormatter.java

示例12: detectIPythonImported

public static boolean detectIPythonImported(@NotNull String text, final ConsoleViewContentType outputType) {
  return text.contains("PyDev console: using IPython ") && outputType == ConsoleViewContentType.ERROR_OUTPUT;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:PyConsoleUtil.java

示例13: onOutput

public void onOutput(String text, ConsoleViewContentType contentType) {
  if (text.length() == 0) return;
  if (myLastPacketIndex != -1) return;
  if (contentType == ConsoleViewContentType.ERROR_OUTPUT) readErrorOutput(text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:OutputParser2.java


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