@Override public void checkStateChanged(CheckStateChangedEvent event) { try { Object data = event.getElement(); if (data instanceof Entry) { fAppliedPrototype.setPrototypeAttributeVisibility(((Entry<String, Object>) data).getKey(), event.getChecked()); setDirty(true); updateLaunchConfigurationDialog(); } } catch (CoreException e) { DebugUIPlugin.log(e.getStatus()); } } }
/** * 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()); } }
@Override public void run() { IStructuredSelection selection = fAttributesTreeViewer.getStructuredSelection(); try { ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy(); for (Object element : selection.toList()) { if (element instanceof Entry) { String key = ((Entry<String, Object>) element).getKey(); if (fAppliedPrototype.getPrototypeVisibleAttributes().contains(key)) { Object prototypeValue = fAppliedPrototype.getAttributes().get(key); workingCopy.setAttribute(key, prototypeValue); } } } 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()); } }
updateColumnsWidth(); updateProductDecorator(); setDirty(true); updateLaunchConfigurationDialog(); reinitTabs(workingCopy);