Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Syntax Highlight of disconnected rules
Syntax Highlight of disconnected rules [message #988452] Thu, 29 November 2012 17:41 Go to next message
Eclipse UserFriend
I was wondering why the editor is showing some of my rules in grey.

And I solved that problem when my parser couldn't parse that rule when I was sure I wrote it correctly.

I think the grey is indicating that the rule is not connected to another rule so wont be called. As soon as I included this rule in another rule it turned black.

Is being "grey" a standard eclipse thing?
I was kind of hoping for a warning marker, or perhaps the hover text could indicate a warning.

Should I file an enhancement request?
Re: Syntax Highlight of disconnected rules [message #988478 is a reply to message #988452] Fri, 30 November 2012 02:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

the "grey" syntax highlighting is specific to the Xtext grammar editor. It indeed indicates that the rule is not "reachable" from the root rule. My guess is that an enhancement request will be ignored (wontfix), as you may introduce such rules for the purpose of influencing the meta model inference.

Supertype: Type1|Type2;

is an example. You may want Type1 and Type2 to have a common supertype without actually having a place in your language where you want those to types to be allowed in the same location.

Alex
Re: Syntax Highlight of disconnected rules [message #990743 is a reply to message #988478] Thu, 13 December 2012 22:21 Go to previous messageGo to next message
Eclipse UserFriend
It would be nice to document what the grey text means.
And perhaps also include in the hover text a "reminder" that indicates the rule is unreachable would be useful.

I had to guess at the meaning, and the colors are clearly trying to tell me something, its just there is no way to know that information.
Re: Syntax Highlight of disconnected rules [message #1760306 is a reply to message #990743] Tue, 25 April 2017 12:25 Go to previous message
Eclipse UserFriend
thanks for your response now
I'll never forget to do the assignment Smile
Previous Topic:EObject 'nature' of domain classes no longer available?
Next Topic:Alternative Rules
Goto Forum:
  


Current Time: Tue Jul 15 23:57:01 EDT 2025

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

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

Back to the top