views:

105

answers:

2

Is there a way to get a related file tree for files in eclipse? In other words I want to know ALL possible files changing a particular file could effect.

So if I change an image file I want to know all JSPs that reference that image and all servlets that reference that JSP and all other java classes that reference that servlet... etc. Maybe I'm shooting for the moon.

(Note: I have edited the post due to a comment below. Before I only mentioned finding references in Java files.)

A: 

Hit ctrl+shift+G to get all references to a type/method. Or open the Call Hierarchy view (Ctrl+Alt+H) to allow you to tunnel into references.

See this question for lists of useful shortcuts:


Update:

To see relationships between types, you need a dependency analysis tool, check out JDepend for Eclipse or CAP

Rich Seller
Thanks. These each work for a single method, I need a more comprehensive list that looks at all possible uses of a given class across all methods. Also, I misdirected in my question by mistake. I really want a comprehensive list for each file of any files that could be effected by changing it. So if I change an image file I want to know all JSPs that reference that image and all servlets that reference that JSP and all other java classes that reference that servlet... etc.Maybe I'm shooting for the moon.
quadelirus
You probably want to update your question to reflect that. I've added references top some dependency analysis tools, but I don't think they'll extend to JSPs (not sure though, give it a try).
Rich Seller
A: 

From http://www.allappforum.com/eclipse/eclipse_shortcuts.htm

Ctrl Shift U    Find references in file
Ctrl Shift G    Find references in workspace
Ctrl G  Find declarations in workspace
Ctrl Shift P    Navigate to matching bracket/brace
Ctrl T  Popup type hierarchy
Ctrl Shift T    Open Type
Ctrl O  Outline of current source
Ctrl F3     Outline of current cursor position
Ctrl Shift Arrow    Jump beetween methods up or down
F2  Show Javadoc
F4  Show hierarchy
Ctrl Alt H  Open call hierarchy
joe