Correct way to customize CreateCommand [message #230332] |
Thu, 14 May 2009 15:02  |
Eclipse User |
|
|
|
Hi,
I am trying to customize my XxxCreateCommand using extension points.
I managed to do it the following way:
* I contribute to extension
point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders "
* In my CustomXxxEditPartProvider I set a CustomXxxEditPartFactory and its
overridden createEditPart-method returns a CustomXxxEditPart.
* In the CustomXxxEditPart I override createDefaultEditPolicies and after
calling super.createDefaultEditPolicies I re-install a
CustomXxxSemanticEditPolicy (the policy EditPolicyRoles.SEMANTIC_ROLE has
already been set by super.createDefaultEditPolicies).
My CustomXxxSemanticEditPolicy then returns a CustomXxxCreateCommand in
getCreateCommand which then overrides doDefaultElementCreation.
Is this the correct way or is there any, well, shorter way? :)
Thanks in advance!
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03252 seconds