Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328933

Summary: Implementing Double click in graphiti
Product: [Modeling] Graphiti Reporter: Ashwani Kr Sharma <ashw.kumar>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: ashw.kumar, michael.wenz
Version: 0.7.0   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=327756
Whiteboard:

Description Ashwani Kr Sharma CLA 2010-10-28 10:18:31 EDT
Build Identifier: 

For Implementing Double click in graphiti: i extend an AbstractCustomFeature
and return it from the Toolbehavior’s getDoubleClickFeature method. But it has issues:
1) Double click got enabled only of shapes. It does not work for connections
2) I am using double click to navigate to another editor. The modeler becomes dirty on double click, because it is implemented as feature.
3) After execution of navigation, I get undo <featureName> option in context menu.
In my Feature I have overridden the method canUndo(..) and returning false there. Still get the undo action.


I can implement as following:

go directly via SWT and do the following for instance in
DiagramEditorInternal in the method initializeGraphicalViewer

getGraphicalControl().addListener(SWT.MouseDoubleClick, new Listener() {
	@Override
public void handleEvent(Event event) {
	//your code
}
});

But --------
I expected graphiti to provide these features and opening this feature request.


Reproducible: Always

Steps to Reproduce:
.
Comment 1 Michael Wenz CLA 2010-11-05 08:30:43 EDT
1) seems to be missing functionality --> feature request
2) and 3) are adressed by bugzilla 327756

Michael
Comment 2 Michael Wenz CLA 2011-03-23 05:16:33 EDT
Although this is the older bug, I close this one and leave the newer one (340708) open, because https://bugs.eclipse.org/bugs/show_bug.cgi?id=340708 already provides a patch.

*** This bug has been marked as a duplicate of bug 340708 ***