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 05:13 Go to next message
Rui Domingues is currently offline Rui Domingues
Messages: 186
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 05:19 Go to previous message
Raghava Rao is currently offline Raghava Rao
Messages: 62
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 Jul 31 11:46:16 EDT 2014

Powered by FUDForum. Page generated in 0.01929 seconds