Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Dependent class compilation(Is there a way to detect when dependent classes are compiled?)
Dependent class compilation [message #915798] Mon, 17 September 2012 21:18 Go to next message
Tom Ball is currently offline Tom Ball
Messages: 3
Registered: July 2009
Junior Member
Is there a way to detect when dependent classes are compiled? By dependent classes, I mean those classes that weren't specified, but get compiled because the specified classes depend on them.

We're using JDT as the front-end of a translator, and our users want the translator to have the same behavior. I don't know any sort of compiler listener interface, or some other way to be notified that a dependent class is getting compiled. Perhaps ASTParser.createASTs() returns more compilation units than the number of source files? ProgressMonitor hack, perhaps?

Any help would be appreciated,
Tom
Re: Dependent class compilation [message #920881 is a reply to message #915798] Sun, 23 September 2012 11:07 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 999
Registered: July 2009
Senior Member
If your tool is an Eclipse plug-in one option could be to register a CompilationParticipant, see:
http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.isv/reference/extension-points/org_eclipse_jdt_core_compilationParticipant.html?cp=3_1_1_4

You could then do your work in #buildStarting()
Previous Topic:Debug Perspective - Variables Detail Pane - "@xxxxxxx" string after type
Next Topic:mixing v3 and v2
Goto Forum:
  


Current Time: Thu Aug 28 23:40:27 EDT 2014

Powered by FUDForum. Page generated in 0.02823 seconds