Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Programmatically find references to a method or constant?(How to programmatically find references to a method or constant?)
Programmatically find references to a method or constant? [message #511390] Mon, 01 February 2010 09:00 Go to next message
Eclipse UserFriend
Is there a way for me to programmatically find references to a method or constant?

For example, in Eclipse you can right-click on a class or method or a constant, and choose 'References'. Eclipse will then search out and give you all the references to the selected thing.

I want to do this programmatically via a Junit so I can start finding unused constants/methods in our 10 year old project.

Please point me in the right direction.

Thanks,
Re: Programmatically find references to a method or constant? [message #511414 is a reply to message #511390] Mon, 01 February 2010 09:52 Go to previous message
Eclipse UserFriend
Mike wrote:
> Is there a way for me to programmatically find references to a method
> or constant?
>
> For example, in Eclipse you can right-click on a class or method or a
> constant, and choose 'References'. Eclipse will then search out and
> give you all the references to the selected thing.
>
> I want to do this programmatically via a Junit so I can start finding
> unused constants/methods in our 10 year old project.
See org.eclipse.jdt.core.search.SearchEngine but note that it only finds
references to constants defined in source.

Dani
>
> Please point me in the right direction.
>
> Thanks,
>
Previous Topic:Tweak automatic workspace building possible?
Next Topic:Can't debug with Eclipse
Goto Forum:
  


Current Time: Wed Mar 26 05:16:34 EDT 2025

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

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

Back to the top