public class JUnitLaunchShortcut extends Object implements ILaunchShortcut2
This class may be instantiated and subclassed.
Constructor and Description |
---|
JUnitLaunchShortcut()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ILaunchConfigurationWorkingCopy |
createLaunchConfiguration(IJavaElement element)
Creates a launch configuration working copy for the given element.
|
protected String[] |
getAttributeNamesToCompare()
Returns the attribute names of the attributes that are compared when looking for an existing similar launch configuration.
|
IResource |
getLaunchableResource(IEditorPart editor) |
IResource |
getLaunchableResource(ISelection selection) |
ILaunchConfiguration[] |
getLaunchConfigurations(IEditorPart editor) |
ILaunchConfiguration[] |
getLaunchConfigurations(ISelection selection) |
protected String |
getLaunchConfigurationTypeId()
Returns the launch configuration type id of the launch configuration this shortcut will create.
|
void |
launch(IEditorPart editor,
String mode) |
void |
launch(ISelection selection,
String mode) |
public void launch(IEditorPart editor, String mode)
launch
in interface ILaunchShortcut
public void launch(ISelection selection, String mode)
launch
in interface ILaunchShortcut
protected String getLaunchConfigurationTypeId()
protected ILaunchConfigurationWorkingCopy createLaunchConfiguration(IJavaElement element) throws CoreException
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.element
- element to launchCoreException
- if creation failedprotected String[] getAttributeNamesToCompare()
public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection)
getLaunchConfigurations
in interface ILaunchShortcut2
public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editor)
getLaunchConfigurations
in interface ILaunchShortcut2
public IResource getLaunchableResource(ISelection selection)
getLaunchableResource
in interface ILaunchShortcut2
public IResource getLaunchableResource(IEditorPart editor)
getLaunchableResource
in interface ILaunchShortcut2
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.