Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Sun Jul 06 22:22:33 EDT 2025

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

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

Back to the top