Note that there are some explanatory texts on larger screens.

plurals
  1. POFind references of an Interface across the workspace programatically
    text
    copied!<p>Just wondering which tool / approach can solve the following issue easily / with less effort? The need is to invoke via ANT script.</p> <p>The eclipse workspace has a couple of projects, say projectA - projectO (15 in number). Most of them are Java Projects. The point here I need to gather some data without using the eclipse IDE, rather through programmatically.</p> <p>In projectA, which is a java project, has an Interface, say InterFaceA, which is being implemented in various other projects.</p> <p>The point is I need to list out all the classes from all the 15 projects which have implemented the InterfaceA.</p> <p>I came across couple of tools, like extending the Javadoc, eclipse AST, javaCC, ANTLR, but not finding a readymade solution.</p> <p>Thought of below approaches, but finding it hard to implement.</p> <ul> <li>Find out all the variables declared, field, method level, i.e. throughout the java file / class and find out their type and among them find out the class that implements the InterfaceA.</li> <li>Do something like eclipse find references in the whole workspace for the interfaceA, but through code? Would appreciate if I get the source how eclipse does that so fast.</li> </ul> <p>Can I request for a direct solution, may be using eclipse AST to get this done in a nice and intuitive manner?</p> <p>P.S.: The existing code isn't neatly maintained. So, the possibilities are like the interfaceA may NOT have been declared with an instance variable, but just used as a local variable just before it's being used and so on. Plus there are many inner classes, etc.</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload