Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » DirectEdit with doubleckick
DirectEdit with doubleckick [message #930387] Tue, 02 October 2012 09:13 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 193
Registered: October 2010
Senior Member
Hi.

Which would be the easiest way to implement direct edit with doubleclick.

I've already directeditfeature. Can I somehow, reuse that in TooBehaviourFeature#getDoubleClickFeature(IDoubleClickContext context).

Thanks in advance
Rui
Re: DirectEdit with doubleckick [message #933716 is a reply to message #930387] Fri, 05 October 2012 09:19 Go to previous message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 64
Registered: July 2009
Member
Hello Rui,

you can create a Custom Feature, return the same getDoubleClickFeature(IDoubleClickContext context) method.

you can place the below code in execute method of the custom feature,then it automatically calls direct editing feature.

IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
directEditingInfo.setPictogramElement(pe);
directEditingInfo.setGraphicsAlgorithm(pe.getGraphicsAlgorithm());
directEditingInfo.setActive(true);
getFeatureProvider().getDiagramTypeProvider().getDiagramEditor().refresh();


Regards,
Raghava Rao
Previous Topic:Remove align and match width buttons from coolbar
Next Topic:How Can I register Selection and Key Listeners for a shape
Goto Forum:
  


Current Time: Thu Nov 20 23:18:48 GMT 2014

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

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