diff options
author | Juergen Haug | 2017-07-17 20:46:22 +0000 |
---|---|---|
committer | Juergen Haug | 2017-07-21 14:09:42 +0000 |
commit | 5e3d77e69e5c353ad11395813505959bb2df12aa (patch) | |
tree | 4188f46e6de667b5f846f0024d4aedb52af6e910 /plugins/org.eclipse.etrice.core.common.ui/src/org/eclipse/etrice/core/common/ui/highlight/BaseHighlightingConfig.java | |
parent | edfa0050af236c45465f0330f840dd16ef789a8f (diff) | |
download | org.eclipse.etrice-5e3d77e69e5c353ad11395813505959bb2df12aa.tar.gz org.eclipse.etrice-5e3d77e69e5c353ad11395813505959bb2df12aa.tar.xz org.eclipse.etrice-5e3d77e69e5c353ad11395813505959bb2df12aa.zip |
[targetLang] added ccstring with highlight and smart indentation
Change-Id: Ic5faeb91a39114f196f07c43f533a456bd9b90db
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; + } +} |