Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How scoping works on Ecore Editor ?
How scoping works on Ecore Editor ? [message #1806538] Fri, 10 May 2019 09:10 Go to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Hi,

I have a metamodel that is generated by Xtext from a syntax of DSL named DSL1.

Within this DSL I make a cross reference to another DSL say DSL2.

Now, I created a dynamique instance in the Ecore Editor of DSL1. I also created a dynamique instance of DSL2 in the Ecore Editor.

When I want to specify the cross reference in the Editor, it is empty (I guess there is nothing in the scope). In Xtext, the scoping is handled in the ScopeProvider.

How can I achieve that in the Ecore Editor ?

Re: How scoping works on Ecore Editor ? [message #1806543 is a reply to message #1806538] Fri, 10 May 2019 09:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
You need to load the resource you want to reference into the resource set of the editor. You can do that via the context menu, Load Resource, or by dragging and dropping the file from the workspace onto the open editor.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How scoping works on Ecore Editor ? [message #1806544 is a reply to message #1806543] Fri, 10 May 2019 09:38 Go to previous messageGo to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
I tried that but it does not work, and it makes sense because there is no scope provider in the Ecore Editor ?
Re: How scoping works on Ecore Editor ? [message #1806549 is a reply to message #1806544] Fri, 10 May 2019 10:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you would need to have a resource service provider for xmi files
is there any reason you dont create yourdsl files?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How scoping works on Ecore Editor ? [message #1806555 is a reply to message #1806549] Fri, 10 May 2019 10:54 Go to previous messageGo to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
I got my dsl file, if you mean an Xtext project. But I use the metamodel in another project and I want to apply some transformations using ATL on the instances.

How can make a provider for xmi ?
Re: How scoping works on Ecore Editor ? [message #1806558 is a reply to message #1806555] Fri, 10 May 2019 11:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
why do you need an xmi at all.
the mydsl file i an emf resource and can be fed into any emf based tooling


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How scoping works on Ecore Editor ? [message #1806562 is a reply to message #1806558] Fri, 10 May 2019 11:19 Go to previous message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Ok I see I will try that. Thanks a lot for your help
Previous Topic:Left Recursion Problem in xText
Next Topic:How to change the directory of the generated metamodel ?
Goto Forum:
  


Current Time: Fri Apr 19 20:08:19 GMT 2024

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

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

Back to the top