Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Obtaining all subrules from a rule to ease <Grammar>Formatter
Obtaining all subrules from a rule to ease <Grammar>Formatter [message #988459] Fri, 30 November 2012 00:25
Barrie Treloar is currently offline Barrie TreloarFriend
Messages: 52
Registered: July 2009
Member
I have a rule which I can find via is *Access() method

grammar.getPropertyAccess()


Is there a way to find out what sub rules this rule contains?
I can call .getGroup() but I'm not sure what is in that.
The generated code says
private final Group cGroup = (Group)rule.eContents().get(1);
which looks like EMF magic I dont yet understand.

I'm trying to avoid having to know (and specify) the formatting rules for stuff contained within this rule. So I want to iterate over the sub rules and specify the formatting without manually specifying everything.

Can I do this?
Previous Topic:Two ecore files generated from grammar
Next Topic:How does control/override the sort order of the completion proposals?
Goto Forum:
  


Current Time: Mon Nov 24 12:37:41 GMT 2014

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

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