Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » syntax highlighting for different groups of keywords(syntax highlighting for different groups of keywords)
syntax highlighting for different groups of keywords [message #1766634] Fri, 23 June 2017 17:20 Go to next message
Bob Frankel is currently offline Bob FrankelFriend
Messages: 12
Registered: July 2009
Junior Member
my language has several different groups of keywords; and i would like to highlight them differently in the editor....

i am able to override the keywordTextStyle() method in a class that extends DefaultHighlightingConfiguration (which i then bind appropriately).... but this simply changes the style of *all* keywords....

i've found the class HighlightingStyles, though this appears to have a fixed set of categories (KEYWORD, COMMENT, etc)

how might i do this with the framework????

thanks, bob
Re: syntax highlighting for different groups of keywords [message #1766636 is a reply to message #1766634] Fri, 23 June 2017 17:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
have a look at semantic highlighting.

- create different styles in the HighlightingConfiguration
- implement a ISemanticHighlightingCalculator that calculates the keywords.



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Setting GeneratorConfig JavaSourceVersion
Next Topic:Xtext prefences pages
Goto Forum:
  


Current Time: Fri Apr 26 15:50:10 GMT 2024

Powered by FUDForum. Page generated in 0.02676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top