Java Code Examples for com.intellij.openapi.editor.markup.TextAttributes#getErrorStripeColor()

The following examples show how to use com.intellij.openapi.editor.markup.TextAttributes#getErrorStripeColor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HighlightDisplayLevel.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Nullable
public Color getColorInner() {
  final EditorColorsManager manager = EditorColorsManager.getInstance();
  if (manager != null) {
    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();
}
 
Example 2
Source File: AbstractColorsScheme.java    From consulo with Apache License 2.0 5 votes vote down vote up
private void migrateErrorStripeColorFrom45(final TextAttributesKey name, final TextAttributes attr) {
  if (myVersion != 0) return;
  Color defaultColor = DEFAULT_ERROR_STRIPE_COLOR.get(name.getExternalName());
  if (defaultColor != null && attr.getErrorStripeColor() == null) {
    attr.setErrorStripeColor(defaultColor);
  }
}
 
Example 3
Source File: DiffOptionsPanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public MyColorAndFontDescription(@Nonnull TextDiffType diffType, @Nonnull EditorColorsScheme scheme) {
  myScheme = scheme;
  myDiffType = diffType;
  TextAttributes attrs = diffType.getTextAttributes(myScheme);
  myBackgroundColor = attrs.getBackgroundColor();
  myStripebarColor = attrs.getErrorStripeColor();
  myOriginalBackground = myBackgroundColor;
  myOriginalStripebar = myStripebarColor;
}
 
Example 4
Source File: AbstractProjectViewPSIPane.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * @param object   an object that represents a node in the project tree
 * @param expanded {@code true} if the corresponding node is expanded,
 *                 {@code false} if it is collapsed
 * @return a non-null value if the corresponding node should be , or {@code null}
 */
protected ErrorStripe getStripe(Object object, boolean expanded) {
  if (expanded && object instanceof PsiDirectoryNode) return null;
  if (object instanceof PresentableNodeDescriptor) {
    PresentableNodeDescriptor node = (PresentableNodeDescriptor)object;
    TextAttributesKey key = node.getPresentation().getTextAttributesKey();
    TextAttributes attributes = key == null ? null : EditorColorsManager.getInstance().getSchemeForCurrentUITheme().getAttributes(key);
    Color color = attributes == null ? null : attributes.getErrorStripeColor();
    if (color != null) return ErrorStripe.create(color, 1);
  }
  return null;
}
 
Example 5
Source File: SeveritiesProvider.java    From consulo with Apache License 2.0 4 votes vote down vote up
public Color getTrafficRendererColor(@Nonnull TextAttributes textAttributes) {
  return textAttributes.getErrorStripeColor();
}