I had to get obsessed with keyboard shortcuts when using IDEA.
Apparently some of that must have rubbed off, because
lately I've been looking for shortcuts to methods and classes in Eclipse 3.0.

There are two traversal shortcuts I use all the time: Ctrl-O and Ctrl-T.

Ctrl-O shows the methods of the class in the current editor in a popup.
Hit Ctrl-O when the popup is up, and you'll see all the inherited
methods as well. This is incredibly useful, as it allows me to bounce
between methods even when I'm not sure which class is implementing
which method.

Ctrl-T shows the type hierarchy of a selected type in a popup. This is the
complement to Ctrl-O. When I'm sure of what
interface I'm looking at, but I really want to pick a particular implementation
and want to go trawling through that
implementation for a bit, Ctrl-T will show me all the subclasses or
implementors for that type.

There is a third option which I haven't used much. Ctrl-F3 shows the
methods of a selected type in a popup. I can see how this can be useful,
but in practice I have a pretty good idea of which methods are attached
 to which classes and Ctrl-Space fills most of my needs there.

However, I have been missing a couple of things. These are the shortcuts
I just found recently, and are very good for hitting up random files:

Ctrl-E shows a popup list of all the open files.
Ctrl-Shift-T creates a dialog box that you can use to navigate to any class.
Ctrl-Shift-R creates a dialog box that shows any resource in the project
(basically any file.)
Alternately, there's an Eclipse plugin called GotoFile which seems to behave
a little more "IDEAish".

Finally, I found a plugin which actually integrates Eclipse with Windows!
Eclipse Platform Extensions is actually functional and useful, although
you wouldn't guess it by looking at the website. Although it says that
it provides a "System GC" functionality, it actually does far more,
like provide a "Open in Windows Explorer" and
"Open Command Window here" dialog to the Package Explorer.

版权所有 罗明
posted on 2006-02-16 14:09 罗明 阅读(305) 评论(0)  编辑  收藏 所属分类: Eclipse