|
|
Re: Extending an EditHelper [message #897665 is a reply to message #897522] |
Wed, 25 July 2012 02:23 |
Simon Schwichtenberg Messages: 127 Registered: September 2011 |
Senior Member |
|
|
Thank you for your reply. I tried that, but only the constructor of my Advice class is called, when I want to "Delete Selected Element" from the context menu.
Now, I am using the following plugin.xml. Actually, when I use this XML, I cannot delete messages between lifelines anymore ("Delete Selected Element" is disabled). I discovered that, because there is already an existing MessageHelperAdvice I tried out. So maybe there is a problem when you use the same elementTypeBindings or ClientContexts multiple times?
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
<binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
<elementType ref="org.eclipse.papyrus.uml.Class" />
<advice ref="de.upb.swt.rsdl.editor.ext.edit.commands.ClassEditHelperAdvice" />
</binding>
</extension>
<extension
point="org.eclipse.papyrus.infra.core.service">
<service
classname="de.upb.swt.rsdl.editor.ext.sync.UML2EcoreMappingService"
description="Stores the mapping of classes"
id="de.upb.swt.rsdl.editor.ext.sync.UML2EcoreMappingService"
priority="1"
startKind="startup">
</service>
</extension>
[Updated on: Wed, 25 July 2012 02:24] Report message to a moderator
|
|
|
|
|
Re: Extending an EditHelper [message #903468 is a reply to message #897970] |
Thu, 23 August 2012 18:11 |
Simon Schwichtenberg Messages: 127 Registered: September 2011 |
Senior Member |
|
|
I want to synchronize Associations between Classes as well. I tried to create an AssociactionEditHelperAdvice, but I cannot get it running.
In a first step, I put some breakpoints into the classes org.eclipse.papyrus.uml.service.types.helper.AssociationBaseEditHelper and org.eclipse.papyrus.uml.service.types.helper.advice.AssociationEditHelperAdvice, but none of their methods is called when I draw an Association between two Classes.
Maybe it is because of this?
<!-- ISpecializationType Association of UML::AssociationBase -->
<specializationType id="org.eclipse.papyrus.uml.Association" name="UML::Association"
edithelperadvice="org.eclipse.papyrus.uml.service.types.helper.advice.AssociationEditHelperAdvice"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
<param name="semanticHint" value="UML::Association"/>
<specializes id="org.eclipse.papyrus.uml.AssociationBase" />
<matcher class ="org.eclipse.papyrus.uml.service.types.matcher.AssociationMatcher" />
</specializationType>
What's wrong here? Or do I have to override org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassItemSemanticEditPolicy.getCompleteCreateRelationshipCommand(CreateRelationshipRequest) instead?
[Updated on: Thu, 23 August 2012 18:12] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02938 seconds