• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse and 3-button mice

 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pressing control while clicking on a class or object will navigate to
its declaration.

David
[ October 17, 2007: Message edited by: David Heffelfinger ]
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic