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

E13403-04

oracle.ide.runner
Class RunProcess

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

public abstract class RunProcess
extends java.lang.Object
implements Element, Helpable

An abstract class that represents a process that can be run in some way.


Field Summary
protected  boolean addToProcessesFolder
          Whether this process should be added to the Run Manager's process folder
protected  boolean addToTerminateMenu
          Whether a terminate menu for this process should be add to the Run Terminate menu.
protected  boolean allowInput
          Whether the user wants to allow input to be sent to the process.
protected  RunProcess container
          The container of this RunProcess.
protected  Context context
          The Context that is associated with this process.
protected  boolean determineTargetAndStarterAlready
          Whether the target Node and Starter have already been determined.
protected  java.util.List errors
          The list of errors that occurred when trying to start the process.
protected  boolean hideTerminateAction
          Whether the terminate action should be left out of the log page.
protected  javax.swing.Icon iconOverride
          The icon to use instead of the normal icon.
protected  boolean isPreparingLabel
          Used to avoid StackOverflowError from bad behaved runners/runnerfactories.
protected  java.lang.String labelOverride
          The label to use instead of the normal label.
protected  java.lang.String labelPrefixOverride
          The label prefix to use instead of the normal label.
protected  boolean logCommandString
          Whether the command string should be logged.
protected  boolean logError
          Whether standard error from the process should be logged.
protected  boolean logExit
          Whether to log a message when the process exits.
protected  boolean logOutput
          Whether standard output from the process should be logged.
protected  LogPage logPageOverride
          The log page to be used instead of the normal log page.
protected  boolean logStartDirectory
          Whether the start directory should be logged.
static java.lang.String RUN_PROCESS_DO_NOT_CONSIDER_DEFAULT
           
static java.lang.String RUN_PROCESS_USE_NODE_FROM_CONTEXT
           
protected  RunProcessListener runProcessListener
          The RunProcessListener for this process.
protected  boolean showStartStatus
          Whether to show a start status message in the status bar.
protected  Starter starter
          The starter for this RunProcess.
protected  Node target
          The target for this RunProcess.
protected  long timeCreated
          The time this RunProcess was created.
protected  boolean useContainerLogPage
          Whether this RunProcess uses its container's LogPage.
protected  boolean useLogPage
          Whether a log page should be used to print process information.
protected  boolean userCanceled
           
 
Constructor Summary
RunProcess(Context context)
          The constructor simply initializes the fields of this RunProcess.
 
Method Summary
 boolean canContainRunProcesses()
          Checks whether this RunProcess can have contained RunProcess.
 boolean canGarbageCollect()
           
 java.lang.String canGetStarterForTarget(Node node, java.lang.Class starterFactorySubClass, java.util.List errors)
          Tests whether the given node is runnable.
 boolean canRun(java.lang.String runType, java.lang.Object cookie, Node node, java.util.List errors)
          canRun should be called by the StarterFactory's canStart method.
 boolean canStart()
          Tests whether this process can be started.
 boolean canStopInChrome()
           
 boolean canStopOnDebuggerStatement()
           
 boolean canStopOnError()
           
 boolean canStopOnException()
           
 boolean canTerminate()
          Tests whether this RunProcess can be terminated.
 boolean canTransferErrors()
           
protected  boolean checkStarter(Starter starter, java.util.List errors)
          Returns whether the given starter can really be used to start a process.
protected  java.lang.Object copyTo(java.lang.Object o)
           
protected  void determineTargetAndStarter()
          Determines what should be the target and starter for this process.
protected  void determineTargetAndStarter(java.lang.Class starterFactorySubClass)
          Determines what should be the target and starter for this process.
 void doGarbageCollection()
           
 void doubleClicked()
          This method is called when this process is double clicked in the run manager navigator.
protected  void doUI(java.lang.Runnable r)
          Uses either SwingUtilities.invokeLater(java.lang.Runnable) or SwingUtilities.invokeAndWait(java.lang.Runnable) to invoke the Runnable.
 boolean doUILater()
          Returns whether SwingUtilities.invokeLater(java.lang.Runnable) should be used to do UI, instead of SwingUtilities.invokeAndWait(java.lang.Runnable).
 java.io.PipedInputStream duplicateErrorStream()
          Returns a PipedInputStream which duplicates the error (System.err) from this process.
 java.io.PipedInputStream duplicateOutputStream()
          Returns a PipedInputStream which duplicates the output (System.out) from this process.
 void finished()
          This method will be called by the Starter, when this process finishes.
protected  void fireFinished(RunProcessLifecycleEvent event)
           
protected  void fireStarted(RunProcessLifecycleEvent event, boolean userCanTerminate)
           
protected  java.lang.String fixCommandStringForLog(java.lang.String[] command)
          Returns a the command string for display purposes.
 Attributes getAttributes()
          Returns a this Element's Attributes.
 java.util.Iterator getChildren()
          Gets the children of this RunProcess element.
 RunProcess getContainer()
          Returns the container RunProcess of this RunProcess
 Context getContext()
          Returns the Context that is associated with this RunProcess.
static Node getContextNodeForRun(Context context)
          Returns the Node for the given Context.
 java.lang.Object getData()
          Gets the data object that implements this interface.
 HelpInfo getHelpInfo()
          Returns the help info to be used when the user presses F1 in the log page for this run process.
 javax.swing.Icon getIcon()
          Gets the Icon for this RunProcess element.
 LogPage getLogPage()
          Returns the LogPage for this process.
 LogPage getLogPage(boolean create)
           
 java.lang.String getLongLabel()
          Gets a fully qualified label for display purpose.
abstract  java.lang.String getProcessLabelPrefix()
          Returns the prefix that will be used in the short and long labels for this RunProcess.
 IdeLayout getProcessLayout()
          Returns the layout that should be shown when this process is selected in the run manager navigator.
 Project getProject()
          Returns the Project associated with the RunProcess.
static Project getProject(Context context)
           
 RunnableItem[] getRunnableItems()
           
protected  RunnableItem[] getRunnableItemsForTarget(Node node, java.lang.Class starterFactorySubClass)
           
 java.lang.String getShortLabel()
          Gets a short label for display purpose.
 java.lang.String getShortLabelWithPrefix()
          Returns a short label containing the process label prefix, for display purposes.
 java.lang.String[] getStartCommand()
          Returns the command line that will be executed to start the process.
 java.io.File getStartDirectory()
          Returns the directory that should be used as the working directory of this process, or null if this process should inherit the working directory of the current process.
 java.lang.String[] getStartEnvironmentParams()
          Returns the environment parameters that are defined for this process.
 Starter getStarter()
          Returns the Starter that will be used to start this process.
 Starter getStarter(boolean determineTargetAndStarter)
          Returns the Starter that will be used to start this process.
protected  java.lang.Class getStarterFactorySubClass()
           
protected  Starter getStarterForTarget(Node node, java.lang.Class starterFactorySubClass)
          Tests whether the given node is runnable and returns the starter that can start the process.
 boolean getStopInChrome()
           
 boolean getStopOnDebuggerStatement()
          Whether the VM should stop on an debugger statement.
 boolean getStopOnError()
          Whether the VM should stop on an error.
 boolean getStopOnException()
          Whether the VM should stop on an execrption.
static javax.swing.text.SimpleAttributeSet getSystemErrAttributeSet()
           
static javax.swing.text.SimpleAttributeSet getSystemOutAttributeSet()
           
 Node getTarget()
          Returns the target.
 Node getTarget(boolean determineTargetAndStarter)
          Returns the target.
 java.lang.String[] getTerminateCommand()
          Returns the command line that will be executed to terminate the process.
 long getTimeCreated()
          Returns the time this RunProcess was created.
 java.lang.String getToolTipText()
          Gets the tool tip for this RunProcess element
 boolean getTransferErrors()
          Whether the VM should transfer errors to debugger.
protected  boolean getUseContainerLogPage()
          Returns whether the log page of the parent process, if any, will be used to print process information.
protected  boolean getUseLogPage()
          Returns whether a log page will be used to print process information.
 java.lang.Object getValue(java.lang.String runType, java.lang.Object cookie, java.lang.String key)
          getValue should be called by a StarterFactory or Starter if it needs some value provided by the RunProcess subclass.
 Workspace getWorkspace()
          Returns the Workspace associated with the RunProcess.
 boolean hasFinished()
          Tests whether this process has finished.
 boolean inheritLogPage(RunProcess rp)
          Inherit the logPage of a previous RunProcess unconditionally, except if the current RunProcess already has a logPage.
protected  boolean isStartOnly()
          Checks whether the Starter wants to bypass the RunProcess mode (run, debug, profile) and just launch the Starter.
 void log(java.lang.Object msg)
          Display the specified msg in the log window.
 void logCommandString(java.lang.String[] command)
          If logCommandString is true, the command string is displayed in the log window.
 void logStartDirectory()
          If logStartDirectory is true, the start directory is displayed in the log window.
protected  void logStartErrors()
           
protected  LogPage makeLogPage(boolean create)
          Creates the RunLogPage for this process.
 boolean mayHaveChildren()
          Tests if this RunProcess element may contain children.
protected  boolean mustPrepareToStart()
          Calls the Starter.mustPrepareToStart() method.
protected  boolean prepareToStart()
          Calls the Starter.prepareToStart() method.
 void redirectInput(java.io.OutputStream input)
          This method will be called by the Starter, if the Starter captured standard input for this process.
 void redirectOutput(java.io.InputStream systemOutStream, java.io.InputStream systemErrStream)
          This method will be called by the Starter, if the Starter captured standard output/error for this process.
protected  boolean reuseLogPage(RunLogPage runLogPage)
          Returns true if the specified RunLogPage should be reused for this RunProcess.
 void selected()
          This method is called when this process is selected in the run manager navigator.
 void setContainer(RunProcess container)
           
 void setHideTerminateAction(boolean hideTerminateAction)
          Sets whether the terminate action is to be hidden from the log page.
 void setIconOverride(javax.swing.Icon iconOverride)
          Explicitly sets the string to be shown as the display name of the running process in the run manager.
 void setLabelOverride(java.lang.String labelOverride)
          Explicitly sets the string to be shown as the display name of the running process in the run manager.
 void setLabelPrefixOverride(java.lang.String labelPrefixOverride)
          Explicitly sets the string to be shown as the display name of the running process in the run manager.
 void setLogError(boolean logError)
           
 void setLogExit(boolean logExit)
          Explicitly sets the logging of process exit behavior.
 void setLogOutput(boolean logOutput)
           
 void setLogPageOverride(LogPage logPageOverride)
          Explicitly sets the LogPage to be used for all logging.
 void setStopInChrome(boolean b)
           
 void setStopOnDebuggerStatement(boolean b)
          Whether the VM should stop on an debugger statement.
 void setStopOnError(boolean b)
          Whether the VM should stop on an error.
 void setStopOnException(boolean b)
          Whether the VM should stop on an execrption.
 void setTransferErrors(boolean b)
          Whether the VM should transfer errors to debugger.
 void setUseContainerLogPage(boolean useContainerLogPage)
           
 void setUseLogPage(boolean useLogPage)
           
 boolean showStartStatus()
          Returns whether a start message should be shown in the status bar.
 void start()
          Causes this process to begin execution.
 void start(Node node, AbstractStarterFactory abstractStarterFactory, java.lang.Object cookie)
           
 void started()
          This method will be called by the start method, when this process has been started.
protected  boolean startTarget()
          Determines the target Node and Starter for this RunProcess and if successful, calls the Starter.start() method.
 boolean suppressDirectoryDefault()
          Returns whether the defaulting behavior to the context project directory is suppressed.
 void terminate()
          Terminates this process.
 java.lang.String toString()
          Returns the short label for this RunProcess.
 void unselected()
          This method is called when this process is unselected in the run manager navigator.
 void waitForRedirectOutput()
          This call waits until the threads that are redirecting output (System.out and System.err) have processed all output available so far.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RUN_PROCESS_USE_NODE_FROM_CONTEXT

public static java.lang.String RUN_PROCESS_USE_NODE_FROM_CONTEXT

RUN_PROCESS_DO_NOT_CONSIDER_DEFAULT

public static java.lang.String RUN_PROCESS_DO_NOT_CONSIDER_DEFAULT

timeCreated

protected long timeCreated
The time this RunProcess was created.


context

protected Context context
The Context that is associated with this process. The context can not be null.


logStartDirectory

protected boolean logStartDirectory
Whether the start directory should be logged.


logCommandString

protected boolean logCommandString
Whether the command string should be logged.


logOutput

protected boolean logOutput
Whether standard output from the process should be logged.


allowInput

protected boolean allowInput
Whether the user wants to allow input to be sent to the process.


logError

protected boolean logError
Whether standard error from the process should be logged.


logExit

protected boolean logExit
Whether to log a message when the process exits.


showStartStatus

protected boolean showStartStatus
Whether to show a start status message in the status bar.


addToProcessesFolder

protected boolean addToProcessesFolder
Whether this process should be added to the Run Manager's process folder


addToTerminateMenu

protected boolean addToTerminateMenu
Whether a terminate menu for this process should be add to the Run Terminate menu.


hideTerminateAction

protected boolean hideTerminateAction
Whether the terminate action should be left out of the log page.


useLogPage

protected boolean useLogPage
Whether a log page should be used to print process information.


logPageOverride

protected LogPage logPageOverride
The log page to be used instead of the normal log page.


runProcessListener

protected RunProcessListener runProcessListener
The RunProcessListener for this process. The runProcessListener can be null.


userCanceled

protected boolean userCanceled

errors

protected java.util.List errors
The list of errors that occurred when trying to start the process.

Each StarterFactory can add errors to the list.
If we are not able to start the process, the errors are displayed in the log window.
If we are able to start the process, the errors are not displayed.


determineTargetAndStarterAlready

protected boolean determineTargetAndStarterAlready
Whether the target Node and Starter have already been determined.


labelOverride

protected java.lang.String labelOverride
The label to use instead of the normal label. The normal label is usually the name of the project.


labelPrefixOverride

protected java.lang.String labelPrefixOverride
The label prefix to use instead of the normal label. The normal label prefix usually depends on the RunProcess type (Run/Debug)


iconOverride

protected javax.swing.Icon iconOverride
The icon to use instead of the normal icon. The normal icon is usually depends on the RunProcess type (Run/Debug).


target

protected Node target
The target for this RunProcess.


starter

protected Starter starter
The starter for this RunProcess.


container

protected RunProcess container
The container of this RunProcess.


useContainerLogPage

protected boolean useContainerLogPage
Whether this RunProcess uses its container's LogPage.


isPreparingLabel

protected boolean isPreparingLabel
Used to avoid StackOverflowError from bad behaved runners/runnerfactories.

Constructor Detail

RunProcess

public RunProcess(Context context)
The constructor simply initializes the fields of this RunProcess.

Parameters:
context - the context to be associated with this RunProcess
Method Detail

copyTo

protected java.lang.Object copyTo(java.lang.Object o)

setLogOutput

public final void setLogOutput(boolean logOutput)

setLogError

public final void setLogError(boolean logError)

duplicateOutputStream

public java.io.PipedInputStream duplicateOutputStream()
Returns a PipedInputStream which duplicates the output (System.out) from this process. This method will work only if it is called before the subprocess is executed. This method returns a PipedInputStream that will not be connected to a PipedOutputStream until the subprocess is started. Attempting to read from the PipedInputStream before it has been connected will cause an IOException to be thrown.


duplicateErrorStream

public java.io.PipedInputStream duplicateErrorStream()
Returns a PipedInputStream which duplicates the error (System.err) from this process. This method will work only if it is called before the subprocess is executed. This method returns a PipedInputStream that will not be connected to a PipedOutputStream until the subprocess is started. Attempting to read from the PipedInputStream before it has been connected will cause an IOException to be thrown.


getStarterFactorySubClass

protected java.lang.Class getStarterFactorySubClass()

determineTargetAndStarter

protected void determineTargetAndStarter()
Determines what should be the target and starter for this process.

Checks to see if the context Node is runnable.


getContextNodeForRun

public static Node getContextNodeForRun(Context context)
Returns the Node for the given Context.


determineTargetAndStarter

protected void determineTargetAndStarter(java.lang.Class starterFactorySubClass)
Determines what should be the target and starter for this process.

Checks to see if the context Node is runnable.

Parameters:
starterFactorySubClass - the chosen StarterFactory must extend this class

getStarterForTarget

protected Starter getStarterForTarget(Node node,
                                      java.lang.Class starterFactorySubClass)
Tests whether the given node is runnable and returns the starter that can start the process.

If any registered starters claim that they can start this process with the given node as the target, then this method returns the starter.

Parameters:
node - the target
starterFactorySubClass - the chosen StarterFactory must extend this class
Returns:
Starter if the node is runnable, null otherwise

getRunnableItems

public RunnableItem[] getRunnableItems()

getRunnableItemsForTarget

protected RunnableItem[] getRunnableItemsForTarget(Node node,
                                                   java.lang.Class starterFactorySubClass)

canGetStarterForTarget

public java.lang.String canGetStarterForTarget(Node node,
                                               java.lang.Class starterFactorySubClass,
                                               java.util.List errors)
Tests whether the given node is runnable.

If any registered starter factory claims that it can start this process with the given node as the target, then this method returns the name of that starter factory.

Parameters:
node - the target
starterFactorySubClass - the chosen StarterFactory must extend this class ¶m errors the list of errors showing why the node may not be runnable
Returns:
the name of the starter factory if the node is runnable, null otherwise

checkStarter

protected boolean checkStarter(Starter starter,
                               java.util.List errors)
Returns whether the given starter can really be used to start a process.


getTimeCreated

public long getTimeCreated()
Returns the time this RunProcess was created.


getContext

public Context getContext()
Returns the Context that is associated with this RunProcess.


getWorkspace

public Workspace getWorkspace()
Returns the Workspace associated with the RunProcess.


getProject

public Project getProject()
Returns the Project associated with the RunProcess.


getProject

public static Project getProject(Context context)

canRun

public boolean canRun(java.lang.String runType,
                      java.lang.Object cookie,
                      Node node,
                      java.util.List errors)
canRun should be called by the StarterFactory's canStart method.

RunProcess subclasses that can run the specified runType should override this method and return true.

RunProcess subclasses that can not run the specified runType should override this method and add an error message to the errors list before returning false.


getValue

public java.lang.Object getValue(java.lang.String runType,
                                 java.lang.Object cookie,
                                 java.lang.String key)
getValue should be called by a StarterFactory or Starter if it needs some value provided by the RunProcess subclass.

RunProcess subclasses that can provide necessary values should override this method.

For example, a Starter would need to get the debugging options from the debugger's RunProcess.


getTarget

public final Node getTarget()
Returns the target.


getTarget

public final Node getTarget(boolean determineTargetAndStarter)
Returns the target.


getStarter

public final Starter getStarter()
Returns the Starter that will be used to start this process.


getStarter

public final Starter getStarter(boolean determineTargetAndStarter)
Returns the Starter that will be used to start this process.


canStart

public boolean canStart()
Tests whether this process can be started.

Returns:
true if the process can be started

isStartOnly

protected boolean isStartOnly()
Checks whether the Starter wants to bypass the RunProcess mode (run, debug, profile) and just launch the Starter.

Returns:

canContainRunProcesses

public boolean canContainRunProcesses()
Checks whether this RunProcess can have contained RunProcess.

Returns:

start

public void start(Node node,
                  AbstractStarterFactory abstractStarterFactory,
                  java.lang.Object cookie)

start

public void start()
Causes this process to begin execution. The appropriate Starter for this process will be used to start the process.

If the process can not be started, error messages will be logged.


mustPrepareToStart

protected boolean mustPrepareToStart()
Calls the Starter.mustPrepareToStart() method.

This method is called on the event thread.


prepareToStart

protected boolean prepareToStart()
Calls the Starter.prepareToStart() method.

This method is called on a non-event thread.


startTarget

protected boolean startTarget()
Determines the target Node and Starter for this RunProcess and if successful, calls the Starter.start() method.

If the Starter can not be determined, all errors in the errors list are displayed in the log window.

Returns:
true if the process was started

logStartErrors

protected void logStartErrors()

started

public void started()
This method will be called by the start method, when this process has been started.

If the start method was not used to start the process, then this method should be called when the process has been started.

This method adds the process to the processes folder in the run manager navigator and if this process can be terminated, it adds a terminate menu item to the Run Terminate submenu.


fireStarted

protected void fireStarted(RunProcessLifecycleEvent event,
                           boolean userCanTerminate)

fireFinished

protected void fireFinished(RunProcessLifecycleEvent event)

redirectOutput

public void redirectOutput(java.io.InputStream systemOutStream,
                           java.io.InputStream systemErrStream)
This method will be called by the Starter, if the Starter captured standard output/error for this process.

This method will create two LogOutputThread threads to redirect System.out and System.err to the log page.

Parameters:
redirect - the System.out and System.err

getSystemOutAttributeSet

public static javax.swing.text.SimpleAttributeSet getSystemOutAttributeSet()

getSystemErrAttributeSet

public static javax.swing.text.SimpleAttributeSet getSystemErrAttributeSet()

redirectInput

public void redirectInput(java.io.OutputStream input)
This method will be called by the Starter, if the Starter captured standard input for this process.

Parameters:
input - the standard input

waitForRedirectOutput

public void waitForRedirectOutput()
This call waits until the threads that are redirecting output (System.out and System.err) have processed all output available so far.

If this method is called on the AWT event dispatching thread, it does nothing.


getStartEnvironmentParams

public java.lang.String[] getStartEnvironmentParams()
Returns the environment parameters that are defined for this process.

The default implementation returns null.

Returns:
array of strings, each element of which has environment variable settings in format name=value.

getStartDirectory

public java.io.File getStartDirectory()
Returns the directory that should be used as the working directory of this process, or null if this process should inherit the working directory of the current process.

The default implementation returns null.

Returns:
the working directory

logStartDirectory

public void logStartDirectory()
If logStartDirectory is true, the start directory is displayed in the log window.


getStartCommand

public java.lang.String[] getStartCommand()
Returns the command line that will be executed to start the process.

The default implementation returns null. Subclasses should either override this method or ensure that the Starter.getStartCommand() method is overridden.

Returns:
the command line

logCommandString

public void logCommandString(java.lang.String[] command)
If logCommandString is true, the command string is displayed in the log window.


fixCommandStringForLog

protected java.lang.String fixCommandStringForLog(java.lang.String[] command)
Returns a the command string for display purposes.


showStartStatus

public boolean showStartStatus()
Returns whether a start message should be shown in the status bar.

Returns:
true if the message should be shown.

getUseLogPage

protected boolean getUseLogPage()
Returns whether a log page will be used to print process information.

Returns:
true if a log page will be used.

setUseLogPage

public void setUseLogPage(boolean useLogPage)

getUseContainerLogPage

protected boolean getUseContainerLogPage()
Returns whether the log page of the parent process, if any, will be used to print process information.

Returns:
true if the parent log page will be used.

setUseContainerLogPage

public void setUseContainerLogPage(boolean useContainerLogPage)

getLogPage

public LogPage getLogPage()
Returns the LogPage for this process.

Creates the LogPage if necessary.

Returns:
the LogPage for this process

getLogPage

public LogPage getLogPage(boolean create)

makeLogPage

protected LogPage makeLogPage(boolean create)
Creates the RunLogPage for this process.

Returns:
the log page

reuseLogPage

protected boolean reuseLogPage(RunLogPage runLogPage)
Returns true if the specified RunLogPage should be reused for this RunProcess.

First, the Starter.reuseLogPage(oracle.ide.runner.RunLogPage) is called, in case the Starter wants to overide the default behavior.

The default behavior is to reuse the page if the previous process is not still alive, and the name, workspace, project, icon, tooltip, titleName, and helpInfo match.


inheritLogPage

public boolean inheritLogPage(RunProcess rp)
Inherit the logPage of a previous RunProcess unconditionally, except if the current RunProcess already has a logPage.

Parameters:
rp - Previous logPage
Returns:
true if the logPage was inherited false if the logPage was not inherited

log

public void log(java.lang.Object msg)
Display the specified msg in the log window.

Parameters:
msg - the message to display.

doUILater

public boolean doUILater()
Returns whether SwingUtilities.invokeLater(java.lang.Runnable) should be used to do UI, instead of SwingUtilities.invokeAndWait(java.lang.Runnable).


doUI

protected void doUI(java.lang.Runnable r)
Uses either SwingUtilities.invokeLater(java.lang.Runnable) or SwingUtilities.invokeAndWait(java.lang.Runnable) to invoke the Runnable.


suppressDirectoryDefault

public boolean suppressDirectoryDefault()
Returns whether the defaulting behavior to the context project directory is suppressed.


getProcessLabelPrefix

public abstract java.lang.String getProcessLabelPrefix()
Returns the prefix that will be used in the short and long labels for this RunProcess.

Returns:
the prefix that will be used in the short and long labels

getProcessLayout

public IdeLayout getProcessLayout()
Returns the layout that should be shown when this process is selected in the run manager navigator.

Returns:
the layout

selected

public void selected()
This method is called when this process is selected in the run manager navigator.

The implementation of this method should not change layouts. Changing layouts based on what process is selected in the run manager navigator should be accomplished by returning the appropriate layout from the getProcessLayout method.


doubleClicked

public void doubleClicked()
This method is called when this process is double clicked in the run manager navigator.


unselected

public void unselected()
This method is called when this process is unselected in the run manager navigator.


getTerminateCommand

public java.lang.String[] getTerminateCommand()
Returns the command line that will be executed to terminate the process.

The default implementation returns null. Subclasses should either override this method or ensure that the Starter.getTerminateCommand() method is overridden.

Returns:
the command line

canTerminate

public boolean canTerminate()
Tests whether this RunProcess can be terminated.

Returns:
true if this RunProcess can be terminated.

terminate

public void terminate()
Terminates this process.


hasFinished

public boolean hasFinished()
Tests whether this process has finished.

Returns:
true if this process has finished

finished

public void finished()
This method will be called by the Starter, when this process finishes.

If the start method was not used to start the process, then this method should be called when the process finishes.

This method removes the process from the processes folder in the run manager navigator and removes the terminate menu, if a terminate menu item was added to the Run Terminate submenu for this process.


setHideTerminateAction

public void setHideTerminateAction(boolean hideTerminateAction)
Sets whether the terminate action is to be hidden from the log page.


setLogPageOverride

public void setLogPageOverride(LogPage logPageOverride)
Explicitly sets the LogPage to be used for all logging.


setLabelOverride

public void setLabelOverride(java.lang.String labelOverride)
Explicitly sets the string to be shown as the display name of the running process in the run manager.


setLabelPrefixOverride

public void setLabelPrefixOverride(java.lang.String labelPrefixOverride)
Explicitly sets the string to be shown as the display name of the running process in the run manager.


setIconOverride

public void setIconOverride(javax.swing.Icon iconOverride)
Explicitly sets the string to be shown as the display name of the running process in the run manager.


setLogExit

public void setLogExit(boolean logExit)
Explicitly sets the logging of process exit behavior.


getShortLabelWithPrefix

public java.lang.String getShortLabelWithPrefix()
Returns a short label containing the process label prefix, for display purposes.


getContainer

public RunProcess getContainer()
Returns the container RunProcess of this RunProcess

Returns:
true if the container log page will be used.

setContainer

public void setContainer(RunProcess container)

getShortLabel

public java.lang.String getShortLabel()
Gets a short label for display purpose.

Specified by:
getShortLabel in interface Displayable
Returns:
a short descriptive label.

getLongLabel

public java.lang.String getLongLabel()
Gets a fully qualified label for display purpose.

Specified by:
getLongLabel in interface Displayable
Returns:
a long descriptive label.

getData

public java.lang.Object getData()
Gets the data object that implements this interface.

Specified by:
getData in interface Element
Returns:
object implementing this interface.

getIcon

public javax.swing.Icon getIcon()
Gets the Icon for this RunProcess element.

Specified by:
getIcon in interface Displayable
Returns:
the Icon for this RunProcess element.

getToolTipText

public java.lang.String getToolTipText()
Gets the tool tip for this RunProcess element

The default implementation returns the long label.

Specified by:
getToolTipText in interface Displayable
Returns:
the tool tip for this RunProcess element

mayHaveChildren

public boolean mayHaveChildren()
Tests if this RunProcess element may contain children.

The implementation of this method returns false; a RunProcess may not have children.

Specified by:
mayHaveChildren in interface Element
Returns:
false because a RunProcess may not have children.

getChildren

public java.util.Iterator getChildren()
Gets the children of this RunProcess element.

The implementation of this method returns null; a RunProcess element may not have children.

Specified by:
getChildren in interface Element
Returns:
null because a RunProcess may not have children.

getAttributes

public Attributes getAttributes()
Returns a this Element's Attributes. This class does not define any attributes.

Specified by:
getAttributes in interface Element
Returns:
this element's attributes

getHelpInfo

public HelpInfo getHelpInfo()
Returns the help info to be used when the user presses F1 in the log page for this run process.

Specified by:
getHelpInfo in interface Helpable
Returns:
the HelpInfo

toString

public java.lang.String toString()
Returns the short label for this RunProcess.

Specified by:
toString in interface Displayable
Overrides:
toString in class java.lang.Object
See Also:
Object.toString(), Displayable.getShortLabel()

canStopOnException

public boolean canStopOnException()

canStopOnError

public boolean canStopOnError()

canStopOnDebuggerStatement

public boolean canStopOnDebuggerStatement()

canTransferErrors

public boolean canTransferErrors()

getStopOnException

public boolean getStopOnException()
Whether the VM should stop on an execrption. (Applyes for JavaScript debugging.)

Returns:
true if should stop. Otherwise false.

getStopOnError

public boolean getStopOnError()
Whether the VM should stop on an error. (Applyes for JavaScript debugging.)

Returns:
true if should stop. Otherwise false.

getStopOnDebuggerStatement

public boolean getStopOnDebuggerStatement()
Whether the VM should stop on an debugger statement. (Applyes for JavaScript debugging.)

Returns:
true if should stop. Otherwise false.

getTransferErrors

public boolean getTransferErrors()
Whether the VM should transfer errors to debugger. (Applyes for JavaScript debugging.)

Returns:
true if should stop. Otherwise false.

setStopOnException

public void setStopOnException(boolean b)
Whether the VM should stop on an execrption. (Applyes for JavaScript debugging.)

Parameters:
b - true if should stop. Otherwise false.

setStopOnError

public void setStopOnError(boolean b)
Whether the VM should stop on an error. (Applyes for JavaScript debugging.)

Parameters:
b - true if should stop. Otherwise false.

setStopOnDebuggerStatement

public void setStopOnDebuggerStatement(boolean b)
Whether the VM should stop on an debugger statement. (Applyes for JavaScript debugging.)

Parameters:
b - true if should stop. Otherwise false.

setTransferErrors

public void setTransferErrors(boolean b)
Whether the VM should transfer errors to debugger. (Applyes for JavaScript debugging.)

Parameters:
b - true if should transfer. Otherwise false.

getStopInChrome

public boolean getStopInChrome()

doGarbageCollection

public void doGarbageCollection()

setStopInChrome

public void setStopInChrome(boolean b)

canStopInChrome

public boolean canStopInChrome()

canGarbageCollect

public boolean canGarbageCollect()

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

E13403-04

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