oracle.ide.compiler
Interface BuildSystemListener
- All Superinterfaces:
- java.util.EventListener
- public interface BuildSystemListener
- extends java.util.EventListener
BuildSystemListener instances are objects created by BuildSystem clients and used by the BuildSystem as a callback mechanism to allow clients to integrate pre-build & post-build operations. A BuildSystem client would write a BuildSystemListener implementation and plug it in the build system using JCompiler.addBuildSystemListener(). The BuildSystem allows you to register one or more listener objects. The method buildWillStart and buildFinished would be called as specified below. If more than one listener is registered, each listener would be called in the order the've been registered. The ordering is not customizable. Each listeners are called in sequential fashion until one of them throws an exception in which case, others after that are not being called anymore. BuildSystem client may remove listener at anytime using JCompiler. removeBuildSystemListener() API. Listeners that are added or removed during the notification methods (buildWillStart() and buildFinished()) will not be notified during that notification period. Therefore, clients are discouraged from adding or removing build listeners while a build is in progress. Warning: buildWillStart() and buildFinishedMethod() will be invoked from a NON-Swing UI thread. Any Swing code perfomed by one of those callbacks will have to be performed using a SwingUtilities.{InvokeAndWait,InvokeLater}() system calls.
Method Summary |
void |
buildFinished(int errorCount, int warningCount, int infoCount)
This method is called right after the build is complete and just before returning to the caller. |
void |
buildWillStart(Context context)
This method is called just before actually starting a build for the following context, context may be one or more workspace(s), one or more project(s), or one or more files within a project. |
buildWillStart
public void buildWillStart(Context context)
throws BuildSystemVetoException
- This method is called just before actually starting a build for the following context, context may be one or more workspace(s), one or more project(s), or one or more files within a project. The method implementation may decide to throw a BuildSystemVetoException to prevent the build from being started, if the exception is thrown, the build system will return to the caller with one error with the text of the error coming from the BuildSystemVetoException instance.
-
- Parameters:
context
- -- context to build
- Throws:
BuildSystemVetoException
buildFinished
public void buildFinished(int errorCount,
int warningCount,
int infoCount)
throws BuildSystemVetoException
- This method is called right after the build is complete and just before returning to the caller. The input paramters are the # of errors/warnings & informational messages. The method implementation may decide to generate additional messages (errors/warnings/infos). The method implementation may also decide to throw a BuildSystemVetoException. If the exception is thrown, the build system will return to the caller with one additionnal error with the text of the error coming from the BuildSystemVetoException instance.
-
- Parameters:
errorCount
- -- # of errors for this build
warningCount
- -- # of warnings for this build
infoCount
- -- # of informational messages for this build
- Throws:
BuildSystemVetoException
Copyright © 1997, 2004, Oracle. All rights reserved.