|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.runner.RunProcess
oracle.jdeveloper.runner.JRunProcess
An abstract class that represents a Java process.
Field Summary | |
protected boolean |
considerDefaultRunTarget
Whether to consider the default run target when determining the target Node . |
protected RunConfiguration |
runConfiguration
The RunConfiguration part of the project. |
protected long |
timeAfterCompile
The time after compile finished. |
Fields inherited from class oracle.ide.runner.RunProcess |
addToProcessesFolder, addToTerminateMenu, allowInput, context, determineTargetAndStarterAlready, errors, labelOverride, logCommandString, logError, logExit, logOutput, runProcessListener, showStartStatus, starter, target, timeCreated |
Constructor Summary | |
JRunProcess()
Calls JRunProcess(Context) with a null
Context . |
|
JRunProcess(Context context)
This constructor initializes fields, including runConfiguration . |
Method Summary | |
abstract boolean |
canRunInDatabase(Node node,
Database db,
java.util.List errors)
This method should return true if the JRunProcess subclass supports running in a database. |
abstract boolean |
canRunJava(Node node,
java.util.List errors)
This method should return true if the JRunProcess subclass supports running Java commands. |
protected boolean |
checkStarter(Starter starter,
java.util.List errors)
Returns whether the given starter can really be used to start a process. |
protected boolean |
compile()
Compiles the project (if appropriate). |
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. |
java.lang.String |
getBootClassPath()
This method should be overriden by a JRunProcess subclass if it needs to add items to the boot class path. |
java.lang.String |
getClassPath()
This method should be overriden by a JRunProcess subclass if it needs to add items to the class path. |
protected java.lang.Object |
getConfigDataByName(java.lang.String dataKey)
Returns a configuration from the project. |
java.lang.String[][] |
getDatabaseCommands()
If the JRunProcess subclass supports running in a database, this method should return any database commands which should be issued before the database procedure is invoked. |
java.lang.String[] |
getFirstJavaCommandOptions()
Returns the Java command options that are needed before other Java command options. |
protected JDK |
getJdkDefinition()
Returns the JDK for the project. |
JProject |
getJProject()
Returns the current JProject associated with the
JRunProcess . |
java.lang.String[] |
getLastJavaCommandOptions()
Returns the Java command options that are needed after other Java command options. |
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. |
void |
handleDatabaseError(java.lang.String[][] databaseCommands,
int i,
int j,
int errorCode)
If there was an errorcode returned while executing any of the database commands, this method will be called to handle the error. |
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 . |
void |
start()
Creates a new thread to compile the project. |
protected boolean |
startTarget()
Clears the log page associated with this run process (if appropriate). |
boolean |
useDatabaseCall()
This method should be overriden by a JRunProcess subclass if it cares about how the database command is executed. |
boolean |
waitForDatabase()
This method should be overriden by a JRunProcess subclass if it needs to do something before the database procedure is invoked. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean considerDefaultRunTarget
Node
. Usually this is true
.
protected RunConfiguration runConfiguration
protected long timeAfterCompile
Constructor Detail |
public JRunProcess()
JRunProcess(Context)
with a null
Context
.
public JRunProcess(Context context)
runConfiguration
.
If the context
is not null
, then only the
Document
of the Context
will be used as the target
Node
. The default run target in the RunConfiguration
will not be used as the target.
context
- the context for starting the processMethod Detail |
public JProject getJProject()
JProject
associated with the
JRunProcess
.
public RunConfiguration getRunConfiguration()
RunConfiguration
associated with the
JRunProcess
.
public long getTimeAfterCompile()
protected void determineTargetAndStarter()
Checks to see if the target is runnable.
determineTargetAndStarter
in class RunProcess
protected void determineTargetAndStarter(java.lang.Class starterFactorySubClass)
determineTargetAndStarter
in class RunProcess
starterFactorySubClass
- the chosen StarterFactory
must extend this class
true
if the target and starter were
determined.protected boolean checkStarter(Starter starter, java.util.List errors)
JStarter
.
checkStarter
in class RunProcess
public java.io.File getStartDirectory()
getStartDirectory
in class RunProcess
public final void start()
SwingUtilities.invokeLater(java.lang.Runnable)
is used to call
the super.start
method.
start
in class RunProcess
protected boolean compile()
This method is called on a non-event thread.
true
if there are no compiler errorsprotected boolean startTarget()
Calls the super.startTarget
method.
startTarget
in class RunProcess
true
if the process was startedpublic abstract boolean canRunInDatabase(Node node, Database db, java.util.List errors)
Examples: The runner supports running in a database. The debugger supports debugging in some databases. The profiler and code coach do not support running in any database.
If the JRunProcess subclass does not support running in a database,
a message should be added to the errors
list.
node
- the target node for this JRunProcessdb
- the databaseerrors
- the list of errorspublic java.lang.String[][] getDatabaseCommands()
public void handleDatabaseError(java.lang.String[][] databaseCommands, int i, int j, int errorCode)
databaseCommands
- the database commands being executedi
- the first index into databaseCommandsj
- the second index into databaseCommandserrorCode
- the errorcode return while executing the commandpublic boolean waitForDatabase()
public boolean useDatabaseCall()
public abstract boolean canRunJava(Node node, java.util.List errors)
node
- the target node for this JRunProcesserrors
- the list of errorspublic java.lang.String[] getFirstJavaCommandOptions()
The JStarter
that executes the Java process using
the Runtime.exec method, will call this method when
building the command line.
For example, if this method returns
"-XXdebug"
, then the Starter would insert
that in the Java command line it was to execute.
public java.lang.String getClassPath()
public java.lang.String getBootClassPath()
public java.lang.String[] getLastJavaCommandOptions()
The JStarter
that executes the Java process using
the Runtime.exec method, will call this method when
building the command line.
protected java.lang.Object getConfigDataByName(java.lang.String dataKey)
For example
getConfigDataByName(RunConfiguration.DATA_KEY)
returns the RunConfiguration.
dataKey
- the configuration keyprotected JDK getJdkDefinition()
public boolean isPlainRun()
true
if this is a plain run. A run is
considered a plain run if both getFirstJavaCommandOptions()
and getLastJavaCommandOptions()
return null or empty array.
public boolean isSameType(JRunProcess other)
true
if this is the same type of run as the
other JRunProcess
.
|
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.