Extending an EditHelper [message #897519] |
Tue, 24 July 2012 07:54  |
Eclipse User |
|
|
|
Hi,
I am implementing a synchronization mechanism in Papyrus that keeps an UML model and an ECORE model consistent.
Now I want to hook in the Delete Command so that e.g. for every UML::Class the corresponding ECORE::EClass is deleted. I saw that there is this centralized ElementEditService that access the EditHelpers. So, I tried to override the existing EditHelpers and call my own DestroyElementPapyrusCommand that deletes the EClass.
I am using this plugin.xml
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
<metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
<metamodelType id="org.eclipse.papyrus.ext.uml.Class" name="UML::Class"
eclass="Class"
edithelper="de.upb.swt.rsdl.editor.ext.edit.commands.ClassEditHelperOverride"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
<param name="semanticHint" value="UML::Class"/>
</metamodelType>
</metamodel>
</extension>
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
<binding
context="org.eclipse.papyrus.infra.services.edit.TypeContext">
<elementType
ref="org.eclipse.papyrus.ext.uml.Class">
</elementType>
</binding>
<clientContext
id="org.eclipse.papyrus.infra.services.edit.TypeContext">
</clientContext>
</extension>
But the ElementEditService is still using the old ClassEditHelper.
Do I have to also override the org.eclipse.papyrus.infra.core.service extension point?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.46405 seconds