An Eclipse Launch Configuration can now be based on a prototype.
A prototype seeds attributes in its associated Eclipse Launch Configurations with the settings specified in the Prototype Tab.
Once an Eclipse Launch Configuration has been created, you can override any initial settings from the prototype. You can also reset the settings of an Eclipse Launch Configuration with the ones from its prototype. An Eclipse Launch Configuration maintains a link to its prototype, but is a complete stand-alone launch configuration than can be launched, exported, shared, etc.
Create a prototype via the New Prototype menu item or the New Prototype button in the toolbar.
Existing prototypes have a small P in the top right corner of their icon.
Delete a prototype the same way you delete an Eclipse Launch Configuration:via the Delete menu item or the Delete button in the toolbar.
The Prototype Tab allows you to select the attributes that will be applied to the linked Eclipse Launch Configurations.
It also indicates the value of all attributes of the Eclipse Launch Configuration.
Link an Eclipse Launch Configuration to a prototype via the Link Prototype menu item.
The link action opens a dialog allowing to select the prototype to link with.
Unlink an Eclipse Launch Configuration to a prototype via the Unlink Prototype menu item.
You can also link and unlink via the Link... and Unlink... buttons in the Prototype Tab.
The difference is then you have to use the Apply button to validate the actions.
You can reset the attributes of an Eclipse Launch Configuration via the Reset with Prototype values menu item.
You can also reset the attributes values via the Reset to Prototype button in the Prototype Tab.
The difference is that you have to use the Apply button to validate the reset.
Prototypes are already enabled for JDT and PDE launch configurations. Others projects have to enable prototypes in org.eclipse.debug.core.launchConfigurationTypes extension point:
<extension point="org.eclipse.debug.core.launchConfigurationTypes"> <launchConfigurationType allowPrototypes="true" delegate="org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedJavaLaunchDelegate" delegateDescription="%localJavaApplicationDelegate.description" delegateName="%eclipseJDTLauncher.name" id="org.eclipse.jdt.launching.localJavaApplication" migrationDelegate="org.eclipse.jdt.internal.launching.JavaMigrationDelegate" modes="run, debug" name="%localJavaApplication" sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"> </launchConfigurationType> </extension>and also implement
org.eclipse.debug.ui.AbstractLaunchConfigurationTab.initializeAttributes()
for their specifics tabs.