@Override protected void buttonPressed(int buttonId) { if (buttonId == OK) { name = nameText.getText(); pushMode = forPush.getSelection(); } super.buttonPressed(buttonId); }
/** * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) */ @Override protected void buttonPressed(int buttonId) { /** Set the inputValue if OK is pressed */ if (buttonId == IDialogConstants.OK_ID) { userString = user.getText(); passwordString = password.getText(); } else { userString = passwordString = null; } super.buttonPressed(buttonId); }
/** * {@inheritDoc} */ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { newName = nameBox.getText().trim(); if (!descriptionBox.getText().trim().isEmpty()) { newDescription = descriptionBox.getText().trim(); } } super.buttonPressed(buttonId); }
@Override protected void buttonPressed(int buttonId) { super.buttonPressed(buttonId); if (buttonId == CONFIGURE) { super.buttonPressed(IDialogConstants.OK_ID); PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Dialog dlg = SimpleConfigureFetchDialog.getDialog( PlatformUI.getWorkbench().getDisplay() .getActiveShell(), localDb); dlg.open(); } }); } }
@Override protected void buttonPressed(int buttonId) { super.buttonPressed(buttonId); if (buttonId == CONFIGURE) { super.buttonPressed(IDialogConstants.OK_ID); PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Dialog dlg = SimpleConfigurePushDialog.getDialog(PlatformUI .getWorkbench().getDisplay().getActiveShell(), localDb); dlg.open(); } }); } }
/** * {@inheritDoc} */ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { cmrRepositoryDefinition = new CmrRepositoryDefinition(ipBox.getText().trim(), Integer.parseInt(portBox.getText()), nameBox.getText().trim()); if (!descriptionBox.getText().trim().isEmpty()) { cmrRepositoryDefinition.setDescription(descriptionBox.getText().trim()); } else { cmrRepositoryDefinition.setDescription(""); } } super.buttonPressed(buttonId); }
/** * * @param buttonId */ protected void launchButtonPressed(int buttonId) { if (buttonId == ID_LAUNCH_BUTTON) { handleLaunchPressed(); } else if (buttonId == ID_CLOSE_BUTTON) { handleClosePressed(); } else { super.buttonPressed(buttonId); } }
/** * Handle the 'close' & 'launch' buttons here, all others are handled * in <code>Dialog</code> * * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) */ @Override protected void buttonPressed(int buttonId) { if (buttonId == ID_LAUNCH_BUTTON) { handleLaunchPressed(); } else if (buttonId == ID_CLOSE_BUTTON) { handleClosePressed(); } else { super.buttonPressed(buttonId); } }
@Override protected void buttonPressed(int buttonId) { if (buttonId == OK) try { String newName = name.getText(); new RenameBranchOperation(repository, branchToRename, newName) .execute(null); } catch (CoreException e) { Activator.handleError( UIText.BranchRenameDialog_RenameExceptionMessage, e, true); return; } super.buttonPressed(buttonId); } }
/** * {@inheritDoc} */ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { if (returnButton.getSelection()) { contextCapture = new ReturnContextCapture(); } else if (parameterButton.getSelection()) { ParameterContextCapture capture = new ParameterContextCapture(); capture.setIndex(Integer.parseInt(indexText.getText())); contextCapture = capture; } else if (fieldButton.getSelection()) { FieldContextCapture capture = new FieldContextCapture(); capture.setFieldName(fieldText.getText()); contextCapture = capture; } contextCapture.setDisplayName(nameText.getText()); if (CollectionUtils.isNotEmpty(paths)) { contextCapture.setPaths(paths); } } super.buttonPressed(buttonId); }
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case CLEAR_ID: tagNameText.setText(""); //$NON-NLS-1$ tagMessageText.setText(""); //$NON-NLS-1$ if (commitCombo != null) { commitCombo.clearSelection(); } tagMessageText.getTextWidget().setEditable(true); overwriteButton.setEnabled(false); overwriteButton.setSelection(false); break; case IDialogConstants.OK_ID: // read and store data from widgets tagName = tagNameText.getText(); if (commitCombo != null) tagCommit = commitCombo.getValue(); tagMessage = tagMessageText.getCommitMessage(); overwriteTag = overwriteButton.getSelection(); //$FALL-THROUGH$ continue propagating OK button action default: super.buttonPressed(buttonId); } }
@Override protected void buttonPressed(int buttonId) { if (buttonId == Window.OK) { if (needsUpdate) { userScopedConfig.setString(ConfigConstants.CONFIG_USER_SECTION, null, ConfigConstants.CONFIG_KEY_NAME, userName .getText()); userScopedConfig .setString(ConfigConstants.CONFIG_USER_SECTION, null, ConfigConstants.CONFIG_KEY_EMAIL, email .getText()); try { userScopedConfig.save(); } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } } if (dontShowAgain.getSelection()) Activator.getDefault().getPreferenceStore().setValue( UIPreferences.SHOW_INITIAL_CONFIG_DIALOG, false); } super.buttonPressed(buttonId); } }
/** * {@inheritDoc} */ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { if (null == agentMapping) { agentMapping = new AgentMapping(); } agentMapping.setActive(activeButton.getSelection()); agentMapping.setAgentName(nameText.getText()); agentMapping.setIpAddress(ipText.getText()); agentMapping.setDescription(descriptionText.getText()); agentMapping.setEnvironmentId(environments.get(environmentCombo.getSelectionIndex()).getId()); } super.buttonPressed(buttonId); }
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: performOk(); break; case DEFAULT_ID: fillOptionsMapFromOptions(); tv.refresh(); break; case APPLY_ID: performOk(); break; default: break; } super.buttonPressed(buttonId); }
super.buttonPressed(buttonId);
return; super.buttonPressed(buttonId);
return; super.buttonPressed(buttonId);