org.eclipse.jdt.junit.launcher
Class JUnitLaunchShortcut
java.lang.Object
org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut
-
All Implemented Interfaces:
-
ILaunchShortcut,
ILaunchShortcut2
-
public class JUnitLaunchShortcut
- extends
Object
- implements
ILaunchShortcut2
The launch shortcut to launch JUnit tests.
This class may be instantiated and subclassed.
-
Since:
- 3.3
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
JUnitLaunchShortcut
public JUnitLaunchShortcut()
- Default constructor.
launch
public void launch(
IEditorPart editor,
String mode)
-
-
Specified by:
-
launch
in interface
ILaunchShortcut
-
launch
public void launch(
ISelection selection,
String mode)
-
-
Specified by:
-
launch
in interface
ILaunchShortcut
-
getLaunchConfigurationTypeId
protected
String getLaunchConfigurationTypeId()
- Returns the launch configuration type id of the launch configuration this shortcut will create. Clients can override this method to
return the id of their launch configuration.
-
-
-
Returns:
- the launch configuration type id of the launch configuration this shortcut will create
createLaunchConfiguration
protected
ILaunchConfigurationWorkingCopy createLaunchConfiguration(
IJavaElement element)
throws
CoreException
- Creates a launch configuration working copy for the given element. The launch configuration type created will be of the type returned by
getLaunchConfigurationTypeId()
.
The element type can only be of type
IJavaProject
,
IPackageFragmentRoot
,
IPackageFragment
,
IType
or
IMethod
.
Clients can extend this method (should call super) to configure additional attributes on the launch configuration working copy.
-
-
-
Parameters:
-
element
- element to launch
-
Returns:
- a launch configuration working copy for the given element
-
Throws:
-
CoreException
- if creation failed
getAttributeNamesToCompare
protected
String[] getAttributeNamesToCompare()
- Returns the attribute names of the attributes that are compared when looking for an existing similar launch configuration.
Clients can override and replace to customize.
-
-
-
Returns:
- the attribute names of the attributes that are compared
getLaunchConfigurations
public
ILaunchConfiguration[] getLaunchConfigurations(
ISelection selection)
-
-
-
Specified by:
-
getLaunchConfigurations
in interface
ILaunchShortcut2
-
-
Since:
- 3.4
getLaunchConfigurations
public
ILaunchConfiguration[] getLaunchConfigurations(
IEditorPart editor)
-
-
-
Specified by:
-
getLaunchConfigurations
in interface
ILaunchShortcut2
-
-
Since:
- 3.4
getLaunchableResource
public
IResource getLaunchableResource(
ISelection selection)
-
-
-
Specified by:
-
getLaunchableResource
in interface
ILaunchShortcut2
-
-
Since:
- 3.4
getLaunchableResource
public
IResource getLaunchableResource(
IEditorPart editor)
-
-
-
Specified by:
-
getLaunchableResource
in interface
ILaunchShortcut2
-
-
Since:
- 3.4
Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.