Abdull
Abdull

Reputation: 27832

Does Eclipse have means to show me a "merge" of a Java class's full implementation?

I'm currently using a Java framework with quite long class hierarchies. When crawling through a class's code path, I have to jump back and forth between the different classes within this hierarchy.

I'm looking for a tool or Eclipse View that provides a "synthetic merge" of a class's full implementation with ALL its most concrete methods. Is there something like this?

For instance, I have to work with this class implementation hierarchy: InternalResourceViewResolver extends UrlBasedViewResolver extends AbstractCachingViewResolver.

Now when reading code within InternalResourceViewResolver, there are calls to methods of its supertypes. Browsing back and forth (using "Open Declaration" (F3) and the back button (Alt+Left) ) can get confusing: I start loosing focus and happen to mistakenly read a superclass's method implementation that actually gets overridden by the subclass I investigate.

Upvotes: 1

Views: 107

Answers (2)

les2
les2

Reputation: 14479

If you hold the SHIFT key when you hover over a method or class name, it will show you the source code it inline! You don't have to jump to it.

When I see a super.doFoo() method, I shift-hover to see what it does! If it's interesting, I CTRL+Click or either F3 to jump to the source.

Upvotes: 1

paulsm4
paulsm4

Reputation: 121649

One thing that might help is a (relatively little known) "bookmark" feature that's available in Eclipse:

http://www.luisdelarosa.com/2005/02/16/eclipse-tip-use-bookmarks-to-track-important-places-in-your-code/

Upvotes: 0

Related Questions