diff --git a/colorSchemes/src/colorSchemes/Darcula.xml b/colorSchemes/src/colorSchemes/Darcula.xml
index 6025ff6f84b8..d960bd12830b 100644
--- a/colorSchemes/src/colorSchemes/Darcula.xml
+++ b/colorSchemes/src/colorSchemes/Darcula.xml
@@ -557,7 +557,7 @@
-
+
@@ -710,7 +710,7 @@
-
+
@@ -731,7 +731,7 @@
-
+
@@ -1367,7 +1367,6 @@
-
@@ -1486,16 +1485,16 @@
-
-
-
+
+
+
-
+
-
+
@@ -1511,10 +1510,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1580,14 +1589,13 @@
-
+
-
diff --git a/platform/analysis-api/src/com/intellij/codeHighlighting/HighlightDisplayLevel.java b/platform/analysis-api/src/com/intellij/codeHighlighting/HighlightDisplayLevel.java
index fac4691f8c5c..7f6a8484adf4 100644
--- a/platform/analysis-api/src/com/intellij/codeHighlighting/HighlightDisplayLevel.java
+++ b/platform/analysis-api/src/com/intellij/codeHighlighting/HighlightDisplayLevel.java
@@ -18,11 +18,9 @@ package com.intellij.codeHighlighting;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.editor.colors.CodeInsightColors;
import com.intellij.openapi.editor.colors.EditorColorsManager;
-import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.util.Comparing;
-import com.intellij.ui.JBColor;
import com.intellij.util.containers.HashMap;
import com.intellij.util.ui.ColorIcon;
import org.jetbrains.annotations.NotNull;
@@ -39,10 +37,8 @@ public class HighlightDisplayLevel {
createIconByKey(CodeInsightColors.GENERIC_SERVER_ERROR_OR_WARNING));
public static final HighlightDisplayLevel ERROR = new HighlightDisplayLevel(HighlightSeverity.ERROR, createIconByKey(CodeInsightColors.ERRORS_ATTRIBUTES));
public static final HighlightDisplayLevel WARNING = new HighlightDisplayLevel(HighlightSeverity.WARNING, createIconByKey(CodeInsightColors.WARNINGS_ATTRIBUTES));
- // todo: move to color schemas
- public static final Color GREEN = new JBColor(new Color(113, 178, 98), new Color(30, 160, 0));
- public static final Color TYPO = new JBColor(new Color(176, 209, 171), new Color(30, 160, 0));
- public static final HighlightDisplayLevel DO_NOT_SHOW = new HighlightDisplayLevel(HighlightSeverity.INFORMATION, createIconByMask(GREEN));
+ private static final Icon DO_NOT_SHOW_KEY = createIconByKey(TextAttributesKey.createTextAttributesKey("DO_NOT_SHOW"));
+ public static final HighlightDisplayLevel DO_NOT_SHOW = new HighlightDisplayLevel(HighlightSeverity.INFORMATION, DO_NOT_SHOW_KEY);
/**
* use #WEAK_WARNING instead
*/
@@ -100,8 +96,8 @@ public class HighlightDisplayLevel {
return mySeverity;
}
- public static void registerSeverity(@NotNull HighlightSeverity severity, final Color renderColor) {
- Icon severityIcon = createIconByMask(renderColor);
+ public static void registerSeverity(@NotNull HighlightSeverity severity, final TextAttributesKey key) {
+ Icon severityIcon = createIconByKey(key);
final HighlightDisplayLevel level = ourMap.get(severity);
if (level == null) {
new HighlightDisplayLevel(severity, severityIcon);
@@ -147,19 +143,20 @@ public class HighlightDisplayLevel {
public Color getColor() {
final EditorColorsManager manager = EditorColorsManager.getInstance();
if (manager != null) {
- final EditorColorsScheme globalScheme = manager.getGlobalScheme();
- return globalScheme.getAttributes(myKey).getErrorStripeColor();
+ TextAttributes attributes = manager.getGlobalScheme().getAttributes(myKey);
+ Color stripe = attributes.getErrorStripeColor();
+ if (stripe != null) return stripe;
+ return attributes.getEffectColor();
}
TextAttributes defaultAttributes = myKey.getDefaultAttributes();
if (defaultAttributes == null) defaultAttributes = TextAttributes.ERASE_MARKER;
- return defaultAttributes.getErrorStripeColor();
+ return defaultAttributes.getErrorStripeColor();
}
@Override
public void paintIcon(final Component c, final Graphics g, final int x, final int y) {
- final Graphics2D g2 = (Graphics2D)g;
- g2.setColor(getColor());
- g2.fillRect(x, y, EMPTY_ICON_DIM, EMPTY_ICON_DIM);
+ g.setColor(getColor());
+ g.fillRect(x, y, EMPTY_ICON_DIM, EMPTY_ICON_DIM);
}
@Override
@@ -172,4 +169,17 @@ public class HighlightDisplayLevel {
return EMPTY_ICON_DIM;
}
}
+
+ public static class SemiBorderIcon extends SingleColorIcon {
+ public SemiBorderIcon(TextAttributesKey key) {
+ super(key);
+ }
+
+ @Override
+ public void paintIcon(Component component, Graphics g, int x, int y) {
+ g.setColor(getColor());
+ g.fillRect(x, y, 1, getIconHeight());
+ g.fillRect(x, y + getIconHeight() - 1, getIconWidth(), 1);
+ }
+ }
}
diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java
index c55d30cd10b6..f0aca8b5d272 100644
--- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java
+++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java
@@ -93,7 +93,7 @@ public class SeverityRegistrar implements JDOMExternalizable, Comparator
-
-
-
+
+
+
@@ -599,7 +599,7 @@
-
+
@@ -608,7 +608,7 @@
-
+
@@ -654,7 +654,7 @@
-
+
@@ -810,7 +810,7 @@
-
+
@@ -880,12 +880,28 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java b/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java
index 9547b4f1040d..a745830bd921 100644
--- a/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java
+++ b/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java
@@ -20,12 +20,10 @@
*/
package com.intellij.spellchecker;
-import com.intellij.codeHighlighting.HighlightDisplayLevel;
import com.intellij.codeInsight.daemon.impl.HighlightInfoType;
import com.intellij.codeInsight.daemon.impl.SeveritiesProvider;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.editor.colors.TextAttributesKey;
-import com.intellij.openapi.editor.markup.EffectType;
import com.intellij.openapi.editor.markup.TextAttributes;
import org.jetbrains.annotations.NotNull;
@@ -34,23 +32,19 @@ import java.util.Collections;
import java.util.List;
public class SpellCheckerSeveritiesProvider extends SeveritiesProvider {
+ private static final TextAttributesKey TYPO_KEY = TextAttributesKey.createTextAttributesKey("TYPO");
public static final HighlightSeverity TYPO = new HighlightSeverity("TYPO", HighlightSeverity.INFORMATION.myVal + 5);
@Override
@NotNull
public List getSeveritiesHighlightInfoTypes() {
- final TextAttributes attributes = new TextAttributes();
-
- attributes.setEffectType(EffectType.WAVE_UNDERSCORE);
- attributes.setEffectColor(HighlightDisplayLevel.TYPO);
-
- HighlightInfoType typo = new HighlightInfoType.HighlightInfoTypeImpl(TYPO, TextAttributesKey.createTextAttributesKey("TYPO", attributes));
+ HighlightInfoType typo = new HighlightInfoType.HighlightInfoTypeImpl(TYPO, TYPO_KEY);
return Collections.singletonList(typo);
}
@Override
public Color getTrafficRendererColor(@NotNull TextAttributes textAttributes) {
- return HighlightDisplayLevel.TYPO;
+ return textAttributes.getErrorStripeColor();
}
@Override