Skip to main content


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 14:36 Go to next message
Julian Wefers is currently offline Julian WefersFriend
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 14:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
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/


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:e4 based Xtext editor
Next Topic:Import a xtext file into EMF
Goto Forum:
  


Current Time: Sat Apr 20 13:20:42 GMT 2024

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

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

Back to the top