Skip to main content


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 15:14 Go to next message
Martin Roob is currently offline Martin RoobFriend
Messages: 8
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 22:16 Go to previous message
Karsten Becker is currently offline Karsten BeckerFriend
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 26 08:27:30 GMT 2024

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

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

Back to the top