Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsImplicitly Import instances of external EMF model
https://www.eclipse.org/forums/index.php/mv/msg/528084/1113027/#msg_1113027
my case is, that every file of my DSL should have implicit access to our data model, which exists as ecore model. Importing these models in the grammar language works, referencing the types works as well.
My question is now: how can i let scripts, written in my dsl have scoping access to the concrete instances of our meta datamodel. we have persisted these with the XMI mechanism of EMF. So, basically lots of Resource files, which can be time-variant
So, i have my Xtext grammar, which references types from an ecore metamodel. i now want to reference concrete instances of the EMF metamodel (which lie in XMI files) to reference from my concrete DSL script.
I'm not sure, whether to somehow use the GlobalScopeProvider, as my Resources should not be hard-coded in the model.
I thought about building some sort of Wrapper around the types directory to provice IResourceDescriptions for the Scoping but this somehow seems too complicated?
Can you give any adive?
Regards,
Julian]]>Julian Wefers2013-09-20T14:36:32-00:00Re: Implicitly Import instances of external EMF model
https://www.eclipse.org/forums/index.php/mv/msg/528084/1113033/#msg_1113033
i am note sure if i get your problem, but you can reference non xtext but ecore based resources if you provide a resourceserviceprovider for that kind of resources. e.g. for uml2: http://christiandietrich.wordpress.com/2011/07/17/xtext-2-0-and-uml/]]>Christian Dietrich2013-09-20T14:48:49-00:00