Class JavaCompilationParticipant


public class JavaCompilationParticipant extends CompilationParticipant
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
  • Constructor Details

    • JavaCompilationParticipant

      public JavaCompilationParticipant()
  • Method Details

    • holdOperation

      public static void holdOperation(String what)
      Holds an operation during startup...
    • isActive

      public boolean isActive(IJavaProject project)
      Returns whether this participant is active for a given project.
      Overrides:
      isActive in class CompilationParticipant
      Parameters:
      project - The project to participate in.
      Returns:
      true, participant is active for the given project.
    • cleanStarting

      public void cleanStarting(IJavaProject project)
      Notifies this participant that a clean is about to start and provides it the opportunity to delete generated source files.
      Overrides:
      cleanStarting in class CompilationParticipant
      Parameters:
      project - The project about to be cleaned.
    • aboutToBuild

      public 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. Additional source folders should be marked as optional so the project can be built when the folders do not exist.
      Overrides:
      aboutToBuild in class CompilationParticipant
      Parameters:
      project - The project about to build.
      Returns:
      READY_FOR_BUILD or NEEDS_FULL_BUILD.
    • buildStarting

      public 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.

      When isBatchBuild is true, then files contains all source files in the project.

      Overrides:
      buildStarting in class CompilationParticipant
      Parameters:
      files - An array of BuildContext.
      isBatch - Identifies when the build is a batch build.
    • buildFinished

      public void buildFinished(IJavaProject project)
      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 class CompilationParticipant
      Parameters:
      project - The project about to build.
    • reconcile

      public void reconcile(ReconcileContext context)
      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 class CompilationParticipant
      Parameters:
      context - The reconcile context to act on.
    • isAnnotationProcessor

      public boolean isAnnotationProcessor()
      Returns whether this participant is interested in only Annotations.
      Overrides:
      isAnnotationProcessor in class CompilationParticipant
      Returns:
      Whether this participant is interested in only Annotations, i.e. false = interested in more than just Annotations.