Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to search all references of a method ???
How to search all references of a method ??? [message #1797856] Wed, 07 November 2018 14:13 Go to next message
Eclipse UserFriend
I want to know the principle of finding the references of an ASTNode. I find a class in org.eclipse.jdt.ui
named LinkedNodeFinder.

public static SimpleName[] findByBinding(ASTNode root, IBinding binding) {
ArrayList<SimpleName> res= new ArrayList<>();
BindingFinder nodeFinder= new BindingFinder(binding, res);
return res.toArray(new SimpleName[res.size()]);

The code use visitor pattern to check each binding within root node. However, I am confused how to find all references
in a whole project? Check the target binding for each CompilationUnit?? Where can I find relative code or anyone give me
some tips?

[Updated on: Thu, 08 November 2018 19:33] by Moderator

Report message to a moderator

Re: How to search all references of a method ??? [message #1826884 is a reply to message #1797856] Mon, 04 May 2020 01:39 Go to previous message
nemoo pinky is currently offline nemoo pinkyFriend
Messages: 1
Registered: May 2020
Junior Member
Using the "Search Navigator" it's possible to search for symbol references within a project or workspace. Click on the little magnifying glass icon in the search box to "Show Find Options", and then select the Style: Symbol References.
Previous Topic:JDT Core code assist
Next Topic:make detail formatter code accessible from JDT
Goto Forum:

Current Time: Wed May 19 02:57:07 GMT 2021

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

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

Back to the top