emfeclipse-emfeclipse-emf-ecore

EMF: External Interface as Supertype in Model


Is it possible to use a manually created Interface from another plug-in as a supertype in an emf-model?

I tried adding the Interface as an EData Type and using the instance type name to point to the externeal interface, which worked fine. But I cannot select it as a supertype in the Model.

The methods which the interface wants are already satisfied in the model entity.


Solution

  • Create a new EClass with "Instance Type Name" set to "my.qualified.name.to.interface" and "interface" set to "true"; and then your second EClass can set this first EClass as its supertype, and the generated EClass will extend your Java interface.