diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java')
-rw-r--r-- | plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java b/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java new file mode 100644 index 000000000..1b217b56d --- /dev/null +++ b/plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java @@ -0,0 +1,24 @@ +package org.eclipse.etrice.core.common.ui.highlight; + +import org.eclipse.swt.graphics.RGB; +import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration; +import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfigurationAcceptor; +import org.eclipse.xtext.ui.editor.utils.TextStyle; + +public class BaseHighlightingConfig extends DefaultHighlightingConfiguration { + + public static final String HL_CCSTRING = "ccstring"; + + @Override + public void configure(IHighlightingConfigurationAcceptor acceptor) { + super.configure(acceptor); + + acceptor.acceptDefaultHighlighting(HL_CCSTRING, "CCString", detailCodeStringStyle()); + } + + public TextStyle detailCodeStringStyle() { + TextStyle textStyle = stringTextStyle().copy(); + textStyle.setBackgroundColor(new RGB(220, 220, 220)); + return textStyle; + } +} |