Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPackage(Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPackage del Registro de EMF como referencia en una instancia de mi metamodelo.)
icon9.gif  Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPackage [message #1754893] Thu, 23 February 2017 16:13 Go to next message
Luis Felipe Mendivelso Osorio is currently offline Luis Felipe Mendivelso OsorioFriend
Messages: 3
Registered: February 2017
Junior Member
Hello everyone,

I am new to Eclipse Epsilon, and built a transformation chain that allows you to generate view specs for Eclipse Sirius (.design files), however, for these you must add the nsURI of the metamodel in the specification was generated. I read about that, all the registers are in the EMF Registry, which is why you should look inside the EMF Registry with the nsURI of interest.

However, in doing so my model does indeed get the reference, but it does not work when the editor that will make use of the specification in Sirius runs on a second instance of Eclipse.

I done this:
var mymodel = new MS!MyModel()

var emfTool = new Native("org.eclipse.epsilon.emc.emf.tools.EmfTool");
var package =emfTool.getEPackage("www.example.org/mt");

mymodel.metamodel.add(package);

for(subpackage in package.eSubpackages){
         mymodel.metamodels.add(subpackage);	
}


Anyone have an idea what I can do to be make it functional in the second instance of Eclipse?

// For Spanish Speakers.
Hola a todos,

Soy relativamente nuevo en Eclipse Epsilon, y he construido una cadena de transformación que permite generar especificaciones de vista para Eclipse Sirius (archivos .odesign), sin embargo, para estas sirvan debe agregarse la nsURI del metamodelo frente a cual se generó la especificación. Por lo que he leido, todas los metamodelos se encuentran en el EMF Registry, razón por la cual se debe buscar dentro del EMF Registry con el nsURI de interes.

Sin embargo, al hacerlo mi modelo en efecto queda con la referencia, pero no funciona cuando el editor que hará uso de la especificación en Sirius corre sobre una segunda instancia.

¿Alguien tiene una idea de lo que puedo hacer para que sea funcional en la segunda instancia de Eclipse?
Re: Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPac [message #1754916 is a reply to message #1754893] Thu, 23 February 2017 22:40 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1588
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Could you please provide a minimal example [1] we can use to reproduce this?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPac [message #1754964 is a reply to message #1754916] Fri, 24 February 2017 16:42 Go to previous messageGo to next message
Luis Felipe Mendivelso Osorio is currently offline Luis Felipe Mendivelso OsorioFriend
Messages: 3
Registered: February 2017
Junior Member
Hi Dimitis,

This is the repository with the minimal example.

https://github.com/lfmendivelso10/ETLEPackageRegistry

thanks for your help.

Atte,

Luis F.
Re: Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPac [message #1754965 is a reply to message #1754916] Fri, 24 February 2017 16:43 Go to previous messageGo to next message
Luis Felipe Mendivelso Osorio is currently offline Luis Felipe Mendivelso OsorioFriend
Messages: 3
Registered: February 2017
Junior Member
Hi Dimitris,

You can download the minimal example from this repository:

https://github.com/lfmendivelso10/ETLEPackageRegistry
Re: Add EPackage of the EMF Registry as a reference in a my metamodelo's instance - Agregar un EPac [message #1755001 is a reply to message #1754965] Sat, 25 February 2017 18:36 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1588
Registered: July 2009
Location: York, UK
Senior Member

Hi Luis,

For your metamodel to be visible to the second Eclipse instance, in your first Eclipse you need to 1) either generate code from it or 2) register it through an extension to the "org.eclipse.emf.ecore.dynamic_package" extension point. I'd also recommend not using sub-packages in Ecore [1].

Cheers,
Dimitris

[1] http://eclipsesource.com/blogs/2013/03/19/emf-dos-and-don%C2%B4ts-5/
Previous Topic:EMF metmodel
Next Topic:Probem
Goto Forum:
  


Current Time: Sat Sep 22 22:53:15 GMT 2018

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

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

Back to the top