ColorKey/getter for template variable color

Answered

Can't find getter for "Template variable" color,
EditorColorsManager.getInstance().getGlobalScheme().getColor(???)
UIUtil.get.. TemplateVariableColor ??
Where is list of all ColorKeys?


 

4 comments
Comment actions Permalink

EditorColors.LIVE_TEMPLATE_ATTRIBUTES

TemplateColors.TEMPLATE_VARIABLE_ATTRIBUTES

Also CodeInsightColors, HighlighterColors, DefaultLanguageHighlighterColors.

 

I'm not sure if there are a way to get them all.

 

0
Comment actions Permalink

How to convert TextAttributesKey to color or how apply it to EditorTextField?

0
Comment actions Permalink
Editor editor;
ColorScheme scheme = editor.getColorsScheme(); // or EditorColorsManager.getInstance().getGlobalScheme()
TextAttributes attributes = scheme.getAttributes(EditorColors.LIVE_TEMPLATE_ATTRIBUTES);
Color color1 = attributes.getBackgroundColor();
Color color2 = scheme.getColor(EditorColors.CARET_COLOR);
editor.getMarkupModel().addRangeHighlighter(..., attributes, ...)
1
Comment actions Permalink

So answer is TemplateColors.TEMPLATE_VARIABLE_ATTRIBUTES 

EditorColors.LIVE_TEMPLATE_ATTRIBUTES have another effect:

0

Please sign in to leave a comment.