|GlobalScope Import [message #989536]
||Thu, 06 December 2012 16:35
| Gilles Besançon
Registered: December 2012
I hope I didn't miss answer to the 3 next questions in existing thread :
I'm trying to create a DSL with XText for a C like language.
I registered the ImportURI fragment to cross reference object from an other file and it works well by pointing to other file with relative path. I customized it with some feature about qualified naming and other stuffs.
Now I want to improve this behaviour by allowing the user to define directories where other files would be and allowing to only use filename (like when you use -I directive in C compilators). Is it easy to do ? I tried to define my own GlobalScopeProvider with a built-in path where to look for but no good result.
Also I tried to generate the EMF editor for the XText ecore model generated. I can open my simple files with no error except the ones which have cross references to another file. Is it normal ? It seems that references are only resolved in the Xtext Editor not in the model. Is there a way to resolve the imports in the standard EMF editor ?
Finally, last question about import. I have an existing ecore model with no concept of import, I want to define a DSL supporting file import. Is it possible ?
Do I need a class to handle this feature or is it possible to keep my metamodel as it is and instrument the DSL.
Powered by FUDForum
. Page generated in 0.01297 seconds