import com.intellij.openapi.util.JDOMExternalizable;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import java.awt.*;
@NotNull
Color getDefaultForeground();
+ @Nullable
Color getColor(ColorKey key);
void setColor(ColorKey key, Color color);
return attrs;
}
+ @Nullable
@Override
public Color getColor(ColorKey key) {
if (key == null) return null;
import com.intellij.openapi.options.ExternalizableScheme;
import com.intellij.openapi.util.Comparing;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import java.awt.*;
return myAttributesMap.containsKey(key);
}
+ @Nullable
@Override
public Color getColor(ColorKey key) {
if (myColorsMap.containsKey(key)) {
}
private static boolean darkBackground() {
- return ColorUtil.isDark(EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.GUTTER_BACKGROUND));
+ Color gutterBackground = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.GUTTER_BACKGROUND);
+ if (gutterBackground == null) {
+ gutterBackground = EditorColors.GUTTER_BACKGROUND.getDefaultColor();
+ }
+ return ColorUtil.isDark(gutterBackground);
}
private static class MyGutterIconRenderer extends GutterIconRenderer {
return myDelegate.getDefaultForeground();
}
+ @Nullable
@Override
public Color getColor(ColorKey key) {
return myDelegate.getColor(key);
myOwnAttributes.put(key, attributes);
}
+ @Nullable
@Override
public Color getColor(ColorKey key) {
if (myOwnColors.containsKey(key)) return myOwnColors.get(key);
colorsScheme.setColor(EditorColors.CARET_ROW_COLOR, null);
if (!isEnabled()) {
editor.setColorsScheme(new DelegateColorScheme(colorsScheme) {
+ @Nullable
@Override
public Color getColor(ColorKey key) {
return super.getColor(key);
return getGlobal().getDefaultForeground();
}
+ @Nullable
@Override
public Color getColor(ColorKey key) {
if (myOwnColors.containsKey(key)) return myOwnColors.get(key);