Package org.eclipse.debug.ui
Interface ILaunchShortcut2
-
- All Superinterfaces:
ILaunchShortcut
public interface ILaunchShortcut2 extends ILaunchShortcut
An extension to a standard launch shortcut (
ILaunchShortcut) allowing launch shortcuts to specify how selections and editors should be launched.To launch a selection (or active editor), the debug platform derives a resource associated with the selection (or active editor), and then resolves the most recently launched configuration associated with that resource. This interface allows a launch shortcut to override the framework's resource and launch configuration resolution for selections (and active editors).
NOTE: the methods in this interface can be called in a non-UI thread.
Clients contributing a launch shortcut are intended to implement this interface.
- Since:
- 3.4
- See Also:
ContextRunner,LaunchingResourceManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IResourcegetLaunchableResource(ISelection selection)Returns anIResourcethat maps to the given selection for launch purposes, ornullif none.IResourcegetLaunchableResource(IEditorPart editorpart)Returns anIResourcethat maps to given editor part for launch purposes, ornullif none.ILaunchConfiguration[]getLaunchConfigurations(ISelection selection)Returns an array ofILaunchConfigurations that apply to the specified selection, an empty collection if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations.ILaunchConfiguration[]getLaunchConfigurations(IEditorPart editorpart)Returns an array of existingILaunchConfigurations that could be used to launch the given editor part, an empty array if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations-
Methods inherited from interface org.eclipse.debug.ui.ILaunchShortcut
launch, launch
-
-
-
-
Method Detail
-
getLaunchConfigurations
ILaunchConfiguration[] getLaunchConfigurations(ISelection selection)
Returns an array ofILaunchConfigurations that apply to the specified selection, an empty collection if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations.- Parameters:
selection- the current selection- Returns:
- an array of existing
ILaunchConfigurations that could be used to launch the given selection, an empty array if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations
-
getLaunchConfigurations
ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editorpart)
Returns an array of existingILaunchConfigurations that could be used to launch the given editor part, an empty array if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations- Parameters:
editorpart- the current selection- Returns:
- an array of existing
ILaunchConfigurations that could be used to launch the given editor part/editor input, an empty array if one could be created but does not exist, ornullif default resource mappings should be used to derive associated configurations
-
getLaunchableResource
IResource getLaunchableResource(ISelection selection)
Returns anIResourcethat maps to the given selection for launch purposes, ornullif none. The resource is used to resolve a configuration to launch if this shortcut does not provide specific launch configurations to launch for the selection (viagetLaunchConfigurations(ISelection).- Parameters:
selection- the current selection- Returns:
- an
IResourcethat maps to the given selection for launch purposes ornullif none
-
getLaunchableResource
IResource getLaunchableResource(IEditorPart editorpart)
Returns anIResourcethat maps to given editor part for launch purposes, ornullif none. The resource is used to resolve a configuration to launch if this shortcut does not provide specific launch configurations to launch for the editor (viagetLaunchConfigurations(IEditorPart).- Parameters:
editorpart- the current editor part- Returns:
- an
IResourcethat maps to given editor part for launch purposes, ornullif none
-
-