Class JavaApplicationLaunchShortcut
- java.lang.Object
-
- org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut
-
- org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut
-
- All Implemented Interfaces:
ILaunchShortcut,ILaunchShortcut2
public class JavaApplicationLaunchShortcut extends JavaLaunchShortcut
Launch shortcut for local Java applications.This class may be instantiated or sub-classed.
- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description JavaApplicationLaunchShortcut()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ILaunchConfigurationcreateConfiguration(IType type)Creates and returns a new configuration based on the specified type.protected IType[]findTypes(Object[] elements, IRunnableContext context)Finds and returns the types in the given collection of elements that can be launched.protected ILaunchConfigurationTypegetConfigurationType()Returns the type of configuration this shortcut is applicable to.protected StringgetEditorEmptyMessage()Returns an error message to use when the editor does not contain a type that can be launched.protected IJavaElement[]getJavaElements(Object[] objects)Returns the Java elements corresponding to the given objects.protected StringgetSelectionEmptyMessage()Returns an error message to use when the selection does not contain a type that can be launched.protected StringgetTypeSelectionTitle()Returns a title for a type selection dialog used to prompt the user when there is more than one type that can be launched.-
Methods inherited from class org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut
chooseConfiguration, chooseType, findLaunchConfiguration, getLaunchableResource, getLaunchableResource, getLaunchConfigurations, getLaunchConfigurations, getShell, launch, launch, launch
-
-
-
-
Method Detail
-
getJavaElements
protected IJavaElement[] getJavaElements(Object[] objects)
Returns the Java elements corresponding to the given objects. Members are translated to corresponding declaring types where possible.- Parameters:
objects- selected objects- Returns:
- corresponding Java elements
- Since:
- 3.5
-
createConfiguration
protected ILaunchConfiguration createConfiguration(IType type)
Description copied from class:JavaLaunchShortcutCreates and returns a new configuration based on the specified type.- Specified by:
createConfigurationin classJavaLaunchShortcut- Parameters:
type- type to create a launch configuration for- Returns:
- launch configuration configured to launch the specified type
-
getConfigurationType
protected ILaunchConfigurationType getConfigurationType()
Description copied from class:JavaLaunchShortcutReturns the type of configuration this shortcut is applicable to.- Specified by:
getConfigurationTypein classJavaLaunchShortcut- Returns:
- the type of configuration this shortcut is applicable to
-
findTypes
protected IType[] findTypes(Object[] elements, IRunnableContext context) throws InterruptedException, CoreException
Description copied from class:JavaLaunchShortcutFinds and returns the types in the given collection of elements that can be launched.- Specified by:
findTypesin classJavaLaunchShortcut- Parameters:
elements- scope to search for types that can be launchedcontext- progress reporting context- Returns:
- collection of types that can be launched, possibly empty
- Throws:
InterruptedException- if the search is canceledCoreException- if the search fails
-
getTypeSelectionTitle
protected String getTypeSelectionTitle()
Description copied from class:JavaLaunchShortcutReturns a title for a type selection dialog used to prompt the user when there is more than one type that can be launched.- Specified by:
getTypeSelectionTitlein classJavaLaunchShortcut- Returns:
- type selection dialog title
-
getEditorEmptyMessage
protected String getEditorEmptyMessage()
Description copied from class:JavaLaunchShortcutReturns an error message to use when the editor does not contain a type that can be launched.- Specified by:
getEditorEmptyMessagein classJavaLaunchShortcut- Returns:
- error message when editor cannot be launched
-
getSelectionEmptyMessage
protected String getSelectionEmptyMessage()
Description copied from class:JavaLaunchShortcutReturns an error message to use when the selection does not contain a type that can be launched.- Specified by:
getSelectionEmptyMessagein classJavaLaunchShortcut- Returns:
- error message when selection cannot be launched
-
-