Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Tue Jul 08 17:58:41 EDT 2025

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

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

Back to the top