Package org.eclipse.pde.ui.launcher
Class EclipseLaunchShortcut
java.lang.Object
org.eclipse.pde.ui.launcher.AbstractLaunchShortcut
org.eclipse.pde.ui.launcher.EclipseLaunchShortcut
- All Implemented Interfaces:
ILaunchShortcut
A launch shortcut capable of launching an Eclipse application.
Given the current selection, either a new Eclipse Application launch configuration is created with default settings, or the user is presented
with a list of suitable existing Eclipse Application launch configurations to choose from.
This class may be instantiated or subclassed by clients.
- Since:
- 3.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe launch configuration type name that this shortcut uses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ILaunchConfigurationThis method first tries to locate existing launch configurations that are suitable for the application or framework being launched.protected StringReturns the Eclipse application configuration type ID as declared in the plugin.xmlprotected StringReturns the name assigned to the new launch configurationprotected voidInitializes a new Eclipse Application launch configuration with defaults based on the current selection: If there is no selection or the selected project is a plug-in that does not declare an application, the default product is launched. If the selected project is a plug-in that declares an application, then that application is launched. If the selected project is a plug-in that declares more than one application, then the user is presented with a list of choices to choose from. Once an application is chosen, the plug-in is searched to see if there is a product bound to this application.protected booleanisGoodMatch(ILaunchConfiguration configuration) Returns a boolean value indicating whether the launch configuration is a good match for the application or product to launch.voidlaunch(ISelection selection, String mode) voidlaunch(IEditorPart editor, String mode) Methods inherited from class org.eclipse.pde.ui.launcher.AbstractLaunchShortcut
chooseConfiguration, launch
-
Field Details
-
CONFIGURATION_TYPE
The launch configuration type name that this shortcut uses- See Also:
-
-
Constructor Details
-
EclipseLaunchShortcut
public EclipseLaunchShortcut()
-
-
Method Details
-
launch
-
launch
-
findLaunchConfiguration
Description copied from class:AbstractLaunchShortcutThis method first tries to locate existing launch configurations that are suitable for the application or framework being launched.- If none are found, a new launch configuration is created and initialized
- If one is found, it is launched automatically
- If more than one is found, a selection dialog is presented to the user and the chosen one will be launched
- Overrides:
findLaunchConfigurationin classAbstractLaunchShortcut- Parameters:
mode- mode of launch (run, debug or profile)- Returns:
- a launch configuration to run or
nullif launch is canceled
-
isGoodMatch
Returns a boolean value indicating whether the launch configuration is a good match for the application or product to launch.- Specified by:
isGoodMatchin classAbstractLaunchShortcut- Parameters:
configuration- the launch configuration being evaluated- Returns:
trueif the launch configuration is suitable for the application or product to launch with,falseotherwise.
-
initializeConfiguration
Initializes a new Eclipse Application launch configuration with defaults based on the current selection:- If there is no selection or the selected project is a plug-in that does not declare an application, the default product is launched.
- If the selected project is a plug-in that declares an application, then that application is launched.
- If the selected project is a plug-in that declares more than one application, then the user is presented with a list of choices to choose from.
- Specified by:
initializeConfigurationin classAbstractLaunchShortcut- Parameters:
wc- the launch configuration working copy to be initialize- Since:
- 3.3
- See Also:
-
getLaunchConfigurationTypeName
Returns the Eclipse application configuration type ID as declared in the plugin.xml- Specified by:
getLaunchConfigurationTypeNamein classAbstractLaunchShortcut- Returns:
- the Eclipse application configuration type ID
-
getName
Description copied from class:AbstractLaunchShortcutReturns the name assigned to the new launch configuration- Overrides:
getNamein classAbstractLaunchShortcut- Returns:
- a name for the new launch configuration
-