Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.jdeveloper.runner
Class JRunProcess

java.lang.Object
  extended by oracle.ide.runner.RunProcess
      extended by oracle.jdeveloper.runner.JRunProcess
All Implemented Interfaces:
Helpable, Displayable, Element
Direct Known Subclasses:
RemoteProcess, RunningProcess

public abstract class JRunProcess
extends RunProcess

An abstract class that represents a Java process.


Field Summary
static java.lang.String ANT_FIRST_COMMAND_OPTIONS
           
static java.lang.String ANT_LAST_COMMAND_OPTIONS
           
protected  boolean compileSavedAll
           
protected  boolean considerDefaultRunTarget
          Whether to consider the default run target when determining the target Node.
static java.lang.String DATABASE_RUN_HELPER
           
static java.lang.String JAVA_BOOT_CLASS_PATH
           
static java.lang.String JAVA_CLASS_PATH
           
static java.lang.String JAVA_FIRST_COMMAND_OPTIONS
           
static java.lang.String JAVA_LAST_COMMAND_OPTIONS
           
protected  boolean lockCompiler
          Whether to lock the compiler while the process is running.
static java.lang.String RUN_COOKIE_JAVA_EMBEDDED_SERVER
           
static java.lang.String RUN_TYPE_ANT
           
static java.lang.String RUN_TYPE_DATABASE
           
static java.lang.String RUN_TYPE_JAVA
           
static java.lang.String RUN_TYPE_JS_MOZILLA_FIREFOX
           
static java.lang.String RUN_TYPE_XQUERY
           
static java.lang.String RUN_TYPE_XSLT
           
protected  RunConfiguration runConfiguration
          The RunConfiguration part of the project.
protected  long timeAfterCompile
          The time after compile finished.
static java.lang.String XSLT_FIRST_COMMAND_OPTIONS
           
static java.lang.String XSLT_LAST_COMMAND_OPTIONS
           
 
Fields inherited from class oracle.ide.runner.RunProcess
addToProcessesFolder, addToTerminateMenu, allowInput, container, context, determineTargetAndStarterAlready, errors, hideTerminateAction, iconOverride, isPreparingLabel, labelOverride, labelPrefixOverride, logCommandString, logError, logExit, logOutput, logPageOverride, logStartDirectory, RUN_PROCESS_DO_NOT_CONSIDER_DEFAULT, RUN_PROCESS_USE_NODE_FROM_CONTEXT, runProcessListener, showStartStatus, starter, target, timeCreated, useContainerLogPage, useLogPage, userCanceled
 
Constructor Summary
JRunProcess()
          Calls JRunProcess(Context) with a null Context.
JRunProcess(Context context)
          This constructor initializes fields, including runConfiguration.
 
Method Summary
protected  ToolButton addProcessActionButtonToToolbar(IdeAction action, java.lang.String group)
          Add a process related action as a button on the toolbar.
protected  boolean addProcessActionButtonToToolbar(javax.swing.JComponent actionButton, java.lang.String group)
          Add a process related action button on the toolbar.
protected  boolean checkStarter(Starter starter, java.util.List errors)
          Returns whether the given starter can really be used to start a process.
protected  void clearProcessActionButtonsFromToolbar()
          Remove any process related action buttons from the toolbar
protected  boolean compile()
          Compiles the project (if appropriate).
protected  void determineTargetAndStarter(java.lang.Class starterFactorySubClass)
          Determines what should be the target and starter for this process.
 JDK getJdkDefinition()
          Returns the JDK for the project.
 Project getJProject()
          Returns the current Project associated with the JRunProcess.
protected  Toolbar getLogPageToolbar()
          Get the toolbar
protected  java.lang.String getProcessActionButtonGroup(javax.swing.JComponent actionButton)
          Get the group with which this action button is associated
 RunConfiguration getRunConfiguration()
          Returns the current RunConfiguration associated with the JRunProcess.
 java.io.File getStartDirectory()
          Returns the directory that should be used as the working directory for the process.
 long getTimeAfterCompile()
          Returns the time after compile finished.
 boolean isPlainRun()
          Returns true if this is a plain run.
 boolean isSameType(JRunProcess other)
          Returns true if this is the same type of run as the other JRunProcess.
protected  LogPage makeLogPage(boolean create)
          Creates the RunLogPage for this process.
protected  void setProcessActionButtonGroup(javax.swing.JComponent actionButton, java.lang.String group)
          Set the group with which this action button is associated
protected  void showLogPageToolbar(boolean visible)
          Adjust the visibility of the toolbar
protected  void showProcessActionButtonsOnToolbar(java.lang.String group, boolean visible)
          Adjust the visibility of toolbar action buttons in a certain group
 void start()
          Creates a new thread to compile the project.
protected  boolean startTarget()
          Clears the log page associated with this run process (if appropriate).
 
Methods inherited from class oracle.ide.runner.RunProcess
canContainRunProcesses, canGarbageCollect, canGetStarterForTarget, canRun, canStart, canStopInChrome, canStopOnDebuggerStatement, canStopOnError, canStopOnException, canTerminate, canTransferErrors, copyTo, determineTargetAndStarter, doGarbageCollection, doubleClicked, doUI, doUILater, duplicateErrorStream, duplicateOutputStream, finished, fireFinished, fireStarted, fixCommandStringForLog, getAttributes, getChildren, getContainer, getContext, getContextNodeForRun, getData, getHelpInfo, getIcon, getLogPage, getLogPage, getLongLabel, getProcessLabelPrefix, getProcessLayout, getProject, getProject, getRunnableItems, getRunnableItemsForTarget, getShortLabel, getShortLabelWithPrefix, getStartCommand, getStartEnvironmentParams, getStarter, getStarter, getStarterFactorySubClass, getStarterForTarget, getStopInChrome, getStopOnDebuggerStatement, getStopOnError, getStopOnException, getSystemErrAttributeSet, getSystemOutAttributeSet, getTarget, getTarget, getTerminateCommand, getTimeCreated, getToolTipText, getTransferErrors, getUseContainerLogPage, getUseLogPage, getValue, getWorkspace, hasFinished, inheritLogPage, isStartOnly, log, logCommandString, logStartDirectory, logStartErrors, mayHaveChildren, mustPrepareToStart, prepareToStart, redirectInput, redirectOutput, reuseLogPage, selected, setContainer, setHideTerminateAction, setIconOverride, setLabelOverride, setLabelPrefixOverride, setLogError, setLogExit, setLogOutput, setLogPageOverride, setStopInChrome, setStopOnDebuggerStatement, setStopOnError, setStopOnException, setTransferErrors, setUseContainerLogPage, setUseLogPage, showStartStatus, start, started, suppressDirectoryDefault, terminate, toString, unselected, waitForRedirectOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

considerDefaultRunTarget

protected boolean considerDefaultRunTarget
Whether to consider the default run target when determining the target Node. Usually this is true.


runConfiguration

protected RunConfiguration runConfiguration
The RunConfiguration part of the project.


timeAfterCompile

protected long timeAfterCompile
The time after compile finished.


lockCompiler

protected boolean lockCompiler
Whether to lock the compiler while the process is running.


compileSavedAll

protected boolean compileSavedAll

RUN_TYPE_JAVA

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

RUN_TYPE_DATABASE

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

RUN_TYPE_XSLT

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

RUN_TYPE_XQUERY

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

RUN_TYPE_ANT

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

RUN_TYPE_JS_MOZILLA_FIREFOX

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

RUN_COOKIE_JAVA_EMBEDDED_SERVER

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

JAVA_FIRST_COMMAND_OPTIONS

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

JAVA_LAST_COMMAND_OPTIONS

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

JAVA_CLASS_PATH

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

JAVA_BOOT_CLASS_PATH

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

DATABASE_RUN_HELPER

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

XSLT_FIRST_COMMAND_OPTIONS

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

XSLT_LAST_COMMAND_OPTIONS

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

ANT_FIRST_COMMAND_OPTIONS

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

ANT_LAST_COMMAND_OPTIONS

public static final java.lang.String ANT_LAST_COMMAND_OPTIONS
See Also:
Constant Field Values
Constructor Detail

JRunProcess

public JRunProcess()
Calls JRunProcess(Context) with a null Context.


JRunProcess

public JRunProcess(Context context)
This constructor initializes fields, including runConfiguration.

Parameters:
context - the context for starting the process
Method Detail

getJProject

public Project getJProject()
Returns the current Project associated with the JRunProcess.


getRunConfiguration

public RunConfiguration getRunConfiguration()
Returns the current RunConfiguration associated with the JRunProcess.


getTimeAfterCompile

public long getTimeAfterCompile()
Returns the time after compile finished.


determineTargetAndStarter

protected void determineTargetAndStarter(java.lang.Class starterFactorySubClass)
Determines what should be the target and starter for this process. First, if appropriate, the super class checks to see if the context node is runnable.
If that fails, we look at the project's default run target.

Overrides:
determineTargetAndStarter in class RunProcess
Parameters:
starterFactorySubClass - the chosen StarterFactory must extend this class

checkStarter

protected boolean checkStarter(Starter starter,
                               java.util.List errors)
Returns whether the given starter can really be used to start a process. Checks that the starter is an instance of JStarter.

Overrides:
checkStarter in class RunProcess

getStartDirectory

public java.io.File getStartDirectory()
Returns the directory that should be used as the working directory for the process.

Overrides:
getStartDirectory in class RunProcess
Returns:
the working directory

start

public final void start()
Creates a new thread to compile the project. When the compile is finished, SwingUtilities.invokeLater(java.lang.Runnable) is used to call the super.start method.

Overrides:
start in class RunProcess

compile

protected boolean compile()
Compiles the project (if appropriate).

This method is called on a non-event thread.

Returns:
true if there are no compiler errors

makeLogPage

protected LogPage makeLogPage(boolean create)
Description copied from class: RunProcess
Creates the RunLogPage for this process.

Overrides:
makeLogPage in class RunProcess
Returns:
the log page

startTarget

protected boolean startTarget()
Clears the log page associated with this run process (if appropriate).

Calls the super.startTarget method.

Overrides:
startTarget in class RunProcess
Returns:
true if the process was started

getJdkDefinition

public JDK getJdkDefinition()
Returns the JDK for the project.


isPlainRun

public boolean isPlainRun()
Returns true if this is a plain run. A run is considered a plain run if the FirstJavaCommandOptions and the LastJavaCommandOptions are both null or empty array.


isSameType

public boolean isSameType(JRunProcess other)
Returns true if this is the same type of run as the other JRunProcess.


showLogPageToolbar

protected void showLogPageToolbar(boolean visible)
Adjust the visibility of the toolbar

Parameters:
visible - If true, toolbar will be made visible

getLogPageToolbar

protected Toolbar getLogPageToolbar()
Get the toolbar

Returns:
The toolbar, which might be null

addProcessActionButtonToToolbar

protected ToolButton addProcessActionButtonToToolbar(IdeAction action,
                                                     java.lang.String group)
Add a process related action as a button on the toolbar. These buttons are only visible as long as the process is running

Parameters:
action - The action for the button
group - If not null, the button is added to the named group, and a group of buttons can be shown/hidden with a call to showProcessActionButtonsOnToolbar(group)
Returns:
The added button or null if the toolbar didn't exist

addProcessActionButtonToToolbar

protected boolean addProcessActionButtonToToolbar(javax.swing.JComponent actionButton,
                                                  java.lang.String group)
Add a process related action button on the toolbar. These buttons are only visible as long as the process is running

Parameters:
actionButton - The button to add
group - If not null, the button is added to the named group, and a group of buttons can be shown/hidden with a call to showProcessActionButtonsOnToolbar(group)
Returns:
True if the button was added

setProcessActionButtonGroup

protected void setProcessActionButtonGroup(javax.swing.JComponent actionButton,
                                           java.lang.String group)
Set the group with which this action button is associated

Parameters:
actionButton - The action button
group - If not null, the button is added to the named group, and a group of buttons can be shown/hidden with a call to showProcessActionButtonsOnToolbar(group). If null, the button is removed from any group

getProcessActionButtonGroup

protected java.lang.String getProcessActionButtonGroup(javax.swing.JComponent actionButton)
Get the group with which this action button is associated

Parameters:
actionButton - The action button
Returns:
The group, or null if the button was not part of a group

showProcessActionButtonsOnToolbar

protected void showProcessActionButtonsOnToolbar(java.lang.String group,
                                                 boolean visible)
Adjust the visibility of toolbar action buttons in a certain group

Parameters:
group - The group whose buttons should be shown/hidden, which cannot be null.
visible - If true show the buttons, otherwise hide it

clearProcessActionButtonsFromToolbar

protected void clearProcessActionButtonsFromToolbar()
Remove any process related action buttons from the toolbar


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

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