Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » beforeEditorActivated: Never double-click
beforeEditorActivated: Never double-click [message #902448] Fri, 17 August 2012 15:54
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
[Using Eclipse 3.7.2]

Has someone successfully used
ColumnViewerEditorActivationListener.beforeEditorActivated to detect
whether ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
is set for a jface TableViewer?

I'm using the default ColumnViewerEditorActivationStrategy (not setting
my own one), but I have registered an
ColumnViewerEditorActivationListener for some specific columns. What I
want to do is to disable editing for /specific columns/ unless a
double-click event occurs. Astonishingly the TableViewer always sends
single-click events, which was easy to find out when attempting to break
within this function:

protected void hookEditingSupport(Control control) {
// Needed for backwards comp with AbstractTreeViewer and TableTreeViewer
// who are not hooked this way others may already overwrite and provide
// their own impl
if (viewerEditor != null) {
control.addMouseListener(new MouseAdapter() {
public void mouseDown(MouseEvent e) {
// Workaround for bug 185817
if (e.count != 2) {
handleMouseDown(e);
}
}

public void mouseDoubleClick(MouseEvent e) {
handleMouseDown(e);
}
});
}
}

A counditional break-point in mouseDown never observes the situation
e.count == 2. For a corresponding standard TreeViewer I always get
e.count == 2 for comparable click-situations.

Any idea what might be wrong here?

Thanks & Greetings from Bremen,

Daniel Krügler
Previous Topic:WorkspaceModifyOperation does not generate the events
Next Topic:License manager
Goto Forum:
  


Current Time: Tue Sep 23 12:31:46 GMT 2014

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

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