aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse and 3-button mice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse and 3-button mice" Watch "Eclipse and 3-button mice" New topic
Author

Eclipse and 3-button mice

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

One thing about IntelliJ IDEA that I really love is that the "Open Declaration" feature can be bound to middle-mouse click. So if you have a 3-button mouse, you can navigate around very quickly, one-handed, while you're reading code.

Eclipse, on the other hand, doesn't seem to have any way to bind this function (or any function) to mouse clicks, at least that I can find. Does anybody know how to do this in Eclipse?


[Jess in Action][AskingGoodQuestions]
David Heffelfinger
author
Ranch Hand

Joined: Jul 08, 2004
Posts: 176
Pressing control while clicking on a class or object will navigate to
its declaration.

David
[ October 17, 2007: Message edited by: David Heffelfinger ]

Author, <a href="http://www.packtpub.com/java-ee5-development-with-netbeans-6" target="_blank" rel="nofollow">Java EE 5 Development with NetBeans 6</a>
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I know that -- I don't want to have to press control. If I wanted to press "control", I'd use a 2-button mouse!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Ernest Friedman-Hill:
I know that -- I don't want to have to press control. If I wanted to press "control", I'd use a 2-button mouse!


Not exactly an Eclipse solution, but I once had a MS 5 button mouse. The two additional buttons where pressed by thumb; I configured them as "shift" and "control", which was quite cool...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
There are a couple options.
a) Enable hyperlink navigation (Prefs->Java->Editor->Navigation, check the box to "Support hyperlink style navigation for 'Open Declaration'"


b) Do what I do (since sometimes you want to copy/paste rather than open decl) : Double-Click the class name. Right Click->Open Declaration from the context menu. When you have no changes to undo/revert, it's the first item in the context menu that is sensitized. Maybe not a single click,
but it's very fast and you don't have to fumble with the keyboard.

c) Modify the keyboard navigation preferences, then map your third mouse button to a particular key sequence. i.e. By default, F3 opens a declaration. If you use your mouse config software to set button 3 to 'F3' for Eclipse, you've got your funcationality.


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Thanks, David; the Hyperlink-navigation preference might take a little getting used to but I think I can learn to like it.
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
Originally posted by Ernest Friedman-Hill:
Thanks, David; the Hyperlink-navigation preference might take a little getting used to but I think I can learn to like it.


Always glad to help a sheriff.

There are a few people here who like it, but not I. I find I'm fast enough w/my button fingers that it's approximately a triple-click to use the context menu method, and I really like to be able to double-click and ctrl-c to copy a single variable name, class name, etc.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Originally posted by Ernest Friedman-Hill:
One thing about IntelliJ IDEA that I really love is that the "Open Declaration" feature can be bound to middle-mouse click. So if you have a 3-button mouse, you can navigate around very quickly, one-handed, while you're reading code.


Nice. Thank you for the tip.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse and 3-button mice