本文整理汇总了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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
}
}
示例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;
}
示例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);
}
}
}
示例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);
}
示例9: value
@Override
public boolean value(ConsoleViewContentType contentType) {
return ConsoleViewContentType.ERROR_OUTPUT == contentType;
}
示例10: getContentType
public static ConsoleViewContentType getContentType(String type) {
if (type.equals(ERROR)) return ConsoleViewContentType.ERROR_OUTPUT;
return ConsoleViewContentType.NORMAL_OUTPUT;
}
示例11: getTypeString
private static String getTypeString(ConsoleViewContentType type) {
return type == ConsoleViewContentType.ERROR_OUTPUT ? "stderr" : "stdout";
}
示例12: detectIPythonImported
public static boolean detectIPythonImported(@NotNull String text, final ConsoleViewContentType outputType) {
return text.contains("PyDev console: using IPython ") && outputType == ConsoleViewContentType.ERROR_OUTPUT;
}
示例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);
}