Package org.eclipse.pde.launching
Class JUnitLaunchConfigurationDelegate
java.lang.Object
org.eclipse.debug.core.model.LaunchConfigurationDelegate
org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate
- All Implemented Interfaces:
IDebugEventSetListener
,ILaunchConfigurationDelegate
,ILaunchConfigurationDelegate2
A launch delegate for launching JUnit Plug-in tests.
This class originally existed in 3.3 as
org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate
.
- Since:
- 3.6
-
Field Summary
Modifier and TypeFieldDescriptionprotected File
Caches the configuration directory when a launch is startedFields inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate
complileErrorProjectPromptStatus, complileErrorPromptStatus, promptStatus, saveScopedDirtyEditors, switchToDebugPromptStatus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
clear
(ILaunchConfiguration configuration, IProgressMonitor monitor) Clears the workspace prior to launching if the workspace exists and the option to clear it is turned on.protected void
collectExecutionArguments
(ILaunchConfiguration configuration, List<String> vmArguments, List<String> programArgs) protected String
getApplication
(ILaunchConfiguration configuration) Returns the application to launch plug-in tests withprotected IProject[]
getBuildOrder
(ILaunchConfiguration configuration, String mode) String[]
getClasspath
(ILaunchConfiguration configuration) Deprecated.String[][]
getClasspathAndModulepath
(ILaunchConfiguration configuration) protected File
getConfigurationDirectory
(ILaunchConfiguration configuration) Returns the location of the configuration areaString[]
getEnvironment
(ILaunchConfiguration configuration) getModuleCLIOptions
(ILaunchConfiguration configuration) getProgramArguments
(ILaunchConfiguration configuration) protected IProject[]
getProjectsForProblemSearch
(ILaunchConfiguration configuration, String mode) static Collection<String>
getRequiredJunitRuntimePlugins
(ILaunchConfiguration configuration) getVMArguments
(ILaunchConfiguration configuration) getVMRunner
(ILaunchConfiguration configuration, String mode) getVMSpecificAttributesMap
(ILaunchConfiguration configuration) getWorkingDirectory
(ILaunchConfiguration configuration) 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) protected void
setDefaultSourceLocator
(ILaunch launch, ILaunchConfiguration configuration) showCommandLine
(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) 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.verifyMainTypeName
(ILaunchConfiguration configuration) Methods inherited from class org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
evaluateTests, launch
Methods inherited from class org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
allowAdvancedSourcelookup, getBootpath, getBootpathExt, getBreakpoints, getDefaultWorkingDirectory, getJavaLibraryPath, getJavaProject, getJavaProjectName, getLaunch, getLaunchManager, getMainTypeName, getVMArguments, getVMConnectorId, getVMInstall, getVMInstallName, getVMInstallType, getVMInstallTypeId, getWorkingDirectoryPath, handleDebugEvents, isAllowTerminate, isLaunchProblem, isStopInMain, preLaunchCheck, prepareStopInMain, supportsModule, supportsPreviewFeatures, verifyJavaProject, verifyVMInstall, verifyWorkingDirectory
Methods inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate
addReferencedProjects, buildForLaunch, buildProjects, computeBuildOrder, computeReferencedBuildOrder, existsProblems, finalLaunchCheck, saveBeforeLaunch
-
Field Details
-
fConfigDir
Caches the configuration directory when a launch is started
-
-
Constructor Details
-
JUnitLaunchConfigurationDelegate
public JUnitLaunchConfigurationDelegate()
-
-
Method Details
-
getVMRunner
- Overrides:
getVMRunner
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
verifyMainTypeName
- Overrides:
verifyMainTypeName
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
abort
- Overrides:
abort
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
getModuleCLIOptions
- Overrides:
getModuleCLIOptions
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
collectExecutionArguments
protected void collectExecutionArguments(ILaunchConfiguration configuration, List<String> vmArguments, List<String> programArgs) throws CoreException - Overrides:
collectExecutionArguments
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
showCommandLine
public String showCommandLine(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException - Specified by:
showCommandLine
in interfaceILaunchConfigurationDelegate
- Overrides:
showCommandLine
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
getApplication
Returns the application to launch plug-in tests with- Parameters:
configuration
- The launch configuration in which the application is specified.- Returns:
- the application
- Since:
- 3.5
-
getProgramArguments
- Overrides:
getProgramArguments
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getVMArguments
- Overrides:
getVMArguments
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getEnvironment
- Overrides:
getEnvironment
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getClasspath
Deprecated.- Overrides:
getClasspath
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
getClasspathAndModulepath
public String[][] getClasspathAndModulepath(ILaunchConfiguration configuration) throws CoreException - Overrides:
getClasspathAndModulepath
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
getWorkingDirectory
- Overrides:
getWorkingDirectory
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getVMSpecificAttributesMap
public Map<String,Object> getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException - Overrides:
getVMSpecificAttributesMap
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
setDefaultSourceLocator
protected void setDefaultSourceLocator(ILaunch launch, ILaunchConfiguration configuration) throws CoreException - Overrides:
setDefaultSourceLocator
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getConfigurationDirectory
Returns the location of the configuration area- Parameters:
configuration
- the launch configuration- Returns:
- a directory where the configuration area is located
-
getBuildOrder
protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException - Overrides:
getBuildOrder
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
getProjectsForProblemSearch
protected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException - Overrides:
getProjectsForProblemSearch
in classAbstractJavaLaunchConfigurationDelegate
- Throws:
CoreException
-
manageLaunch
Adds a listener to the launch to be notified at interesting launch lifecycle events such as when the launch terminates.- Parameters:
launch
- the launch
-
preLaunchCheck
protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException - Overrides:
preLaunchCheck
in classJUnitLaunchConfigurationDelegate
- Throws:
CoreException
-
getRequiredJunitRuntimePlugins
- Parameters:
configuration
- non null config- Returns:
- required plugins
- Restriction:
- This method is not intended to be referenced by clients.
-
synchronizeManifests
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 configurationmonitor
- the progress monitor
-
clear
protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException Clears the workspace prior to launching if the workspace exists and the option to clear it is turned on. Also clears the configuration area if that option is chosen.- Parameters:
configuration
- the launch configurationmonitor
- the progress monitor- Throws:
CoreException
- if unable to retrieve launch attribute values- 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 configurationmonitor
- a progress monitor
-
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 configurationmonitor
- a progress monitor- Throws:
CoreException
-