Adding launchers to the platform
Your plug-in can add launch configuration types to the platform using the
extension point. This extension point allows you to declare a
configuration type using a unique id. You must provide a corresponding
The delegate is responsible for launching its launch configuration in a specified mode.
Optionally, you can implement
which enhances the delegate interface to allow your delegate to abort a launch, build relevant projects in the workspace
before a launch, and control the creation of the launch object that is used in a launch.
In addition to defining the delegate, you can specify which launch modes are supported
by your delegate, and a name that should be used when showing launchers
of this type to the user.
The following markup shows how the Java tools declare a Java launch
configuration for launching local Java programs:
<extension point = "org.eclipse.debug.core.launchConfigurationTypes">
modes= "run, debug"
This extension defines a launch configuration delegate that can be used to run or debug programs that
are launched using the local Java launch configuration.
Defining new launch modes
We mentioned previously that the platform defines launch modes for running, debugging, or profiling
a program. These modes are defined using the
extension point. This extension point allows you to declare a launch mode by defining its string mode
name and the label that should be shown to the user to describe the mode. The following markup shows
the definition of the platform's three standard launch modes:
Note that the mode is not associated with any particular launch configuration type. As shown earlier, that association
occurs when a launch delegate is specified for a configuration type.
Defining launch delegates
Since launch modes can be specified independently of launch configuration types, it's possible that new modes
are defined that are not implemented by the original delegate for a launch configuration. In this case, a plug-in
may define a launch delegate that implements a particular mode for a particular launch configuration type.
This can be done using the
extension point. This extension point allows you to define a launch delegate that implements the specified modes
for a given configuration type. The following markup shows how you could define a delegate for profiling
a local Java application:
The specification of the delegate is similar to the way it is done when defining a launch configuration
type, except that in this case the type of launch configuration is specified along with the supported
modes. As seen previously, the delegate must implement
and can optionally implement
more control over the launch sequence.
We Have Lift-off: The Launching Framework in Eclipse
provides a start to finish example for defining your own launch type.