Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » binding to mouse input
binding to mouse input [message #765699] Wed, 14 December 2011 14:46 Go to next message
valentin Mising name is currently offline valentin Mising nameFriend
Messages: 38
Registered: December 2011
Member
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 11:39 Go to previous messageGo to next message
valentin Mising name is currently offline valentin Mising nameFriend
Messages: 38
Registered: December 2011
Member
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 17:58]

Report message to a moderator

Re: binding to mouse input [message #771857 is a reply to message #765699] Wed, 28 December 2011 11:12 Go to previous message
valentin Mising name is currently offline valentin Mising nameFriend
Messages: 38
Registered: December 2011
Member
No Message Body

[Updated on: Wed, 28 December 2011 11:12]

Report message to a moderator

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


Current Time: Thu Apr 25 00:05:14 GMT 2024

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

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

Back to the top