|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.runner.SimpleProcess
The SimpleProcess class contains methods to start a process and redirect the process's output to the log window.
Constructor Summary | |
SimpleProcess(java.lang.String[] cmd)
Creates an instance that can be used to start a subprocess. |
Method Summary | |
void |
exec()
Executes a separate subprocess. |
int |
execAndWait()
Executes a separate subprocess and waits for the subprocess to finish. |
java.lang.Exception |
getExecException()
|
void |
setAddToProcessesFolder(boolean addToProcessesFolder)
Specifies whether to add the subprocess to the processes folder of the run manager. |
void |
setAddToTerminateMenu(boolean addToTerminateMenu)
Specifies whether to list the subprocess in the Terminate submenu of the Run menu. |
void |
setAllowInput(boolean allowInput)
Sets whether the subprocess will allow input, which will be read through some UI in the log window. |
void |
setCommandStringForLog(java.lang.String commandStringForLog)
Specifies the command string that should be logged. |
void |
setIcon(javax.swing.Icon icon)
Sets the icon that will appear with the subprocess in the processes folder of the run manager. |
void |
setLabel(java.lang.String label)
Sets the label that will appear with the subprocess in the processes folder of the run manager. |
void |
setLogCommandString(boolean logCommandString)
Specifies whether to show the command string itself in the log window. |
void |
setLogPage(LogPage logPageOverride)
Sets the log page where the subprocess's output will be displayed. |
void |
setRunProcessListener(RunProcessListener runProcessListener)
Specifies that a callback method should be called after the subprocess has finished executing and all of the subprocess's output has been sent to the log page. |
void |
setShowStartStatus(boolean showStartStatus)
Specifies whether to show the start message in the status bar. |
void |
setWorkingDirectory(java.io.File dir)
Sets the working directory for the subprocess. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleProcess(java.lang.String[] cmd)
The subprocess inherits the working directory of the current
process, unless overridden by the
setWorkingDirectory(java.io.File)
method.
The label that will appear with the subprocess in the processes
folder of the run manager will be the zero-th argument of the
command array passed to the exec()
or execAndWait()
method, unless overridden by the setLabel(java.lang.String)
method.
The Swing default icon will appear with the subprocess in the
processes folder of the run manager, unless overridden by the
setIcon(javax.swing.Icon)
method.
A new log page will be created to display the subprocess's output,
unless overridden by the setLogPage(oracle.ide.log.LogPage)
method.
The command string itself will be logged, unless overridden by the
setLogCommandString(boolean)
method.
To adjust or manipulate the command string that is logged,
use the setCommandStringForLog(java.lang.String)
method.
A start message will be shown in the status bar, unless overridden by the
setShowStartStatus(boolean)
method.
The subprocess will be added to the processes folder of the run
manager, unless overridden by the setAddToProcessesFolder(boolean)
method.
The subprocess will be listed in the Terminate submenu of the Run
menu, unless overridden by the setAddToTerminateMenu(boolean)
method.
cmd
- array containing the command to call and its arguments.Method Detail |
public void setAllowInput(boolean allowInput)
allowInput
- if true, input will be read, otherwise, input
will not be read. Default value is false.public void setWorkingDirectory(java.io.File dir)
dir
- the working directory of the subprocess, or null if the
subprocess should inherit the working directory of the current
process.public void setLabel(java.lang.String label)
setLogPage(oracle.ide.log.LogPage)
method.
label
- the labelpublic void setIcon(javax.swing.Icon icon)
setLogPage(oracle.ide.log.LogPage)
method.
icon
- the iconpublic void setLogPage(LogPage logPageOverride)
public void setLogCommandString(boolean logCommandString)
public void setCommandStringForLog(java.lang.String commandStringForLog)
public void setShowStartStatus(boolean showStartStatus)
public void setAddToProcessesFolder(boolean addToProcessesFolder)
public void setAddToTerminateMenu(boolean addToTerminateMenu)
public void setRunProcessListener(RunProcessListener runProcessListener)
runProcessListener
- the run process listenerpublic void exec()
The standard output and error output streams are redirected to a page in the log window.
public int execAndWait()
The standard output and error output streams are redirected to a page in the log window.
public java.lang.Exception getExecException()
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.