Extension SDK 10.1.2

oracle.ide.compiler
Class Compiler

java.lang.Object
  extended byoracle.ide.compiler.Compiler
Direct Known Subclasses:
JCompiler

public abstract class Compiler
extends java.lang.Object

The Compiler interface provides the API to drive the actual build system.


Constructor Summary
Compiler()
           
 
Method Summary
abstract  boolean addBuildSystemListener(BuildSystemListener bsl)
          addBuildSystemListener method adds a build system listener instance implementation to the build system, see BuildSystemListener for more information.
abstract  boolean addCopyListener(CopyListener cl)
          addCopyListener method adds a copy listener instance implementation to the build system, see CopyListener for more information.
abstract  boolean compile(Context context, boolean rebuild, boolean wait)
          compile -- compile the context (may be project, workspace, file, ...) and return true if they are no errors else false.
abstract  boolean compile(Context context, boolean rebuild, boolean wait, boolean save)
           
abstract  void compile(Context context, boolean rebuild, PostBuilder postBuild, boolean save)
          compile -- compile the context (may be project, workspace, file, ...) on a background thread and call the specified worker object once compilation is completed with build successful or not as the postBuild method input parameter.
static Compiler getCompiler()
          Returns the active Compiler instance.
abstract  LogPage getErrorLog()
           
abstract  LogPage getOutputLog()
          get{Output|Error}Log gets the default compiler output/error log.
abstract  boolean isBusy(Context context)
           
abstract  boolean lock(Context context, boolean wait)
          lock/unlock the context (may be project, workspace, file, ...) and return true if the opeartion was successful.
abstract  void logOutMsg(java.lang.String msg)
          logOutMsg log a message on the default compiler output log
abstract  boolean removeBuildSystemListener(BuildSystemListener bsl)
          removeBuildSystemListener method removes a build system listener instance implementation from the build system, see BuildSystemListener for more information.
abstract  boolean removeCopyListener(CopyListener cl)
          removeCopyListener method removes a copy listener instance implementation from the build system, see CopyListener for more information.
static void setCompiler(Compiler compiler)
          Sets the active Compiler instance.
abstract  boolean unlock(Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compiler

public Compiler()
Method Detail

getCompiler

public static Compiler getCompiler()
Returns the active Compiler instance. This instance is usually created and initialized at startup.


setCompiler

public static void setCompiler(Compiler compiler)
Sets the active Compiler instance. This method is usually called only at startup.


compile

public abstract boolean compile(Context context,
                                boolean rebuild,
                                boolean wait)
compile -- compile the context (may be project, workspace, file, ...) and return true if they are no errors else false. If wait is false, the method will not wait for the compile to terminate and the return value is undefined.

Parameters:
context - -- workspace, project or file to compile
rebuild - -- if true, unconditionally rebuild sources
wait - -- if true, wait for compile to terminate

compile

public abstract boolean compile(Context context,
                                boolean rebuild,
                                boolean wait,
                                boolean save)

compile

public abstract void compile(Context context,
                             boolean rebuild,
                             PostBuilder postBuild,
                             boolean save)
compile -- compile the context (may be project, workspace, file, ...) on a background thread and call the specified worker object once compilation is completed with build successful or not as the postBuild method input parameter.

Parameters:
context - -- workspace, project or file to compile
rebuild - -- if true, unconditionally rebuild sources
save - -- if true, will save files before compiling if the IDE setting is enabled; if false, will never save files, regardless of the IDE setting. The compile method without the save parameter will never save files.

isBusy

public abstract boolean isBusy(Context context)

lock

public abstract boolean lock(Context context,
                             boolean wait)
lock/unlock the context (may be project, workspace, file, ...) and return true if the opeartion was successful. If wait is false, the method will not wait for the context to be locked and return false if the context can't be lock else if wait is true, the context compilation will complete before returning true

Parameters:
context - -- workspace, project or file to lock/unlock
wait - -- if true, wait for compilation to terminate
Returns:
true if successful else false

unlock

public abstract boolean unlock(Context context)

addBuildSystemListener

public abstract boolean addBuildSystemListener(BuildSystemListener bsl)
addBuildSystemListener method adds a build system listener instance implementation to the build system, see BuildSystemListener for more information.

Parameters:
bsl - build system listener to add
Returns:
true if properly added, false if the specified bsl is already been added before

removeBuildSystemListener

public abstract boolean removeBuildSystemListener(BuildSystemListener bsl)
removeBuildSystemListener method removes a build system listener instance implementation from the build system, see BuildSystemListener for more information.

Parameters:
bsl - build system listener to remove
Returns:
true if properly removed, false if the specified bsl is not found

addCopyListener

public abstract boolean addCopyListener(CopyListener cl)
addCopyListener method adds a copy listener instance implementation to the build system, see CopyListener for more information.

Parameters:
cl - copy listener to add
Returns:
true if properly added, false if the specified cl is already been added before

removeCopyListener

public abstract boolean removeCopyListener(CopyListener cl)
removeCopyListener method removes a copy listener instance implementation from the build system, see CopyListener for more information.

Parameters:
cl - copy listener to remove
Returns:
true if properly removed, false if the specified cl is not found

getOutputLog

public abstract LogPage getOutputLog()
get{Output|Error}Log gets the default compiler output/error log.

Returns:
the default LogPage

getErrorLog

public abstract LogPage getErrorLog()

logOutMsg

public abstract void logOutMsg(java.lang.String msg)
logOutMsg log a message on the default compiler output log

Parameters:
msg - -- msg to print on the log

Extension SDK

 

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