Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] Run/Debug convenience actions


Users have expressed an interest for launch actions that are selection sensitive. In the past, we accomodated selection sensitive launching by having launch configuration suppliers contribute their own action sets for launching based on selection. However, this solution does not scale well, and was very similar to actions alreay provided by the debug framework to create a new launch configuration of a specific type (from the debug/run as.. menu). These two mechanism have now been combined.

Changes
(1) The extension point "org.eclipse.debug.ui.launchConfigurationShortcuts" has been replaced with a new extension point "org.eclipse.debug.ui.launchShortcuts"
(2) A new interface has been added - org.eclipse.debug.ui.ILaunchShortcut.

Extensions register an "ILaunchShortcut" for a set of perspectives in which it should be available, and a set of modes that it supports. A short cut is invoked when the user explicitly selects a corresponding action from the "Run/Debug As..." cascade menu. The shortcut is invoked with either the workbench selection (if any), or the active editor. It is up to the shortcut to interpret the selection/editor and perform the appropriate launch (possibly creating a new launch configuration, or re-using an existing configuration).

As an example, see "org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationShortcut". This shortcut is used to launch "Local Java Applications". The shortcut is registered for the Java perspective, Java browsing perspective, Java hierarchy perspective, and Debug perspective. When invoked it searches the selection/editor for types with a main method, allowing the user to choose a type to launch. If required, a new launch cofiguration is created (if possible, and existing configuration is re-used), and launched.

These changes have been released to HEAD.

Darin

 

Back to the top