Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.runner
Class Runner

java.lang.Object
  extended by oracle.ide.runner.Runner

public abstract class Runner
extends java.lang.Object

The Runner class provides methods that interact with the runner. It is used by the runner, debugger, profiler, and code coach.


Constructor Summary
Runner()
           
 
Method Summary
abstract  void addLifecycleListener(RunProcessLifecycleListener listener)
           
abstract  void addRunConfigurationLaunchNavigable(Navigable navigable)
           
abstract  void addRunConfigurationToolNavigable(Navigable navigable)
           
abstract  void addTerminateMenu(RunProcess runProcess)
          Adds a terminate menu item for the given RunProcess to the Run -> Terminate submenu.
abstract  boolean couldNodeBeRunnable(Node node)
          Returns true if there is a StarterFactory registered for the class of the given node.
abstract  boolean couldNodeBeRunnable(Node node, java.lang.Class starterFactorySubClass)
          Returns true if there is a StarterFactory registered for the class of the given node and the StarterFactory is an instanceof the specified subclass.
abstract  boolean enableRunDebugActions(Context context, java.lang.Class starterFactorySubClass)
          This method is used by the run and debug systems in order to set the enable/disable state of the run and debug actions.
abstract  java.lang.Class[] getClassesWithRegisteredStarterFactory()
          Deprecated. This method should not be used. It forces the loading of classes, and potentially extensions, that might never be used
abstract  RunProcess[] getContainedRunProcesses(RunProcess parent)
           
abstract  java.util.List<RunProcessLifecycleListener> getLifecycleListeners(Context context)
           
abstract  javax.swing.event.EventListenerList getListeners(Context context)
          Deprecated. Use getLifecycleListeners() instead
abstract  Folder getProcessesFolder()
          Returns the folder within the run manager that contains active processes.
abstract  Navigable getProjectSettingsRunnerNavigable()
          Deprecated.  
abstract  AbstractStarterFactory[] getRegisteredStarterFactories(java.lang.Class targetClass)
          Deprecated. Use getRegisteredStarterFactories(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories
abstract  AbstractStarterFactory[] getRegisteredStarterFactories(java.lang.Class targetClass, java.lang.Class starterFactorySubClass)
          Deprecated. Use getRegisteredStarterFactories(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories
abstract  AbstractStarterFactory[] getRegisteredStarterFactories(Project project, Node targetNode, java.lang.Class starterFactoryClass)
          Returns an array of StarterFactories that have been registered for the class of the Node (exactly), and that are instanceof the specified StarterFactory class.
abstract  Navigable[] getRunConfigurationLaunchNavigables(Project project)
           
abstract  Navigable[] getRunConfigurationToolNavigables(Project project)
           
abstract  Folder getRunManagerFolder()
          Returns the Run Manager Folder
abstract  NavigatorWindow getRunManagerWindow()
          Returns the Run Manager Window
abstract  javax.swing.JMenu getRunMenu()
          Returns the run menu that the Run Manager has added to the main menu bar.
static Runner getRunner()
          Returns the Runner instance that is active in the IDE.
abstract  RunnerOptions getRunnerOptions()
           
abstract  RunProcess[] getRunProcesses()
          Returns the folder within the run manager that contains active processes.
abstract  AbstractStarterFactory[] getStarterFactoriesForTarget(java.lang.Class targetClass)
          Deprecated. Use getStarterFactoriesForTarget(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories
abstract  AbstractStarterFactory[] getStarterFactoriesForTarget(java.lang.Class targetClass, java.lang.Class starterFactorySubClass)
          Deprecated. Use getStarterFactoriesForTarget(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories
abstract  AbstractStarterFactory[] getStarterFactoriesForTarget(Project project, Node targetNode, java.lang.Class starterFactoryClass)
          Returns an array of StarterFactories that have been registered for the class of the Node or one of its super classes, and that are instanceof the specified StarterFactory class.
abstract  IdeAction getViewRunManagerAction()
          Return the action for View | Run Manager.
abstract  boolean isRunManagerVisible()
          Returns true if the run manager is visible
abstract  boolean isRunning(Project project)
          This methods checks if any application in the specified project are running.
abstract  boolean isShuttingDown()
           
abstract  void registerStarterFactory(java.lang.Class targetClass, StarterFactory starterFactory)
          Registers the specified StarterFactory as a StarterFactory that can create a Starter that may start processes with the specified type of target.
abstract  void removeLifecycleListener(RunProcessLifecycleListener listener)
           
abstract  void removeTerminateMenu(RunProcess runProcess)
          Removes the terminate menu item for the given RunProcess from the Run -> Terminate submenu.
abstract  boolean selectProcess(RunProcess runProcess)
          Selects the given process in the Run Manager window.
abstract  void setProjectSettingsRunnerNavigable(Navigable navigable)
          Deprecated.  
static void setRunner(Runner runner)
          Publishes the specified Runner as the active instance in the IDE.
abstract  boolean terminate(Project project, boolean force)
          This methods requests the runner to terminate all processe running under the specified project.
abstract  void unregisterStarterFactory(java.lang.Class targetClass, StarterFactory starterFactory)
          Unregisters the specified StarterFactory for the specified type of target.
abstract  void viewRunManager()
          Shows the Run Manager window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Runner

public Runner()
Method Detail

getRunner

public static Runner getRunner()
Returns the Runner instance that is active in the IDE.


setRunner

public static void setRunner(Runner runner)
Publishes the specified Runner as the active instance in the IDE.


isRunning

public abstract boolean isRunning(Project project)
This methods checks if any application in the specified project are running. If the project parameter is null, the method checks if any application under any project is running.

Returns:
true if there is an application running.

terminate

public abstract boolean terminate(Project project,
                                  boolean force)
This methods requests the runner to terminate all processe running under the specified project. If the project parameter is null, the method tries to terminate all running processes. If the force parameter is false, the user is asked to confirm termination of any running process.

Returns:
true if termination was not cancelled.

getRunMenu

public abstract javax.swing.JMenu getRunMenu()
Returns the run menu that the Run Manager has added to the main menu bar.

Returns:
the run menu

getRunManagerWindow

public abstract NavigatorWindow getRunManagerWindow()
Returns the Run Manager Window


getRunManagerFolder

public abstract Folder getRunManagerFolder()
Returns the Run Manager Folder


getProcessesFolder

public abstract Folder getProcessesFolder()
Returns the folder within the run manager that contains active processes.

Returns:
the processes folder

getRunProcesses

public abstract RunProcess[] getRunProcesses()
Returns the folder within the run manager that contains active processes.

Returns:
array of RunProcesses currently available

viewRunManager

public abstract void viewRunManager()
Shows the Run Manager window.


isRunManagerVisible

public abstract boolean isRunManagerVisible()
Returns true if the run manager is visible


getViewRunManagerAction

public abstract IdeAction getViewRunManagerAction()
Return the action for View | Run Manager.


selectProcess

public abstract boolean selectProcess(RunProcess runProcess)
Selects the given process in the Run Manager window.

Parameters:
runProcess - the process to be selected.

addTerminateMenu

public abstract void addTerminateMenu(RunProcess runProcess)
Adds a terminate menu item for the given RunProcess to the Run -> Terminate submenu.

Parameters:
runProcess - the RunProcess that needs a terminate menu

removeTerminateMenu

public abstract void removeTerminateMenu(RunProcess runProcess)
Removes the terminate menu item for the given RunProcess from the Run -> Terminate submenu.

Parameters:
runProcess - the RunProcess that has a terminate menu that should be removed

registerStarterFactory

public abstract void registerStarterFactory(java.lang.Class targetClass,
                                            StarterFactory starterFactory)
Registers the specified StarterFactory as a StarterFactory that can create a Starter that may start processes with the specified type of target.

For example, if the targetClass param specifies JavaNode, then the starterFactory param should be able to create a Starter that may be able to start some processes where the target is a JavaNode.

A StarterFactory or its corresponding Starter may refuse to start a process at any time for any reason. For example, the StarterFactory associated with the Starter that starts Java applications would be registered with the target class JavaNode, but would refuse to start a process if the target class did not contain a "main" method.

More than one starter factory can be registered for the same target class. For example, the StarterFactory corresponding to the Starter that starts Java applications and the StarterFactory corresponding to the Starter that starts Java servlets would both be registered for the target class JavaNode. The last StarterFactory registered for a given class has first chance.

Also, one starter factory can be registered for more than one target class. For example, it may make sense to have one StarterFactory and corresponding Starter that starts both Java servlets and JSP pages. That single StarterFactory would be registered for the target classes JavaNode and JspSourceNode. To register a starter factory in an extension.xml file:

<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension">
<triggers trigger-id="Register My StarterFactory">
<runner-hook xmlns="http://xmlns.oracle.com/ide/extension/runner">
<starter-factory class="oracle.jdevimpl.runner.MyStarterFactory"
target-class="oracle.jdeveloper.runner.MyNode" />
</runner-hook>
</triggers>
</trigger-hooks>

Parameters:
targetClass - the class of the target element
starterFactory - the starterFactory to register

unregisterStarterFactory

public abstract void unregisterStarterFactory(java.lang.Class targetClass,
                                              StarterFactory starterFactory)
Unregisters the specified StarterFactory for the specified type of target.

A new StarterFactory that wants to obscure, modify, or extend the behavior of an existing StarterFactory may unregister the existing StarterFactory.

Parameters:
targetClass - the class of the target element
starterFactory - the starterFactory to unregister

getClassesWithRegisteredStarterFactory

@Deprecated
public abstract java.lang.Class[] getClassesWithRegisteredStarterFactory()
Deprecated. This method should not be used. It forces the loading of classes, and potentially extensions, that might never be used

Returns an array of target classes for which there are one or more StarterFactory registered.

Returns:
an array of Class

getRegisteredStarterFactories

@Deprecated
public abstract AbstractStarterFactory[] getRegisteredStarterFactories(java.lang.Class targetClass)
Deprecated. Use getRegisteredStarterFactories(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories

Returns an array of StarterFactory that have been registered for the given target class.

Parameters:
targetClass - the class of the target element
Returns:
an array of StarterFactory

getRegisteredStarterFactories

@Deprecated
public abstract AbstractStarterFactory[] getRegisteredStarterFactories(java.lang.Class targetClass,
                                                                                  java.lang.Class starterFactorySubClass)
Deprecated. Use getRegisteredStarterFactories(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories

Returns an array of StarterFactory that have been registered for the given target class, and that are instanceof the specified subclass.

Parameters:
targetClass - the class of the target element
starterFactorySubClass - a subclass of StarterFactory
Returns:
an array of StarterFactory

getRegisteredStarterFactories

public abstract AbstractStarterFactory[] getRegisteredStarterFactories(Project project,
                                                                       Node targetNode,
                                                                       java.lang.Class starterFactoryClass)
Returns an array of StarterFactories that have been registered for the class of the Node (exactly), and that are instanceof the specified StarterFactory class.

Parameters:
project - The project of the targetNode
targetNode - The Node that needs to be started
starterFactoryClass - The class that can start the Node; this is normally StarterFactory.class, but certain Nodes can demand a more specialized StarterFactory
Returns:
an array of StarterFactories which will not be null but might be empty

getStarterFactoriesForTarget

@Deprecated
public abstract AbstractStarterFactory[] getStarterFactoriesForTarget(java.lang.Class targetClass)
Deprecated. Use getStarterFactoriesForTarget(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories

Returns an array of StarterFactory that have been registered for a class that is the same as the given target class or one of its superclasses.

Parameters:
targetClass - the class of the target element
Returns:
an array of StarterFactory

getStarterFactoriesForTarget

@Deprecated
public abstract AbstractStarterFactory[] getStarterFactoriesForTarget(java.lang.Class targetClass,
                                                                                 java.lang.Class starterFactorySubClass)
Deprecated. Use getStarterFactoriesForTarget(Node targetNode, Class starterFactoryClass) instead. A target Node is much more useful than a target Class since this enables the Runner to better select the correct StarterFactories

Returns an array of StarterFactory that have been registered for a class that is the same as the given target class or one of its superclasses, and that are instanceof the specified subclass.

Parameters:
targetClass - the class of the target element
starterFactorySubClass - a subclass of StarterFactory
Returns:
an array of StarterFactory

getStarterFactoriesForTarget

public abstract AbstractStarterFactory[] getStarterFactoriesForTarget(Project project,
                                                                      Node targetNode,
                                                                      java.lang.Class starterFactoryClass)
Returns an array of StarterFactories that have been registered for the class of the Node or one of its super classes, and that are instanceof the specified StarterFactory class.

Parameters:
project - The project of the targetNode
targetNode - The Node that needs to be started
starterFactoryClass - The class that can start the Node; this is normally StarterFactory.class, but certain Nodes can demand a more specialized StarterFactory
Returns:
an array of StarterFactories which will not be null but might be empty

couldNodeBeRunnable

public abstract boolean couldNodeBeRunnable(Node node)
Returns true if there is a StarterFactory registered for the class of the given node.

Returns:
true if a StarterFactory has been registered; false otherwise.

couldNodeBeRunnable

public abstract boolean couldNodeBeRunnable(Node node,
                                            java.lang.Class starterFactorySubClass)
Returns true if there is a StarterFactory registered for the class of the given node and the StarterFactory is an instanceof the specified subclass.

Parameters:
starterFactorySubClass - a subclass of StarterFactory
Returns:
true if a StarterFactory has been registered; false otherwise.

enableRunDebugActions

public abstract boolean enableRunDebugActions(Context context,
                                              java.lang.Class starterFactorySubClass)
This method is used by the run and debug systems in order to set the enable/disable state of the run and debug actions. This controls whether the Run/Debug menu items are added to the context menu in the navigator, code editor, etc.

Returns true if there is a StarterFactory registered for the class of the document in the given context, the registered StarterFactory is an instanceof the specified subclass and either of the following conditions are met:

  1. The registered StarterFactory does not extend AbstractStarterFactory
  2. The registered StarterFactory extends AbstractStarterFactory and its implementation of enableRunDebugActions(Context) returns true

Parameters:
starterFactorySubClass - a subclass of StarterFactory
Returns:
true if the run and debug actions should be enabled; false otherwise.

getProjectSettingsRunnerNavigable

@Deprecated
public abstract Navigable getProjectSettingsRunnerNavigable()
Deprecated. 


setProjectSettingsRunnerNavigable

@Deprecated
public abstract void setProjectSettingsRunnerNavigable(Navigable navigable)
Deprecated. 


addRunConfigurationLaunchNavigable

public abstract void addRunConfigurationLaunchNavigable(Navigable navigable)

getRunConfigurationLaunchNavigables

public abstract Navigable[] getRunConfigurationLaunchNavigables(Project project)

addRunConfigurationToolNavigable

public abstract void addRunConfigurationToolNavigable(Navigable navigable)

getRunConfigurationToolNavigables

public abstract Navigable[] getRunConfigurationToolNavigables(Project project)

getContainedRunProcesses

public abstract RunProcess[] getContainedRunProcesses(RunProcess parent)

isShuttingDown

public abstract boolean isShuttingDown()

addLifecycleListener

public abstract void addLifecycleListener(RunProcessLifecycleListener listener)

removeLifecycleListener

public abstract void removeLifecycleListener(RunProcessLifecycleListener listener)

getLifecycleListeners

public abstract java.util.List<RunProcessLifecycleListener> getLifecycleListeners(Context context)

getListeners

@Deprecated
public abstract javax.swing.event.EventListenerList getListeners(Context context)
Deprecated. Use getLifecycleListeners() instead

Return a list of RunProcessLifecycleListeners


getRunnerOptions

public abstract RunnerOptions getRunnerOptions()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

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