Package org.eclipse.pde.launching
Class AbstractPDELaunchConfiguration
- java.lang.Object
- 
- org.eclipse.debug.core.model.LaunchConfigurationDelegate
- 
- org.eclipse.pde.launching.AbstractPDELaunchConfiguration
 
 
- 
- All Implemented Interfaces:
- ILaunchConfigurationDelegate,- ILaunchConfigurationDelegate2
 - Direct Known Subclasses:
- AbstractPDELaunchConfiguration,- EclipseApplicationLaunchConfiguration,- EquinoxLaunchConfiguration
 
 public abstract class AbstractPDELaunchConfiguration extends LaunchConfigurationDelegate An abstract launch delegate for PDE-based launch configurationsClients may subclass this class. This class originally existed in 3.2 as org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration.- Since:
- 3.6
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected FilefConfigDirstatic booleanshouldVMAddModuleSystemDeprecated.This field was wrongly added and is no longer used.- 
Fields inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegatecomplileErrorProjectPromptStatus, complileErrorPromptStatus, promptStatus, saveScopedDirtyEditors, switchToDebugPromptStatus
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractPDELaunchConfiguration()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidclear(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 FilegetConfigDir(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 ornullif unspecified.StringgetMainClass()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.IVMRunnergetVMRunner(ILaunchConfiguration configuration, String mode)Returns the VM runner for the given launch mode to use when launching the given configuration.Map<String,Object>getVMSpecificAttributesMap(ILaunchConfiguration configuration)Returns the Map of VM-specific attributes specified by the given launch configuration, ornullif none.FilegetWorkingDirectory(ILaunchConfiguration configuration)Returns the working directory path specified by the given launch configuration, ornullif none.protected booleanisLaunchProblem(IMarker problemMarker)voidlaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)protected voidmanageLaunch(ILaunch launch)Adds a listener to the launch to be notified at interesting launch lifecycle events such as when the launch terminates.protected voidpreLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor)Does sanity checking before launching.protected voidsetDefaultSourceLocator(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.StringshowCommandLine(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)protected voidsynchronizeManifests(ILaunchConfiguration configuration, IProgressMonitor monitor)Checks for old-style plugin.xml files that have become stale since the last launch.static voidupdatePDELaunchConfigModuleSystem(boolean java9)Deprecated.This method was wrongly added and is no longer used.protected voidvalidatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor)Validates inter-bundle dependencies automatically prior to launching if that option is turned on.protected voidvalidateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor)Checks if the Automated Management of Dependencies option is turned on.- 
Methods inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegateaddReferencedProjects, buildForLaunch, buildProjects, computeBuildOrder, computeReferencedBuildOrder, existsProblems, finalLaunchCheck, getBreakpoints, getLaunch, preLaunchCheck, saveBeforeLaunch
 
- 
 
- 
- 
- 
Field Detail- 
fConfigDirprotected File fConfigDir 
 - 
shouldVMAddModuleSystem@Deprecated public static boolean shouldVMAddModuleSystem Deprecated.This field was wrongly added and is no longer used.This field will control the addition of argument --add-modules=ALL-SYSTEM in the VM arguments during PDE launch. This VM argument is required from Java9 onwards for launching non-modular system- Since:
- 3.8
- Restriction:
- This field is not intended to be referenced by clients.
 
 
- 
 - 
Method Detail- 
isLaunchProblemprotected boolean isLaunchProblem(IMarker problemMarker) throws CoreException - Overrides:
- isLaunchProblemin class- LaunchConfigurationDelegate
- Throws:
- CoreException
 
 - 
showCommandLinepublic String showCommandLine(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException - Throws:
- CoreException
 
 - 
launchpublic void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException - Throws:
- CoreException
 
 - 
getVMRunnerpublic 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
 
 - 
setDefaultSourceLocatorprotected 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
 
 - 
getClasspathpublic 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
 
 - 
getEnvironmentpublic String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException Returns an array of environment variables to be used when launching the given configuration ornullif unspecified.- Parameters:
- configuration- launch configuration
- Returns:
- the environment variables to be used when launching or null
- Throws:
- CoreException- if unable to access associated attribute or if unable to resolve a variable in an environment variable's value
 
 - 
getWorkingDirectorypublic File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException Returns the working directory path specified by the given launch configuration, ornullif none.- Parameters:
- configuration- launch configuration
- Returns:
- the working directory path specified by the given launch
         configuration, or nullif none
- Throws:
- CoreException- if unable to retrieve the attribute
 
 - 
getVMSpecificAttributesMappublic Map<String,Object> getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException Returns the Map of VM-specific attributes specified by the given launch configuration, ornullif none.- Parameters:
- configuration- launch configuration
- Returns:
- the Mapof VM-specific attributes
- Throws:
- CoreException- if unable to retrieve the attribute
 
 - 
getVMArgumentspublic 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
 
 - 
getProgramArgumentspublic 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
 
 - 
preLaunchCheckprotected 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
 
 - 
getConfigDirprotected 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
 
 - 
getBuildOrderprotected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException - Overrides:
- getBuildOrderin class- LaunchConfigurationDelegate
- Throws:
- CoreException
 
 - 
getProjectsForProblemSearchprotected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException - Overrides:
- getProjectsForProblemSearchin class- LaunchConfigurationDelegate
- Throws:
- CoreException
 
 - 
getMainClasspublic 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
 
 - 
manageLaunchprotected 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
 
 - 
synchronizeManifestsprotected 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
 
 - 
validateProjectDependenciesprotected void validateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) Checks if the Automated Management of Dependencies option is turned on. If so, it makes sure all manifests are updated with the correct dependencies.- Parameters:
- configuration- the launch configuration
- monitor- a progress monitor
- Since:
- 3.3
 
 - 
clearprotected 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 or the clear operation was cancelled
- Since:
- 3.3
 
 - 
validatePluginDependenciesprotected 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
 
 - 
updatePDELaunchConfigModuleSystem@Deprecated public static void updatePDELaunchConfigModuleSystem(boolean java9) Deprecated.This method was wrongly added and is no longer used. It is a no-op now.Updates the field shouldVMAddModuleSystem.- Since:
- 3.8
- Restriction:
- This method is not intended to be referenced by clients.
 
 
- 
 
-