Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328933 - Implementing Double click in graphiti
Summary: Implementing Double click in graphiti
Status: CLOSED DUPLICATE of bug 340708
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-28 10:18 EDT by Ashwani Kr Sharma CLA
Modified: 2011-03-23 05:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***