I have created a plugin which enhances the Together functionality in a way that I can replicate enumeration literals from a legacy system into an UML 2.0 Enumeration. In order to call the function I declared an extension point for org.eclipse.ui.popupMenus. As indicated in the documentation I use org.eclipse.emf.ecore.EObject as objectClass and adaptable=true. This works and I can cast class com.borland.tg.emfapi.uml20.kernel.Enumeration to the selected element.
Now I want to filter the popup menu item so that it only appears when an Enumeration is selected in the model navigator or on a diagram. I have searched the Together plugins and found out that Together filters using the objectClass com.tssap.selena.model.ui.IElementWrapper and <filter name="metaclass" value="Enumeration>. The problem is that the selected element cannot be cast to the class Enumeration. At least not directly. All I get is a class com.tssap.selena.c.a.b.b.b.d which is rather cryptic.
Is there a proper method to filter the selected object and retrieve object as an Enumeration?
Kind regards
Thilo
I queried the interfaces provided by the various object types. When I use "org.eclipse.emf.ecore.EObject" as objectClass, an additional visibility entry can be used to check the objectClass against "com.borland.tg.emfapi.uml20.kernel.Enumeration".
rgds
Thilo