Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Implicitly Import instances of external EMF model
Implicitly Import instances of external EMF model [message #1113027] Fri, 20 September 2013 10:36 Go to next message
Julian Wefers is currently offline Julian Wefers
Messages: 2
Registered: June 2013
Junior Member
Hi Guys,

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
Re: Implicitly Import instances of external EMF model [message #1113033 is a reply to message #1113027] Fri, 20 September 2013 10:48 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Hi,

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/
Previous Topic:e4 based Xtext editor
Next Topic:Import a xtext file into EMF
Goto Forum:
  


Current Time: Fri Aug 29 04:12:39 EDT 2014

Powered by FUDForum. Page generated in 0.03444 seconds