ContainerShapeEditPart [message #967523] |
Thu, 01 November 2012 16:49  |
Eclipse User |
|
|
|
Hi.
It's possible to read this code and comments in ContainerShapeEdit class:
/**
* Creates the EditPolicies of this EditPart. Subclasses often overwrite
* this method to change the behaviour of the editpart. This implementation
* adds the layout-specific EditPolicy to the super-implementation.
*
* @see ShapeEditPart
*/
@Override
protected void createEditPolicies() {
super.createEditPolicies();
installEditPolicy(EditPolicy.LAYOUT_ROLE, getConfigurationProvider().getEditPolicyFactory()
.createShapeXYLayoutEditPolicy());
// installEditPolicy(EditPolicy.CONTAINER_ROLE,
// getConfigurationProvider().getEditPolicyFactory().createShapeXYLayoutEditPolicy());
installEditPolicy("Snap Feedback", new GFSnapFeedbackPolicy()); //$NON-NLS-1$
}
In the comments it is talked about subclassing. Anybody knows a way to subclass or use a plugin fragment to extend this method, in such a way I can install a new EditPolicy.
Thanks in advance
rui
[Updated on: Thu, 01 November 2012 16:50] by Moderator
|
|
|
|
Re: ContainerShapeEditPart [message #968253 is a reply to message #968076] |
Fri, 02 November 2012 06:11  |
Eclipse User |
|
|
|
Maybe you still remember about my other post about showing my own guidelines, because I have a high restrictive layout, so I want to give feedback to user about the position where the object will actually be placed.
I've already achieved to install the policy. I have a selection listener and when the selected object is a containershapeeditpart ant it corresponds to my BO, I install the editpolicy, and it is working very well.
I was asking because maybe it would be possible to install directly in the editpart.
Do you see a way of doing it other way around?
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.07498 seconds