Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Add eObject to the parse tree programaticaly
icon4.gif  Add eObject to the parse tree programaticaly [message #1419898] Tue, 09 September 2014 04:24 Go to next message
Eclipse UserFriend
Here is a snapshot of my grammar:

Sort:
 name=ID 
;
Variable
 name=ID ':' type=[Sort]


My requirement is to have a predefined Sort let's call it Loc. There is no need for the user to define this sort, thus when a Variable is defined with a Loc type, Xtext should automatically reference it to my predefined Sort. How can I initiate the program so that at the beginning a Sort instance is generated? I already used the Factory method 'CreateSort' in my validator class, but no use. any idea?
Re: Add eObject to the parse tree programaticaly [message #1420223 is a reply to message #1419898] Tue, 09 September 2014 13:49 Go to previous message
Eclipse UserFriend
one possibility could be to use an iderivedstatecomputer or to hook into globalscopeprovider
Previous Topic:Xtext: Cross-Referenzce + JvmTypeReference
Next Topic:Insert Comment with ALT+SHIFT+J
Goto Forum:
  


Current Time: Sun Nov 09 11:29:14 EST 2025

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

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

Back to the top