Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

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: all methods of this interface 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 call.


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.
 void cleanFinished(Context context)
          This method is called just before actually finishing a clean 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.
 void cleanWillStart(Context context)
          This method is called just before actually starting a clean 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.
 

Method Detail

buildWillStart

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.

Parameters:
context - -- context to build
Throws:
BuildSystemVetoException - if thrown the build will not start, any remaining listeners will not receive their buildWillStart callback, and any listeners that already received the buildWillStart callback before this exception was thrown, will receive a buildFinished callback. The build system will return to the caller with one additional error with the text of the error coming from the BuildSystemVetoException instance.

buildFinished

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

Parameters:
errorCount - -- # of errors for this build
warningCount - -- # of warnings for this build
infoCount - -- # of informational messages for this build
Throws:
BuildSystemVetoException - if thrown the build system will return to the caller with one additional error with the text of the error coming from the BuildSystemVetoException instance. Any remaining listeners will still receive their buidFinished callbacks after this exception is thrown

cleanWillStart

void cleanWillStart(Context context)
                    throws BuildSystemVetoException
This method is called just before actually starting a clean 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.

Parameters:
context - -- context to clean
Throws:
BuildSystemVetoException - if thrown the clean will not start, any remaining listeners will not receive their cleanWillStart callback, and any listeners that already received the cleanWillStart callback before this exception was thrown, will receive a cleanFinished callback. The build system will return to the caller with one additional error with the text of the error coming from the BuildSystemVetoException instance.

cleanFinished

void cleanFinished(Context context)
                   throws BuildSystemVetoException
This method is called just before actually finishing a clean 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.

Parameters:
context - -- context that has just been cleaned
Throws:
BuildSystemVetoException - if thrown the build system will return to the caller with one additional error with the text of the error coming from the BuildSystemVetoException instance. Any remaining listeners will still receive their cleanFinished callbacks after this exception is thrown

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.