Call Direct Edit feature [message #756064] |
Thu, 10 November 2011 12:50  |
Eclipse User |
|
|
|
Hi,
I have set up a custom feature to handle double click events. From this, I would like to call my DirectEditFeature. I can easily get the appropriate feature, but execute() is defined as a no-op it seems.
There is documentation for calling direct edit immediately after object creation, but this solution doesn't work if the object has already been created.
So, is there a way to invoke direct edit? (And why not implement the execute method?)
Regards,
Adrian.
|
|
|
|
Re: Call Direct Edit feature [message #756252 is a reply to message #756182] |
Fri, 11 November 2011 11:35  |
Eclipse User |
|
|
|
Yes, it works now. Many thanks!
For anyone looking to do the same you will need code something like:
IDirectEditingInfo directEditingInfo =
getFeatureProvider().getDirectEditingInfo();
directEditingInfo.setMainPictogramElement(pe);
//pe should be shape and ga text
directEditingInfo.setPictogramElement(s);
directEditingInfo.setGraphicsAlgorithm(s.getGraphicsAlgorithm());
directEditingInfo.setActive(true);
getDiagramEditor().refresh();
[Updated on: Fri, 11 November 2011 11:41] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03312 seconds