public abstract class CompilationParticipant extends Object
Clients wishing to participate in the compilation process must suclass this class, and implement
isActive(IJavaProject)
, aboutToBuild(IJavaProject)
,
reconcile(ReconcileContext)
, etc.
This class is intended to be subclassed by clients.
Modifier and Type | Field and Description |
---|---|
static int |
NEEDS_FULL_BUILD |
static int |
READY_FOR_BUILD |
Constructor and Description |
---|
CompilationParticipant() |
Modifier and Type | Method and Description |
---|---|
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 |
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.
|
public static int READY_FOR_BUILD
public static int NEEDS_FULL_BUILD
public int aboutToBuild(IJavaProject project)
Default is to return READY_FOR_BUILD
.
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 inpublic 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 onCopyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.