Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » find all references to virtual method(how to find all possible places from which a given method may be called)
find all references to virtual method [message #1017145] Sat, 09 March 2013 21:16 Go to next message
Ilya Shlyakhter is currently offline Ilya ShlyakhterFriend
Messages: 1
Registered: March 2013
Junior Member
The "Find references" command for a Java method finds only places where this method is explicitly called -- not those where it may be called through an interface as a virtual method. Is there a command to find all possible invocations of a given method in the codebase? I understand that there will be some false positives, but I want to make sure no possible invocation is missed.


Re: find all references to virtual method [message #1017797 is a reply to message #1017145] Tue, 12 March 2013 15:00 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 450
Registered: April 2010
Location: Nantes (France)
Senior Member


With the "Ctrl+Shift+g" shortcut you have access to the "Find References" action, what you are looking for is the "Call Hierarchy" of a specific method. Select your method and use the shortcut "Ctrl+Alt+h". It will open the call hierarchy view where you can easily navigate your code to see all calls to your method as you can see it in the following screenshot.

For more tips and tricks on the Eclipse Java Development Tools, have a look at the various article that I have written here.


Stephane Begaudeau, Obeo

Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: | Eclipse Java Development Tools Tips and Tricks

[Updated on: Tue, 12 March 2013 15:01]

Report message to a moderator

Previous Topic:Doubts
Next Topic:Unable to configure Apache Tomcat 7.0.35 in eclipse JEE ide
Goto Forum:

Current Time: Mon Jun 18 17:23:33 GMT 2018

Powered by FUDForum. Page generated in 0.01484 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top