/** * Handles the config prototype unapply button being selected */ private void handleUnlinkPrototypeButtonSelected() { try { fAppliedPrototype = null; ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy(); workingCopy.setPrototype(null, false); fPrototypeText.setText(""); //$NON-NLS-1$ fAttributesTreeViewer.setInput(null); fUnlinkPrototypeButton.setEnabled(false); fResetPrototypeButton.setEnabled(false); updateProductDecorator(); setDirty(true); updateLaunchConfigurationDialog(); reinitTabs(workingCopy); } catch (CoreException e) { DebugUIPlugin.log(e.getStatus()); } }
/** * Handles the config prototype reset button being selected */ private void handleResetPrototypeButtonSelected() { try { ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy(); workingCopy.setPrototype(fAppliedPrototype, true); fAttributesTreeViewer.refresh(); setDirty(true); updateLaunchConfigurationDialog(); reinitTabs(workingCopy); } catch (CoreException e) { DebugUIPlugin.log(e.getStatus()); } }
if (selectedPrototype instanceof ILaunchConfiguration) { fAppliedPrototype = (ILaunchConfiguration) selectedPrototype; ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy(); workingCopy.setPrototype(fAppliedPrototype, true); fPrototypeText.setText(((ILaunchConfiguration) selectedPrototype).getName());