Extension SDK 10.1.2

oracle.jdeveloper.compiler
Class JCompiler

java.lang.Object
  extended byoracle.ide.compiler.Compiler
      extended byoracle.jdeveloper.compiler.JCompiler
All Implemented Interfaces:
Addin, ContextMenuListener, Controller, Module, Observer

public class JCompiler
extends Compiler
implements Controller, Addin, ContextMenuListener, Observer

The JCompiler manages compiling.


Field Summary
static java.lang.String BUILD_PROJECT_CMD
           
static int BUILD_PROJECT_CMD_ID
           
static int BUILD_SELECTED_CMD_ID
           
static java.lang.String BUILD_WORKSPACE_CMD
           
static int BUILD_WORKSPACE_CMD_ID
           
static java.lang.String CANCEL_BUILD_CMD
           
static int CANCEL_BUILD_CMD_ID
           
static java.lang.String COMPILER_CONFIG_DATA_KEY
           
static java.lang.String MAKE_FOLDER_CMD
           
static int MAKE_FOLDER_CMD_ID
           
static java.lang.String MAKE_PROJECT_CMD
           
static int MAKE_PROJECT_CMD_ID
           
static java.lang.String MAKE_SELECTED_CMD
           
static int MAKE_SELECTED_CMD_ID
           
static java.lang.String MAKE_WORKSPACE_CMD
           
static int MAKE_WORKSPACE_CMD_ID
           
 
Constructor Summary
JCompiler()
          Constructor.
 
Method Summary
 boolean addBuildSystemListener(BuildSystemListener bsl)
          addBuildSystemListener method adds a build system listener instance implementation to the build system, see BuildSystemListener for more information.
 boolean addCopyListener(CopyListener cl)
          addCopyListener method adds a copy listener instance implementation to the build system, see CopyListener for more information.
 boolean canShutdown()
          This method is called by the IDE to confirm that the ide can shutdown
 boolean compile(Context context, boolean rebuild, boolean wait)
          Will compile the specified node.
 boolean compile(Context context, boolean rebuild, boolean wait, boolean save)
           
 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.
 boolean forceRebuildOnProject(JProject prj)
           
 LogPage getErrorLog()
           
static JCompiler getInstance()
          The Debugger folder is a singleton class.
 LogPage getOutputLog()
          get{Output|Error}Log gets the default compiler output/error log.
 java.net.URL getURLFromClassName(Context context, java.lang.String className)
           
 boolean handleDefaultAction(Context context)
          Called when the user double clicks on an item that has a popup menu
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
 float ideVersion()
          This method is called to determine the ide version number for which this feature was implemented.
 void initialize()
          This method is called by the IDE to request that the feature be initialize
 boolean isBusy(Context context)
          Will return true if the build system is already busy building and not currently available.
 boolean lock(Context context, boolean wait)
          lock/unlock the context (may be project, workspace, file, ...) and return true if the opeartion was successful.
 void logOutMsg(java.lang.String msg)
          logOutMsg log a message on the default compiler output log
 void poppingDown(ContextMenu popup)
           
 void poppingUp(ContextMenu popup)
          Called just before the context menu is popping up.
 void registerNavigable(Navigable navigable)
          Registers a Navigable as a child of the Compiler Navigable in the Project Settings Dialog.
 void registerTranslator(Translator translator)
          Entry point to register compiler translators
 boolean removeBuildSystemListener(BuildSystemListener bsl)
          removeBuildSystemListener method removes a build system listener instance implementation from the build system, see BuildSystemListener for more information.
 boolean removeCopyListener(CopyListener cl)
          removeCopyListener method removes a copy listener instance implementation from the build system, see CopyListener for more information.
 void shutdown()
          This method is called by the IDE to request that the feature release any resources held before the ide shuts down..
 void stopBuild(Context context)
          Will return true if the build system is already busy building and not currently available.
 boolean unlock(Context context)
           
 void unregisterTranslator(Translator translator)
          Entry point to remove compiler translators
 boolean update(IdeAction action, Context context)
          This method is called when the availability of a specific command needs to be determined.
 void update(java.lang.Object observed, UpdateMessage change)
          Notification message.
 float version()
          This method is called to determine the feature version number, i.e.
 
Methods inherited from class oracle.ide.compiler.Compiler
getCompiler, setCompiler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAKE_SELECTED_CMD_ID

public static final int MAKE_SELECTED_CMD_ID

MAKE_SELECTED_CMD

public static final java.lang.String MAKE_SELECTED_CMD
See Also:
Constant Field Values

BUILD_SELECTED_CMD_ID

public static final int BUILD_SELECTED_CMD_ID

MAKE_PROJECT_CMD_ID

public static final int MAKE_PROJECT_CMD_ID

MAKE_PROJECT_CMD

public static final java.lang.String MAKE_PROJECT_CMD
See Also:
Constant Field Values

BUILD_PROJECT_CMD_ID

public static final int BUILD_PROJECT_CMD_ID

BUILD_PROJECT_CMD

public static final java.lang.String BUILD_PROJECT_CMD
See Also:
Constant Field Values

MAKE_WORKSPACE_CMD_ID

public static final int MAKE_WORKSPACE_CMD_ID

MAKE_WORKSPACE_CMD

public static final java.lang.String MAKE_WORKSPACE_CMD
See Also:
Constant Field Values

BUILD_WORKSPACE_CMD_ID

public static final int BUILD_WORKSPACE_CMD_ID

BUILD_WORKSPACE_CMD

public static final java.lang.String BUILD_WORKSPACE_CMD
See Also:
Constant Field Values

MAKE_FOLDER_CMD_ID

public static final int MAKE_FOLDER_CMD_ID

MAKE_FOLDER_CMD

public static final java.lang.String MAKE_FOLDER_CMD
See Also:
Constant Field Values

CANCEL_BUILD_CMD_ID

public static final int CANCEL_BUILD_CMD_ID

CANCEL_BUILD_CMD

public static final java.lang.String CANCEL_BUILD_CMD
See Also:
Constant Field Values

COMPILER_CONFIG_DATA_KEY

public static final java.lang.String COMPILER_CONFIG_DATA_KEY
Constructor Detail

JCompiler

public JCompiler()
Constructor.

Method Detail

getInstance

public static JCompiler getInstance()
The Debugger folder is a singleton class. This method gets this folder's single instance.

Returns:
the Debugger folder single instance.

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
This method is called when the availability of a specific command needs to be determined.

Specified by:
update in interface Controller
Parameters:
action - the action associated with this command. Call the action's setEnabled method to set the appropriate command sensitivity.
context - the current context
Returns:
true if the controller handles the specified command.

update

public void update(java.lang.Object observed,
                   UpdateMessage change)
Description copied from interface: Observer
Notification message. Subjects call this method when they notify their observers that the subjects state has changed.

Specified by:
update in interface Observer
Parameters:
observed - the subject whose state has changed.
change - what has changed.

forceRebuildOnProject

public boolean forceRebuildOnProject(JProject prj)

initialize

public void initialize()
This method is called by the IDE to request that the feature be initialize

Specified by:
initialize in interface Addin
See Also:
AddinManager

shutdown

public void shutdown()
This method is called by the IDE to request that the feature release any resources held before the ide shuts down..

Specified by:
shutdown in interface Addin

canShutdown

public boolean canShutdown()
This method is called by the IDE to confirm that the ide can shutdown

Specified by:
canShutdown in interface Addin

version

public float version()
This method is called to determine the feature version number, i.e. 1.0

Specified by:
version in interface Addin
Returns:
the feature version number.

ideVersion

public float ideVersion()
This method is called to determine the ide version number for which this feature was implemented.

Specified by:
ideVersion in interface Addin
Returns:
the ide version number, i.e. 5.0 .

poppingUp

public void poppingUp(ContextMenu popup)
Called just before the context menu is popping up.

Specified by:
poppingUp in interface ContextMenuListener

poppingDown

public void poppingDown(ContextMenu popup)
Specified by:
poppingDown in interface ContextMenuListener

handleDefaultAction

public boolean handleDefaultAction(Context context)
Called when the user double clicks on an item that has a popup menu

Specified by:
handleDefaultAction in interface ContextMenuListener
Parameters:
context - the current context

isBusy

public boolean isBusy(Context context)
Will return true if the build system is already busy building and not currently available.

Specified by:
isBusy in class Compiler

stopBuild

public void stopBuild(Context context)
Will return true if the build system is already busy building and not currently available.


compile

public boolean compile(Context context,
                       boolean rebuild,
                       boolean wait)
Will compile the specified node.

Specified by:
compile in class Compiler
Parameters:
context - -- workspace, project or file to compile
rebuild - -- if true, unconditionally rebuild sources
wait - -- if true, wait for compile to terminate

compile

public boolean compile(Context context,
                       boolean rebuild,
                       boolean wait,
                       boolean save)
Specified by:
compile in class Compiler

compile

public void compile(Context context,
                    boolean rebuild,
                    PostBuilder postBuild,
                    boolean save)
Description copied from class: Compiler
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.

Specified by:
compile in class Compiler
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.

getURLFromClassName

public java.net.URL getURLFromClassName(Context context,
                                        java.lang.String className)

addCopyListener

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

Specified by:
addCopyListener in class Compiler
Parameters:
cl - -- copy listener to add
Returns:
true if properly added, false if the specified cl is already been added before

removeCopyListener

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

Specified by:
removeCopyListener in class Compiler
Parameters:
cl - -- copy listener to remove
Returns:
true if properly removed, false if the specified cl is not found

addBuildSystemListener

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

Specified by:
addBuildSystemListener in class Compiler
Parameters:
bsl - build system listener to add
Returns:
true if properly added, false if the specified bsl is already been added before

removeBuildSystemListener

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

Specified by:
removeBuildSystemListener in class Compiler
Parameters:
bsl - build system listener to remove
Returns:
true if properly removed, false if the specified bsl is not found

lock

public boolean lock(Context context,
                    boolean wait)
Description copied from class: Compiler
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

Specified by:
lock in class Compiler
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 boolean unlock(Context context)
Specified by:
unlock in class Compiler

getOutputLog

public LogPage getOutputLog()
Description copied from class: Compiler
get{Output|Error}Log gets the default compiler output/error log.

Specified by:
getOutputLog in class Compiler
Returns:
the default LogPage

logOutMsg

public void logOutMsg(java.lang.String msg)
Description copied from class: Compiler
logOutMsg log a message on the default compiler output log

Specified by:
logOutMsg in class Compiler
Parameters:
msg - -- msg to print on the log

getErrorLog

public LogPage getErrorLog()
Specified by:
getErrorLog in class Compiler

registerTranslator

public void registerTranslator(Translator translator)
Entry point to register compiler translators


unregisterTranslator

public void unregisterTranslator(Translator translator)
Entry point to remove compiler translators


registerNavigable

public void registerNavigable(Navigable navigable)
Registers a Navigable as a child of the Compiler Navigable in the Project Settings Dialog.

Parameters:
navigable - The child Navigable to add.

Extension SDK

 

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