Domanda

I have created an ecore metamodel and I want to register it with the EMF Runtime. As I'm working with the model within the IDE, I want to do this in my currently running Eclipse instance, i.e. not programmatically.

Put differently, I want to be able to find the metamodel's URI at Navigate->Open EPackage.

I'm using Eclipse Indigo, Modeling edition.

È stato utile?

Soluzione

EMF works with elements deployed in plugins, if you want to work with a metamodel in your workspace, you can:

  1. create a dynamic instance instead of registering the metamodel (and creating a "real" instance).
  2. create a small Eclipse plugin that would create this action to register your metamodel.

Otherwise, you will have to launch a new Eclipse instance. Since EMF works with metamodels deployed in plugins, most of the EMF based tools assume that the metamodel is in a plugin and working with a metamodel from the workspace is always more tricky than working with the same metamodel from a plugin.

Stephane Begaudeau

Disclaimer: I am the leader of an EMF based project of the Eclipse Foundation.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top