Package com.iizigo.java
Class JavaCompilationParticipant
java.lang.Object
org.eclipse.jdt.core.compiler.CompilationParticipant
com.iizigo.java.JavaCompilationParticipant
The Java compilation participant for all Java projects that could potentially be used in an IIZI Module. It is used to process the Java compiled code to check annotations, references, etc., with the IIZI Module projects and properties, and add problem markers. It is also used to feed information to the Java Manager about Java code so that it can be a part of the Refactoring engine for IIZI Modules.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class org.eclipse.jdt.core.compiler.CompilationParticipant
NEEDS_FULL_BUILD, READY_FOR_BUILD
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionint
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.static void
holdOperation
(String what) Holds an operation during startup...boolean
isActive
(IJavaProject project) Returns whether this participant is active for a given project.boolean
Returns whether this participant is interested in only Annotations.void
reconcile
(ReconcileContext context) Notifies this participant that a reconcile operation is happening.Methods inherited from class org.eclipse.jdt.core.compiler.CompilationParticipant
isPostProcessor, postProcess, processAnnotations
Constructor Details
JavaCompilationParticipant
public JavaCompilationParticipant()
Method Details
holdOperation
Holds an operation during startup...isActive
Returns whether this participant is active for a given project.- Overrides:
isActive
in classCompilationParticipant
- Parameters:
project
- The project to participate in.- Returns:
- true, participant is active for the given project.
cleanStarting
Notifies this participant that a clean is about to start and provides it the opportunity to delete generated source files.- Overrides:
cleanStarting
in classCompilationParticipant
- Parameters:
project
- The project about to be cleaned.
aboutToBuild
Notifies this participant that a build is about to start and provides it the opportunity to create missing source folders for generated source files. Additional source folders should be marked as optional so the project can be built when the folders do not exist.- Overrides:
aboutToBuild
in classCompilationParticipant
- Parameters:
project
- The project about to build.- Returns:
- READY_FOR_BUILD or NEEDS_FULL_BUILD.
buildStarting
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.When isBatchBuild is true, then files contains all source files in the project.
- Overrides:
buildStarting
in classCompilationParticipant
- Parameters:
files
- An array of BuildContext.isBatch
- Identifies when the build is a batch build.
buildFinished
Notifies this participant that a build has finished for the project.This will be sent, even if buildStarting() was not sent when no source files needed to be compiled or the build failed.
- Overrides:
buildFinished
in classCompilationParticipant
- Parameters:
project
- The project about to build.
reconcile
Notifies this participant that a reconcile operation is happening. The participant can act on this reconcile operation by using the given context. Other participant can then see the result of this participation on this context.Note that a participant should not modify the buffer of the working copy that is being reconciled.
- Overrides:
reconcile
in classCompilationParticipant
- Parameters:
context
- The reconcile context to act on.
isAnnotationProcessor
public boolean isAnnotationProcessor()Returns whether this participant is interested in only Annotations.- Overrides:
isAnnotationProcessor
in classCompilationParticipant
- Returns:
- Whether this participant is interested in only Annotations, i.e. false = interested in more than just Annotations.