org.eclipse.pde.ui.launcher
Class AbstractPDELaunchConfiguration
java.lang.Object
org.eclipse.debug.core.model.LaunchConfigurationDelegate
org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration
-
All Implemented Interfaces:
-
ILaunchConfigurationDelegate,
ILaunchConfigurationDelegate2
-
Direct Known Subclasses:
-
EclipseApplicationLaunchConfiguration,
EquinoxLaunchConfiguration
-
public abstract class AbstractPDELaunchConfiguration
- extends
LaunchConfigurationDelegate
An abstract launch delegate for PDE-based launch configurations
Clients may subclass this class.
-
Since:
- 3.2
Method Summary
|
protected void
|
clear
(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
By default, this method does nothing. |
protected
IProject[]
|
getBuildOrder
(
ILaunchConfiguration configuration,
String mode)
|
String[]
|
getClasspath
(
ILaunchConfiguration configuration)
Returns the entries that should appear on boot classpath. |
protected
File
|
getConfigDir
(
ILaunchConfiguration configuration)
Returns the configuration area specified by the given launch
configuration. |
String[]
|
getEnvironment
(
ILaunchConfiguration configuration)
Returns an array of environment variables to be used when
launching the given configuration or null if unspecified. |
String
|
getMainClass
()
Returns the fully-qualified name of the class to launch. |
String[]
|
getProgramArguments
(
ILaunchConfiguration configuration)
Returns the program arguments to launch with. |
protected
IProject[]
|
getProjectsForProblemSearch
(
ILaunchConfiguration configuration,
String mode)
|
String[]
|
getVMArguments
(
ILaunchConfiguration configuration)
Returns the VM arguments specified by the given launch configuration, as
an array of strings. |
IVMRunner
|
getVMRunner
(
ILaunchConfiguration configuration,
String mode)
Returns the VM runner for the given launch mode to use when launching the
given configuration. |
Map
|
getVMSpecificAttributesMap
(
ILaunchConfiguration configuration)
Returns the Map of VM-specific attributes specified by the given launch
configuration, or null if none. |
File
|
getWorkingDirectory
(
ILaunchConfiguration configuration)
Returns the working directory path specified by the given launch
configuration, or null if none. |
protected boolean
|
isLaunchProblem
(
IMarker problemMarker)
|
void
|
launch
(
ILaunchConfiguration configuration,
String mode,
ILaunch launch,
IProgressMonitor monitor)
|
protected void
|
manageLaunch
(
ILaunch launch)
Adds a listener to the launch to be notified at interesting launch lifecycle
events such as when the launch terminates. |
protected void
|
preLaunchCheck
(
ILaunchConfiguration configuration,
ILaunch launch,
IProgressMonitor monitor)
Does sanity checking before launching. |
protected void
|
setDefaultSourceLocator
(
ILaunchConfiguration configuration)
Assigns a default source locator to the given launch if a source locator
has not yet been assigned to it, and the associated launch configuration
does not specify a source locator. |
protected void
|
synchronizeManifests
(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
Checks for old-style plugin.xml files that have become stale since the last launch. |
protected void
|
validatePluginDependencies
(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
Validates inter-bundle dependencies automatically prior to launching
if that option is turned on. |
protected void
|
validateProjectDependencies
(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
Checks if the Automated Management of Dependencies option is turned on. |
Methods inherited from class org.eclipse.debug.core.model.
LaunchConfigurationDelegate
|
addReferencedProjects,
buildForLaunch,
buildProjects,
computeBuildOrder,
computeReferencedBuildOrder,
existsProblems,
finalLaunchCheck,
getBreakpoints,
getLaunch,
preLaunchCheck,
saveBeforeLaunch
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
fConfigDir
protected
File fConfigDir
AbstractPDELaunchConfiguration
public AbstractPDELaunchConfiguration()
isLaunchProblem
protected boolean isLaunchProblem(
IMarker problemMarker)
throws
CoreException
-
-
Overrides:
-
isLaunchProblem
in class
LaunchConfigurationDelegate
-
-
Throws:
-
CoreException
launch
public void launch(
ILaunchConfiguration configuration,
String mode,
ILaunch launch,
IProgressMonitor monitor)
throws
CoreException
-
-
Throws:
-
CoreException
getVMRunner
public
IVMRunner getVMRunner(
ILaunchConfiguration configuration,
String mode)
throws
CoreException
- Returns the VM runner for the given launch mode to use when launching the
given configuration.
-
-
Parameters:
-
configuration
- launch configuration -
mode
- launch node
-
Returns:
- VM runner to use when launching the given configuration in the given mode
-
Throws:
-
CoreException
- if a VM runner cannot be determined
setDefaultSourceLocator
protected void setDefaultSourceLocator(
ILaunchConfiguration configuration)
throws
CoreException
- Assigns a default source locator to the given launch if a source locator
has not yet been assigned to it, and the associated launch configuration
does not specify a source locator.
-
-
Parameters:
-
configuration
- configuration being launched
-
Throws:
-
CoreException
- if unable to set the source locator
getClasspath
public
String[] getClasspath(
ILaunchConfiguration configuration)
throws
CoreException
- Returns the entries that should appear on boot classpath.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the location of startup.jar and
the bootstrap classpath specified by the given launch configuration
-
Throws:
-
CoreException
- if unable to find startup.jar
getEnvironment
public
String[] getEnvironment(
ILaunchConfiguration configuration)
throws
CoreException
- Returns an array of environment variables to be used when
launching the given configuration or
null
if unspecified.
-
-
Parameters:
-
configuration
- launch configuration
-
Throws:
-
CoreException
- if unable to access associated attribute or if
unable to resolve a variable in an environment variable's value
getWorkingDirectory
public
File getWorkingDirectory(
ILaunchConfiguration configuration)
throws
CoreException
- Returns the working directory path specified by the given launch
configuration, or
null
if none.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the working directory path specified by the given launch
configuration, or
null
if none
-
Throws:
-
CoreException
- if unable to retrieve the attribute
getVMSpecificAttributesMap
public
Map getVMSpecificAttributesMap(
ILaunchConfiguration configuration)
throws
CoreException
- Returns the Map of VM-specific attributes specified by the given launch
configuration, or
null
if none.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the
Map
of VM-specific attributes
-
Throws:
-
CoreException
- if unable to retrieve the attribute
getVMArguments
public
String[] getVMArguments(
ILaunchConfiguration configuration)
throws
CoreException
- Returns the VM arguments specified by the given launch configuration, as
an array of strings.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the VM arguments specified by the given launch configuration,
possibly an empty array
-
Throws:
-
CoreException
- if unable to retrieve the attribute
getProgramArguments
public
String[] getProgramArguments(
ILaunchConfiguration configuration)
throws
CoreException
- Returns the program arguments to launch with.
This list is a combination of arguments computed by PDE based on attributes
specified in the given launch configuration, followed by the program arguments
that the entered directly into the launch configuration.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the program arguments necessary for launching
-
Throws:
-
CoreException
- if unable to retrieve the attribute or create the
necessary configuration files
preLaunchCheck
protected void preLaunchCheck(
ILaunchConfiguration configuration,
ILaunch launch,
IProgressMonitor monitor)
throws
CoreException
- Does sanity checking before launching. The criteria whether the launch should
proceed or not is specific to the launch configuration type.
-
-
Parameters:
-
configuration
- launch configuration -
launch
- the launch object to contribute processes and debug targets to -
monitor
- a progress monitor
-
Throws:
-
CoreException
- exception thrown if launch fails or canceled or if unable to retrieve attributes
from the launch configuration
getConfigDir
protected
File getConfigDir(
ILaunchConfiguration configuration)
- Returns the configuration area specified by the given launch
configuration.
-
-
Parameters:
-
configuration
- launch configuration
-
Returns:
- the directory path specified by the given launch
configuration
getBuildOrder
protected
IProject[] getBuildOrder(
ILaunchConfiguration configuration,
String mode)
throws
CoreException
-
-
Overrides:
-
getBuildOrder
in class
LaunchConfigurationDelegate
-
-
Throws:
-
CoreException
getProjectsForProblemSearch
protected
IProject[] getProjectsForProblemSearch(
ILaunchConfiguration configuration,
String mode)
throws
CoreException
-
-
Overrides:
-
getProjectsForProblemSearch
in class
LaunchConfigurationDelegate
-
-
Throws:
-
CoreException
getMainClass
public
String getMainClass()
- Returns the fully-qualified name of the class to launch.
-
-
Returns:
- the fully-qualified name of the class to launch. Must not return
null
. -
Since:
- 3.3
manageLaunch
protected void manageLaunch(
ILaunch launch)
- Adds a listener to the launch to be notified at interesting launch lifecycle
events such as when the launch terminates.
-
-
Parameters:
-
launch
- the launch -
Since:
- 3.3
synchronizeManifests
protected void synchronizeManifests(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
- Checks for old-style plugin.xml files that have become stale since the last launch.
For any stale plugin.xml files found, the corresponding MANIFEST.MF is deleted
from the runtime configuration area so that it gets regenerated upon startup.
-
-
Parameters:
-
configuration
- the launch configuration -
monitor
- a progress monitor -
Since:
- 3.3
validateProjectDependencies
protected void validateProjectDependencies(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
- Checks if the Automated Management of Dependencies option is turned on.
If so, it makes aure all manifests are updated with the correct dependencies.
-
-
Parameters:
-
configuration
- the launch configuration -
monitor
- a progress monitor -
Since:
- 3.3
clear
protected void clear(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
throws
CoreException
- By default, this method does nothing. Clients should override, if appropriate.
-
-
Parameters:
-
configuration
- the launch configuration -
monitor
- the progress monitor
-
Throws:
-
CoreException
- if unable to retrieve launch attribute values -
Since:
- 3.3
validatePluginDependencies
protected void validatePluginDependencies(
ILaunchConfiguration configuration,
IProgressMonitor monitor)
throws
CoreException
- Validates inter-bundle dependencies automatically prior to launching
if that option is turned on.
-
-
Parameters:
-
configuration
- the launch configuration -
monitor
- a progress monitor
-
Throws:
-
CoreException
-
Since:
- 3.3
Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.