Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Does it possible to control the highlighting ?
Does it possible to control the highlighting ? [message #1739303] Fri, 29 July 2016 13:46 Go to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi

Usually, when we define a highlighter for a DSL (based on Xtext),
the highlight works automatically when we create or edit the dsl model.

Does it possible to control the highlight with an action or an event (using popup menu for example) ?

It means that when I press such command, the highlight works. otherwise, the highlight is disable.


best regards

Re: Does it possible to control the highlighting ? [message #1739308 is a reply to message #1739303] Fri, 29 July 2016 14:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14655
Registered: July 2009
Senior Member
do you mean lexical highlighting or sematic highlighting?
there is nothing out of the box.
i guess you can always use eclipse preferences to do something else and not to do something inside your impls of ISemanticHighlightingCalculator.

or do you want to disable lexical highlighting? that is in the deps of jface, but i guess you can adapt DefaultAntlrTokenToAttributeIdMapper or the tokenization TerminalsTokenTypeToPartitionMapper (i dont know if these are cached though)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Does it possible to control the highlighting ? [message #1739321 is a reply to message #1739308] Fri, 29 July 2016 15:20 Go to previous messageGo to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi christian
I mean semantic highlighting.
In fact, the semantic highlighting works automatically (for example, when we run the second eclipse and we define a dsl model that contains highlightable elements, these elements will be highlighted automatically).
what I'm trying to do is to control the highlight out of xtext mechanic (for exemple using a popup menu with right click on dsl model and click on "highlight" label or with a command)

best regards
Re: Does it possible to control the highlighting ? [message #1739324 is a reply to message #1739321] Fri, 29 July 2016 16:31 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14655
Registered: July 2009
Senior Member
no this is lexical highlighting. for semantic highlighting you have to provide an impl explicitely to enable it.
thus digg at the classes i mentioned (but as said before: there is nothing out of the box)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[SOLVED] Could we generate code for existing resources without xtext.builder.participant?
Next Topic:eGit problems in Eclipse Mars - empty src and xtend-src
Goto Forum:
  


Current Time: Mon Mar 04 12:55:01 GMT 2024

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

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

Back to the top