Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How can I autoload default imports from resources
How can I autoload default imports from resources [message #932919] Thu, 04 October 2012 11:14 Go to next message
Martin Roob is currently offline Martin Roob
Messages: 2
Registered: October 2012
Junior Member
Hello,
I'm quite new to Xtext and started writing a grammar that uses namespaces.
I followed the description in blogs.itemis.de/stundzig/archives/795 about Default imports and everything works fine so far.
There is only one problem left: When I add a dsl file in my workspace containing the imported namespace, the editor is able to look up the file by magic and all the cross references are resolved. But I don't want to add a file, I do have the content to be included in a resource in the src-folder of the Xtext-project.
What do I have to do to add this java resource to the "Xtext classpath/resourceset" or however you call it??
In principle, I need some code that does the same as descriped in the blog article for URI Imports, just for namespace imports.
Thanks in advance for any help or hints!

Martin Roob
Re: How can I autoload default imports from resources [message #936287 is a reply to message #932919] Sun, 07 October 2012 18:16 Go to previous message
Karsten Becker is currently offline Karsten Becker
Messages: 12
Registered: July 2009
Junior Member
I was wondering exactly the same...
The only way I currently could come up with is the following:
After creating the resourceset, I just add the model to it.
Previous Topic:Exporting Parser+Generator as standalone jar file
Next Topic:Backtrack and Formatting bug?
Goto Forum:
  


Current Time: Fri Apr 18 10:21:07 EDT 2014

Powered by FUDForum. Page generated in 0.02149 seconds