diff options
Diffstat (limited to 'rba.tool.editor.ui/src/rba/tool/editor/ui/syntaxcoloring/RBAModelAntlrTokenToAttributeIdMapper.xtend')
-rw-r--r-- | rba.tool.editor.ui/src/rba/tool/editor/ui/syntaxcoloring/RBAModelAntlrTokenToAttributeIdMapper.xtend | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rba.tool.editor.ui/src/rba/tool/editor/ui/syntaxcoloring/RBAModelAntlrTokenToAttributeIdMapper.xtend b/rba.tool.editor.ui/src/rba/tool/editor/ui/syntaxcoloring/RBAModelAntlrTokenToAttributeIdMapper.xtend new file mode 100644 index 0000000..f4118b9 --- /dev/null +++ b/rba.tool.editor.ui/src/rba/tool/editor/ui/syntaxcoloring/RBAModelAntlrTokenToAttributeIdMapper.xtend @@ -0,0 +1,14 @@ +package rba.tool.editor.ui.syntaxcoloring + +import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultAntlrTokenToAttributeIdMapper + +class RBAModelAntlrTokenToAttributeIdMapper extends DefaultAntlrTokenToAttributeIdMapper { + + override protected calculateId(String tokenName, int tokenType) { + if ("\'Area\'".equals(tokenName)) { + return RBAModelHighlightingConfiguration.AREA; + } + return super.calculateId(tokenName, tokenType); + } + +} |