Skip to main content



      Home
Home » Modeling » Graphiti » How to directedit text in customfeature?
How to directedit text in customfeature? [message #1778959] Tue, 26 December 2017 08:31 Go to next message
Eclipse UserFriend
I want to provider directedit in contextmenu.
I can call the directedit after the shape is added. But when I put the code in the custom feature, I can't call the directedit.
In the custom feature, the code as:
IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
directEditingInfo.setActive(true);
directEditingInfo.setMainPictogramElement(containerShape);
directEditingInfo.setPictogramElement(shape);
directEditingInfo.setGraphicsAlgorithm(shape.getGraphicsAlgorithm());
Re: How to directedit text in customfeature? [message #1778982 is a reply to message #1778959] Wed, 27 December 2017 09:15 Go to previous messageGo to next message
Eclipse UserFriend
In the add feature you usually enable direct editing by calling:
getFeatureProvider().getDirectEditingInfo().setActive(true);

Afterwards the diagram is refreshed automatically since something is added to it. That is probably missing in the case of your custom feature (not sure what else is done there). Have you tried to trigger a refresh of the diagram in the end of your feature (DiagramBehavior or DiagramRefreshBehavior.refresh())?

Michael
Re: How to directedit text in customfeature? [message #1778992 is a reply to message #1778982] Wed, 27 December 2017 19:38 Go to previous message
Eclipse UserFriend
Thanks. I can do it by adding the refresh method.
getDiagramBehavior().refresh();
Previous Topic:How to prevent the selection of Shape
Next Topic:Can I draw a line rather than a connection?
Goto Forum:
  


Current Time: Tue Apr 22 16:50:10 EDT 2025

Powered by FUDForum. Page generated in 0.02975 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top