diff --git a/colorSchemes/src/colorSchemes/Darcula.xml b/colorSchemes/src/colorSchemes/Darcula.xml
index f0ad4bea70f2..e09b23cc4190 100644
--- a/colorSchemes/src/colorSchemes/Darcula.xml
+++ b/colorSchemes/src/colorSchemes/Darcula.xml
@@ -157,26 +157,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -192,11 +232,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/ANSIColoredConsoleColorsPage.java b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/ANSIColoredConsoleColorsPage.java
index af7e2b9df5b7..3b3ebf3103c9 100644
--- a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/ANSIColoredConsoleColorsPage.java
+++ b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/ANSIColoredConsoleColorsPage.java
@@ -35,6 +35,7 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
"An expired log entry\n" +
"\n" +
"# Process output highlighted using ANSI colors codes\n" +
+ "ANSI: black\n" +
"ANSI: red\n" +
"ANSI: green\n" +
"ANSI: yellow\n" +
@@ -42,6 +43,14 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
"ANSI: magenta\n" +
"ANSI: cyan\n" +
"ANSI: gray\n" +
+ "ANSI: dark gray\n" +
+ "ANSI: bright red\n" +
+ "ANSI: bright green\n" +
+ "ANSI: bright yellow\n" +
+ "ANSI: bright blue\n" +
+ "ANSI: bright magenta\n" +
+ "ANSI: bright cyan\n" +
+ "ANSI: white\n" +
"\n" +
"Process finished with exit code 1\n";
@@ -55,6 +64,7 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.console.warning"), ConsoleViewContentType.LOG_WARNING_OUTPUT_KEY),
new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.console.expired"), ConsoleViewContentType.LOG_EXPIRED_ENTRY),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.black"), ConsoleHighlighter.BLACK),
new AttributesDescriptor(OptionsBundle.message("color.settings.console.red"), ConsoleHighlighter.RED),
new AttributesDescriptor(OptionsBundle.message("color.settings.console.green"), ConsoleHighlighter.GREEN),
new AttributesDescriptor(OptionsBundle.message("color.settings.console.yellow"), ConsoleHighlighter.YELLOW),
@@ -62,6 +72,15 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
new AttributesDescriptor(OptionsBundle.message("color.settings.console.magenta"), ConsoleHighlighter.MAGENTA),
new AttributesDescriptor(OptionsBundle.message("color.settings.console.cyan"), ConsoleHighlighter.CYAN),
new AttributesDescriptor(OptionsBundle.message("color.settings.console.gray"), ConsoleHighlighter.GRAY),
+
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.darkGray"), ConsoleHighlighter.DARKGRAY),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.redBright"), ConsoleHighlighter.RED_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.greenBright"), ConsoleHighlighter.GREEN_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.yellowBright"), ConsoleHighlighter.YELLOW_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.blueBright"), ConsoleHighlighter.BLUE_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.magentaBright"), ConsoleHighlighter.MAGENTA_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.cyanBright"), ConsoleHighlighter.CYAN_BRIGHT),
+ new AttributesDescriptor(OptionsBundle.message("color.settings.console.white"), ConsoleHighlighter.WHITE),
};
private static final Map ADDITIONAL_HIGHLIGHT_DESCRIPTORS = new HashMap();
@@ -74,6 +93,7 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("logWarning", ConsoleViewContentType.LOG_WARNING_OUTPUT_KEY);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("logExpired", ConsoleViewContentType.LOG_EXPIRED_ENTRY);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("black", ConsoleHighlighter.BLACK);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("red", ConsoleHighlighter.RED);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("green", ConsoleHighlighter.GREEN);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("yellow", ConsoleHighlighter.YELLOW);
@@ -81,6 +101,15 @@ public class ANSIColoredConsoleColorsPage implements ColorSettingsPage, DisplayP
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("magenta", ConsoleHighlighter.MAGENTA);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("cyan", ConsoleHighlighter.CYAN);
ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("gray", ConsoleHighlighter.GRAY);
+
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("darkGray", ConsoleHighlighter.DARKGRAY);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("redBright", ConsoleHighlighter.RED_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("greenBright", ConsoleHighlighter.GREEN_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("yellowBright", ConsoleHighlighter.YELLOW_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("blueBright", ConsoleHighlighter.BLUE_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("magentaBright", ConsoleHighlighter.MAGENTA_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("cyanBright", ConsoleHighlighter.CYAN_BRIGHT);
+ ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("white", ConsoleHighlighter.WHITE);
}
private static final ColorDescriptor[] COLORS = {
diff --git a/platform/platform-api/src/com/intellij/execution/process/ColoredOutputTypeRegistry.java b/platform/platform-api/src/com/intellij/execution/process/ColoredOutputTypeRegistry.java
index c66a9503bd1f..7fff03827fb4 100644
--- a/platform/platform-api/src/com/intellij/execution/process/ColoredOutputTypeRegistry.java
+++ b/platform/platform-api/src/com/intellij/execution/process/ColoredOutputTypeRegistry.java
@@ -7,7 +7,6 @@ import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.markup.EffectType;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.util.Key;
-import com.intellij.ui.JBColor;
import org.jetbrains.annotations.NonNls;
import java.awt.*;
@@ -24,10 +23,24 @@ public class ColoredOutputTypeRegistry {
private final Map myRegisteredKeys = new HashMap();
- private static final TextAttributesKey[] myAnsiColorKeys = new TextAttributesKey[] {
- ConsoleViewContentType.NORMAL_OUTPUT_KEY,
- ConsoleHighlighter.RED, ConsoleHighlighter.GREEN, ConsoleHighlighter.YELLOW, ConsoleHighlighter.BLUE,
- ConsoleHighlighter.MAGENTA, ConsoleHighlighter.CYAN
+ private static final TextAttributesKey[] myAnsiColorKeys = new TextAttributesKey[]{
+ ConsoleHighlighter.BLACK,
+ ConsoleHighlighter.RED,
+ ConsoleHighlighter.GREEN,
+ ConsoleHighlighter.YELLOW,
+ ConsoleHighlighter.BLUE,
+ ConsoleHighlighter.MAGENTA,
+ ConsoleHighlighter.CYAN,
+ ConsoleHighlighter.GRAY,
+
+ ConsoleHighlighter.DARKGRAY,
+ ConsoleHighlighter.RED_BRIGHT,
+ ConsoleHighlighter.GREEN_BRIGHT,
+ ConsoleHighlighter.YELLOW_BRIGHT,
+ ConsoleHighlighter.BLUE_BRIGHT,
+ ConsoleHighlighter.MAGENTA_BRIGHT,
+ ConsoleHighlighter.CYAN_BRIGHT,
+ ConsoleHighlighter.WHITE,
};
/*
@@ -73,7 +86,7 @@ public class ColoredOutputTypeRegistry {
attribute = attribute.substring(1);
}
if (attribute.endsWith("m")) {
- attribute = attribute.substring(0, attribute.length()-1);
+ attribute = attribute.substring(0, attribute.length() - 1);
}
if (attribute.equals("0")) {
return ProcessOutputTypes.STDOUT;
@@ -88,25 +101,43 @@ public class ColoredOutputTypeRegistry {
catch (NumberFormatException e) {
continue;
}
- if (value == 4) {
+ if (value == 1) {
+ attrs.setFontType(Font.BOLD);
+ }
+ else if (value == 4) {
attrs.setEffectType(EffectType.LINE_UNDERSCORE);
}
- else if (value == 1) {
- attrs.setFontType(Font.BOLD);
+ else if (value == 22) {
+ attrs.setFontType(Font.PLAIN);
+ }
+ else if (value == 24) { //not underlined
+ attrs.setEffectType(null);
}
else if (value >= 30 && value <= 37) {
attrs.setForegroundColor(getAnsiColor(value - 30));
}
+ else if (value == 38) {
+ //TODO: 256 colors foreground
+ }
+ else if (value == 39) {
+ attrs.setForegroundColor(getColorByKey(ConsoleViewContentType.NORMAL_OUTPUT_KEY));
+ }
else if (value >= 40 && value <= 47) {
attrs.setBackgroundColor(getAnsiColor(value - 40));
}
- else if (value == 90) {
- // black, high intensity
- attrs.setForegroundColor(EditorColorsManager.getInstance().getGlobalScheme().getAttributes(ConsoleHighlighter.GRAY).getForegroundColor());
+ else if (value == 48) {
+ //TODO: 256 colors background
}
- else if (value >= 91 && value < 96) {
- // TODO separate colors for high intensity?
- attrs.setForegroundColor(EditorColorsManager.getInstance().getGlobalScheme().getAttributes(getAnsiColorKey(value-90)).getForegroundColor());
+ else if (value == 49) {
+ attrs.setBackgroundColor(getColorByKey(ConsoleViewContentType.NORMAL_OUTPUT_KEY));
+ }
+ else if (value >= 90 && value <= 97) {
+ attrs.setForegroundColor(
+ getAnsiColor(value - 82));
+ }
+ else if (value >= 100 && value <= 107) {
+ attrs.setBackgroundColor(
+ getAnsiColor(value - 92));
}
}
if (attrs.getEffectType() == EffectType.LINE_UNDERSCORE) {
@@ -120,13 +151,17 @@ public class ColoredOutputTypeRegistry {
}
private static Color getAnsiColor(final int value) {
- if (value == 7) {
- return JBColor.WHITE;
- }
- return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(getAnsiColorKey(value)).getForegroundColor();
+ return getColorByKey(getAnsiColorKey(value));
+ }
+
+ private static Color getColorByKey(TextAttributesKey colorKey) {
+ return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(colorKey).getForegroundColor();
}
public static TextAttributesKey getAnsiColorKey(int value) {
+ if (value >= 16) {
+ return ConsoleViewContentType.NORMAL_OUTPUT_KEY;
+ }
return myAnsiColorKeys[value];
}
}
diff --git a/platform/platform-api/src/com/intellij/execution/process/ConsoleHighlighter.java b/platform/platform-api/src/com/intellij/execution/process/ConsoleHighlighter.java
index 9f32da412e3d..2e306a9f2e2f 100644
--- a/platform/platform-api/src/com/intellij/execution/process/ConsoleHighlighter.java
+++ b/platform/platform-api/src/com/intellij/execution/process/ConsoleHighlighter.java
@@ -15,52 +15,64 @@
*/
package com.intellij.execution.process;
-import com.intellij.openapi.editor.HighlighterColors;
+import com.intellij.execution.ui.ConsoleViewContentType;
import com.intellij.openapi.editor.colors.TextAttributesKey;
-import com.intellij.openapi.editor.markup.TextAttributes;
-import com.intellij.ui.JBColor;
-import com.intellij.util.ui.PlatformColors;
import org.jetbrains.annotations.NonNls;
-import java.awt.*;
-
/**
* @author oleg
*/
public class ConsoleHighlighter {
+ @NonNls static final String BLACK_ID = "CONSOLE_BLACK_OUTPUT";
@NonNls static final String RED_ID = "CONSOLE_RED_OUTPUT";
@NonNls static final String GREEN_ID = "CONSOLE_GREEN_OUTPUT";
@NonNls static final String YELLOW_ID = "CONSOLE_YELLOW_OUTPUT";
@NonNls static final String BLUE_ID = "CONSOLE_BLUE_OUTPUT";
@NonNls static final String MAGENTA_ID = "CONSOLE_MAGENTA_OUTPUT";
@NonNls static final String CYAN_ID = "CONSOLE_CYAN_OUTPUT";
- @NonNls static final String GRAY_ID = "CONSOLE_GRAY_OUTPUT";
+ @NonNls static final String GRAY_ID = "CONSOLE_GRAY_OUTPUT"; //ISO white
- public static final TextAttributes RED_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes GREEN_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes YELLOW_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes BLUE_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes MAGENTA_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes CYAN_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- public static final TextAttributes GRAY_DEFAULT_ATTRS = HighlighterColors.TEXT.getDefaultAttributes().clone();
- static {
- RED_DEFAULT_ATTRS.setForegroundColor(JBColor.RED);
- GREEN_DEFAULT_ATTRS.setForegroundColor(new Color(0, 128, 0));
- YELLOW_DEFAULT_ATTRS.setForegroundColor(new Color(255, 204, 0));
- BLUE_DEFAULT_ATTRS.setForegroundColor(PlatformColors.BLUE);
- MAGENTA_DEFAULT_ATTRS.setForegroundColor(JBColor.MAGENTA);
- CYAN_DEFAULT_ATTRS.setForegroundColor(JBColor.CYAN.darker());
- GRAY_DEFAULT_ATTRS.setForegroundColor(JBColor.GRAY.darker());
- }
+ @NonNls static final String DARKGRAY_ID = "CONSOLE_DARKGRAY_OUTPUT";
+ @NonNls static final String RED_BRIGHT_ID = "CONSOLE_RED_BRIGHT_OUTPUT";
+ @NonNls static final String GREEN_BRIGHT_ID = "CONSOLE_GREEN_BRIGHT_OUTPUT";
+ @NonNls static final String YELLOW_BRIGHT_ID = "CONSOLE_YELLOW_BRIGHT_OUTPUT";
+ @NonNls static final String BLUE_BRIGHT_ID = "CONSOLE_BLUE_BRIGHT_OUTPUT";
+ @NonNls static final String MAGENTA_BRIGHT_ID = "CONSOLE_MAGENTA_BRIGHT_OUTPUT";
+ @NonNls static final String CYAN_BRIGHT_ID = "CONSOLE_CYAN_BRIGHT_OUTPUT";
+ @NonNls static final String WHITE_ID = "CONSOLE_WHITE_OUTPUT"; //ISO bright white
+
+ public static final TextAttributesKey BLACK =
+ TextAttributesKey.createTextAttributesKey(BLACK_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey RED = TextAttributesKey.createTextAttributesKey(RED_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey GREEN =
+ TextAttributesKey.createTextAttributesKey(GREEN_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey YELLOW =
+ TextAttributesKey.createTextAttributesKey(YELLOW_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey BLUE = TextAttributesKey.createTextAttributesKey(BLUE_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey MAGENTA =
+ TextAttributesKey.createTextAttributesKey(MAGENTA_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey CYAN = TextAttributesKey.createTextAttributesKey(CYAN_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey GRAY = TextAttributesKey.createTextAttributesKey(GRAY_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+
+
+ public static final TextAttributesKey DARKGRAY =
+ TextAttributesKey.createTextAttributesKey(DARKGRAY_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey RED_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(RED_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey GREEN_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(GREEN_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey YELLOW_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(YELLOW_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey BLUE_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(BLUE_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey MAGENTA_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(MAGENTA_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey CYAN_BRIGHT =
+ TextAttributesKey.createTextAttributesKey(CYAN_BRIGHT_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
+ public static final TextAttributesKey WHITE =
+ TextAttributesKey.createTextAttributesKey(WHITE_ID, ConsoleViewContentType.NORMAL_OUTPUT_KEY);
- public static final TextAttributesKey RED = TextAttributesKey.createTextAttributesKey(RED_ID, RED_DEFAULT_ATTRS);
- public static final TextAttributesKey GREEN = TextAttributesKey.createTextAttributesKey(GREEN_ID, GREEN_DEFAULT_ATTRS);
- public static final TextAttributesKey YELLOW = TextAttributesKey.createTextAttributesKey(YELLOW_ID, YELLOW_DEFAULT_ATTRS);
- public static final TextAttributesKey BLUE = TextAttributesKey.createTextAttributesKey(BLUE_ID, BLUE_DEFAULT_ATTRS);
- public static final TextAttributesKey MAGENTA = TextAttributesKey.createTextAttributesKey(MAGENTA_ID, MAGENTA_DEFAULT_ATTRS);
- public static final TextAttributesKey CYAN = TextAttributesKey.createTextAttributesKey(CYAN_ID, CYAN_DEFAULT_ATTRS);
- public static final TextAttributesKey GRAY = TextAttributesKey.createTextAttributesKey(GRAY_ID, GRAY_DEFAULT_ATTRS);
private ConsoleHighlighter() {
}
diff --git a/platform/platform-resources-en/src/messages/OptionsBundle.properties b/platform/platform-resources-en/src/messages/OptionsBundle.properties
index 920fd45f9925..f92eab50fd5a 100644
--- a/platform/platform-resources-en/src/messages/OptionsBundle.properties
+++ b/platform/platform-resources-en/src/messages/OptionsBundle.properties
@@ -228,6 +228,8 @@ options.general.attribute.descriptior.identifier.under.caret.write=Identifier un
# Console settings
color.settings.console.name=Console Colors
color.settings.console.output=IRB Output
+
+color.settings.console.black=ANSI Black
color.settings.console.red=ANSI Red
color.settings.console.green=ANSI Green
color.settings.console.yellow=ANSI Yellow
@@ -235,4 +237,14 @@ color.settings.console.blue=ANSI Blue
color.settings.console.magenta=ANSI Magenta
color.settings.console.cyan=ANSI Cyan
color.settings.console.gray=ANSI Gray
+
+color.settings.console.darkGray=ANSI Dark Gray
+color.settings.console.redBright=ANSI Bright Red
+color.settings.console.greenBright=ANSI Bright Green
+color.settings.console.yellowBright=ANSI Bright Yellow
+color.settings.console.blueBright=ANSI Bright Blue
+color.settings.console.magentaBright=ANSI Bright Magenta
+color.settings.console.cyanBright=ANSI Bright Cyan
+color.settings.console.white=ANSI White
+
options.general.attribute.descriptor.live.template=Live Template
\ No newline at end of file
diff --git a/platform/platform-resources/src/DefaultColorSchemesManager.xml b/platform/platform-resources/src/DefaultColorSchemesManager.xml
index ca19e71ff994..267a365859fa 100644
--- a/platform/platform-resources/src/DefaultColorSchemesManager.xml
+++ b/platform/platform-resources/src/DefaultColorSchemesManager.xml
@@ -892,6 +892,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -902,6 +912,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -912,6 +932,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -932,6 +972,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -942,6 +992,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -952,6 +1012,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -962,6 +1032,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+