|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.compiler.CompilationParticipant
public abstract class CompilationParticipant
A compilation participant is notified of events occuring during the compilation process. The compilation process not only involves generating .class files (i.e. building), it also involves cleaning the output directory, reconciling a working copy, etc. So the notified events are the result of a build action, a clean action, a reconcile operation (for a working copy), etc.
Code that participates in the build should in general be implemented with a separate Builder, rather than a CompilationParticipant. It is only necessary to use a CompilationParticipant if the build step needs to interact with the Java build, for instance by creating additional Java source files that must themselves in turn be compiled.
Clients wishing to participate in the compilation process must subclass this class, and implement
isActive(IJavaProject)
, aboutToBuild(IJavaProject)
,
reconcile(ReconcileContext)
, etc.
This class is intended to be subclassed by clients.
Field Summary | |
---|---|
static int |
NEEDS_FULL_BUILD
|
static int |
READY_FOR_BUILD
|
Constructor Summary | |
---|---|
CompilationParticipant()
|
Method Summary | |
---|---|
int |
aboutToBuild(IJavaProject project)
Notifies this participant that a build is about to start and provides it the opportunity to create missing source folders for generated source files. |
void |
buildFinished(IJavaProject project)
Notifies this participant that a build has finished for the project. |
void |
buildStarting(BuildContext[] files,
boolean isBatch)
Notifies this participant that a compile operation is about to start and provides it the opportunity to generate source files based on the source files about to be compiled. |
void |
cleanStarting(IJavaProject project)
Notifies this participant that a clean is about to start and provides it the opportunity to delete generated source files. |
boolean |
isActive(IJavaProject project)
Returns whether this participant is active for a given project. |
boolean |
isAnnotationProcessor()
Returns whether this participant is interested in only Annotations. |
void |
processAnnotations(BuildContext[] files)
Notifies this participant that a compile operation has found source files using Annotations. |
void |
reconcile(ReconcileContext context)
Notifies this participant that a reconcile operation is happening. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int READY_FOR_BUILD
public static int NEEDS_FULL_BUILD
Constructor Detail |
---|
public CompilationParticipant()
Method Detail |
---|
public int aboutToBuild(IJavaProject project)
Default is to return READY_FOR_BUILD
.
project
- the project about to build
buildFinished(IJavaProject project)
public void buildFinished(IJavaProject project)
project
- the project about to buildpublic void buildStarting(BuildContext[] files, boolean isBatch)
files
- is an array of BuildContextisBatch
- identifies when the build is a batch buildpublic void cleanStarting(IJavaProject project)
project
- the project about to be cleanedpublic boolean isActive(IJavaProject project)
Default is to return false
.
For efficiency, participants that are not interested in the
given project should return false
for that project.
project
- the project to participate in
public boolean isAnnotationProcessor()
Default is to return false
.
public void processAnnotations(BuildContext[] files)
files
- is an array of BuildContextpublic void reconcile(ReconcileContext context)
Note that a participant should not modify the buffer of the working copy that is being reconciled.
Default is to do nothing.
context
- the reconcile context to act on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |