Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to access the EObject tree of another model file?
How to access the EObject tree of another model file? [message #559051] Wed, 15 September 2010 12:57 Go to next message
rkrul is currently offline rkrulFriend
Messages: 12
Registered: July 2010
Junior Member
Hello,

i would like to know how i can get the EObject tree of a file in the project.

In our DSL we want to generate code from the model selectively. A user selects a file, and we have to compute which other files reference this file and use those during generation as well.

Is there a way to access the EObject tree (AST) of a file either through the Resource of the current editor (which is another file referenced by the one i want) or through a fileurl?

Thank you
Robert Krul
Re: How to access the EObject tree of another model file? [message #559061 is a reply to message #559051] Wed, 15 September 2010 13:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hello Robert,

to read the model programmatically have a look at the section Processing Xtext Models in the docs (starting from a fileurl) or starting with an editor do something like described here: http://www.eclipse.org/forums/index.php?t=msg&goto=54494 2

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 15 September 2010 13:34]

Report message to a moderator

Re: How to access the EObject tree of another model file? [message #559902 is a reply to message #559051] Mon, 20 September 2010 10:02 Go to previous message
rkrul is currently offline rkrulFriend
Messages: 12
Registered: July 2010
Junior Member
Thank you, just what i needed.
Previous Topic:wrong post
Next Topic:project wizard and launch configuration
Goto Forum:
  


Current Time: Thu Apr 25 04:22:21 GMT 2024

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

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

Back to the top