Skip to main content



      Home
Home » Newcomers » Newcomers » binding to mouse input
binding to mouse input [message #765699] Wed, 14 December 2011 09:46 Go to next message
Eclipse UserFriend
The article on org.eclipse.ui.bindings says that these bindings map between "some user input and a triggered command". However, I see that all user input is reduced to keyboard. It is like there is not mouse in Eclipse universe. Nevertheless, I know that Eclipse jumps to declaration when Left button is clicked while Control is pressed. How do I do the same?
Re: binding to mouse input [message #767231 is a reply to message #765699] Sat, 17 December 2011 06:39 Go to previous messageGo to next message
Eclipse UserFriend
A response from paulweb515: Quote:
you can't.

The best you can get in the latest eclipse is the left and right mouse buttons on 5-button mice are bound to ALT+LEFT and ALT+RIGHT


I have achieved the goal by

textWidget.addMouseListener(new MouseAdapter() {

	OpenDeclarationAction openDeclaration = new OpenDeclarationAction();
			
	public void mouseDown(MouseEvent e) {
		if (e.stateMask == SWT.CTRL && e.button == 1)
			openDeclaration.run(null);
	}

});


Yet, there seems is even better option: hyperlink detectors

[Updated on: Tue, 27 December 2011 12:58] by Moderator

Re: binding to mouse input [message #771857 is a reply to message #765699] Wed, 28 December 2011 06:12 Go to previous message
Eclipse UserFriend
No Message Body

[Updated on: Wed, 28 December 2011 06:12] by Moderator

Previous Topic:(no subject)
Next Topic:ToolTip Text Not Working on Button?
Goto Forum:
  


Current Time: Wed Jul 23 17:11:38 EDT 2025

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

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

Back to the top