@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed(); return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed(); return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
protected void okPressed() { super.okPressed(); if (pendingOperations!=null) { // process pending operations for (int i=0; i<pendingOperations.size(); i++) { PendingOperation op = (PendingOperation)pendingOperations.get(i); if (op.action==NEW_ID) descManager.add(op.desc); else descManager.remove(op.desc); } pendingOperations = null; } descManager.save(); } }
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed(); return; } case IDialogConstants.CANCEL_ID: { cancelPressed(); return; } case IDialogConstants.HELP_ID: { helpPressed(); return; } } }
@Override protected void okPressed() { super.okPressed(); if (getReturnCode() == FAILED) { return; } if (workingCopyManager != null) { try { workingCopyManager.applyChanges(); } catch (BackingStoreException e) { String msg = e.getMessage(); if (msg == null) { msg = WorkbenchMessages.FilteredPreferenceDialog_PreferenceSaveFailed; } StatusUtil .handleStatus( WorkbenchMessages.PreferencesExportDialog_ErrorDialogTitle + ": " + msg, e, StatusManager.SHOW, //$NON-NLS-1$ getShell()); } } // Run the update jobs updateJobs.forEach(Job::schedule); }