mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
right color for ProcessOutputTypes.SYSTEM
This commit is contained in:
@@ -85,7 +85,7 @@ public class AnsiEscapeDecoder {
|
||||
}
|
||||
|
||||
private Key getCurrentOutputAttributes(final Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
if (outputType == ProcessOutputTypes.STDERR || outputType == ProcessOutputTypes.SYSTEM) {
|
||||
return outputType;
|
||||
}
|
||||
return myCurrentColor != null ? myCurrentColor : outputType;
|
||||
|
||||
+4
-12
@@ -22,11 +22,9 @@ import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.TextAttributesKey;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Roman Chernyatchik
|
||||
@@ -38,10 +36,6 @@ public class ColoredProcessHandler extends OSProcessHandler implements AnsiEscap
|
||||
return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(key);
|
||||
}
|
||||
|
||||
// Registering
|
||||
// TODO use new Maia API in ConsoleViewContentType to apply ANSI color changes without
|
||||
// restarting RM / Idea + Ruby Plugin
|
||||
|
||||
public ColoredProcessHandler(final GeneralCommandLine commandLine) throws ExecutionException {
|
||||
this(commandLine.createProcess(), commandLine.getCommandLineString(), commandLine.getCharset());
|
||||
}
|
||||
@@ -61,18 +55,16 @@ public class ColoredProcessHandler extends OSProcessHandler implements AnsiEscap
|
||||
}
|
||||
|
||||
public void coloredTextAvailable(String text, Key attributes) {
|
||||
textAvailable(text, attributes);
|
||||
super.notifyTextAvailable(text, attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Inheritors should override coloredTextAvailable method
|
||||
* or implement ColoredChunksAcceptor and override method coloredChunksAvailable to process colored chunks
|
||||
* or implement {@link com.intellij.execution.process.AnsiEscapeDecoder.ColoredChunksAcceptor}
|
||||
* and override method coloredChunksAvailable to process colored chunks.
|
||||
* To be removed in IDEA 14.
|
||||
*/
|
||||
protected void textAvailable(final String text, final Key attributes) {
|
||||
super.notifyTextAvailable(text, attributes);
|
||||
}
|
||||
|
||||
public void processColoredChunks(@NotNull final List<Pair<String, Key>> textChunks) {
|
||||
myAnsiEscapeDecoder.coloredTextAvailable(textChunks, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user