Launch configurations can most easily be visualized by looking at their corresponding UI. Users interact with a launch configuration dialog to create instances of the different types of launch configurations that have been contributed by plug-ins. Each type of launch configuration defines a group of tabs that collect and display information about the configuration. The tab group for running a local Java application is shown below.
The tabs are contributed using the org.eclipse.debug.ui.launchConfigurationTabGroups extension point. In this extension, the id of a configuration type (defined using org.eclipse.debug.core.launchConfigurationTypes) is associated with the class that implements ILaunchConfigurationTabGroup.
It's possible that a some tab groups are only appropriate when launching the configuration in a particular mode. If this is the case, then one or more mode elements can be specified along with the class. For each mode, the tab group can be given a unique description. If no mode is specified, then the tab group will be shown on all modes that do not have a mode-specific tab group contribution. The Java application tab group is defined for run and debug modes:
<extension point="org.eclipse.debug.ui.launchConfigurationTabGroups"> <launchConfigurationTabGroup type="org.eclipse.jdt.launching.localJavaApplication" helpContextId="org.eclipse.jdt.debug.ui.launchConfigHelpContext.local_java_application" class="org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup" id="org.eclipse.jdt.debug.ui.launchConfigurationTabGroup.localJavaApplication" bannerImage="icons/full/wizban/java_app_wiz.png"> <launchMode mode="debug" perspective="org.eclipse.debug.ui.DebugPerspective" description="%localJavaApplicationTabGroupDescription.debug"> </launchMode> <launchMode mode="run" description="%localJavaApplicationTabGroupDescription.run"> </launchMode> </launchConfigurationTabGroup> ...
Note that a perspective may also be specified with a mode. This will cause the platform to switch to the specified perspective when the program is launched in that mode.
Your tab group class is responsible for creating the necessary tabs and displaying and saving the relevant data from the launch configuration attributes. A tab that is common to all configurations, CommonTab, is already implemented and can be created by any configuration. This tab manages the saving of the launch configuration as well as collecting common preferences.