Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » tableviewer double-click opens editor and clicks button on new editor
tableviewer double-click opens editor and clicks button on new editor [message #1504271] Tue, 09 December 2014 00:38 Go to next message
Eclipse UserFriend
I'm having what feels like should be a fairly simple problem to resolve, but I can't seem to find exactly how to resolve it. I'm using Eclipse 3.4. But I have an RCP with an editor with a TableViewer. I add a double-click listener to that table. Within that double-click listener, I call a method that opens a new editor based upon the row that was clicked on. The new editor opens up just great, but it registers a click on that new editor right under where the mouse is. So frequently that click happens to fall on a button and my users have to cancel out of whatever dialog that launched.

Here's a really abbreviated code snippet:

viewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event)
{
// input gets initialized
IEditorPart part = this.getSite().getPage().openEditor(input, AnotherEditor.ID);
}
});


Any help or ideas would be greatly appreciated.
Thanks,
Matt
Re: tableviewer double-click opens editor and clicks button on new editor [message #1505949 is a reply to message #1504271] Wed, 10 December 2014 07:49 Go to previous messageGo to next message
Eclipse UserFriend
Ok, I think I figured out my problem. The initial double-click on my tableviewer fires off as soon as the mouse is clicked down. While the mouse is still down, the new editor opens and a button frequently is right where my mouse is. I typically tie my Button actions to the mouseUp event as that seems more consistent with other Windows applications. But because the new editor with the buttons pops up so fast and the double-click is fired at the time the 2nd click is pressed down, it results in the 2nd clicks mouse up firing off the new editor's buttons. So if I just change my buttons to use to the mouseDown event, then they won't fire off.
Re: tableviewer double-click opens editor and clicks button on new editor [message #1706941 is a reply to message #1505949] Tue, 01 September 2015 02:27 Go to previous message
Eclipse UserFriend
HI,
I am facing the similar issue.

Scenerio:
New dialog is opened when the user double clicks on the row of the table viewer.
Mouse up event is dispatched to ExpandBar in the new dialog. Expand bar expands/collapse on mouse up event (this cannot be changed).
How to suppress mouse up event ?
Or any other solution?
Previous Topic:How do I change command's name show in toolbar programmatically in rcp?
Next Topic:Create a common delta pack of an RCP application that runs in all the OS
Goto Forum:
  


Current Time: Mon Jul 14 13:49:46 EDT 2025

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

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

Back to the top