List of usage examples for org.eclipse.jface.dialogs IDialogConstants RETRY_ID
int RETRY_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants RETRY_ID.
Click Source Link
From source file:cn.ieclipse.pde.signer.wizard.KeyAliasDialog.java
License:Apache License
/** * Create contents of the button bar./*from w w w. j a v a2 s . c o m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { if (this.item != null) { createButton(parent, IDialogConstants.RETRY_ID, "&Delete", false); createButton(parent, IDialogConstants.IGNORE_ID, "&Export", true); } else { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:cn.ieclipse.pde.signer.wizard.KeyAliasDialog.java
License:Apache License
@Override protected void buttonPressed(int buttonId) { if (IDialogConstants.RETRY_ID == buttonId) {// delete if (delKey()) { setReturnCode(-1);/*from www. jav a2 s. c om*/ close(); } } else if (IDialogConstants.IGNORE_ID == buttonId) {// export exportKey(); } super.buttonPressed(buttonId); }
From source file:com.clustercontrol.accesscontrol.dialog.LoginDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // Customize createButtonsForButtonBar(parent) here Button button;//from ww w . j a v a 2s . com button = createButton(parent, IDialogConstants.RETRY_ID, Messages.getString("button.addlogin"), false); WidgetTestUtil.setTestId(this, "addlogin", button); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (inputList.size() >= maxConnectManager) { // ???? String msg = Messages.getString("message.accesscontrol.66", new String[] { String.valueOf(maxConnectManager) }); m_log.warn(msg); MessageDialog.openError(null, Messages.getString("message"), msg); return; } // Save inputting account info for (LoginInput input : inputList) { input.saveInfo(); } // Update counter before add a new one and copy last manager input reInitializeCounter(); LoginAccount lastInputAccount = inputList.get(inputList.size() - 1).getAccount(); inputList.add(new LoginInput(lastInputAccount.getUserId(), "", lastInputAccount.getUrl(), null)); int buttonId = ((Integer) e.widget.getData()).intValue(); setReturnCode(buttonId); close(); } }); // ? button = createButton(parent, IDialogConstants.OK_ID, Messages.getString("login"), true); WidgetTestUtil.setTestId(this, "ok", button); if (disableLoginButton) { button.setEnabled(false); } // ?. Don't need to addSelectionListener() because CANCEL button will be set by default. button = createButton(parent, IDialogConstants.CANCEL_ID, Messages.getString("cancel"), false); WidgetTestUtil.setTestId(this, "cancel", button); }
From source file:com.clustercontrol.util.LoginManager.java
License:Open Source License
public static void login(Map<String, String> map) { setup();//from w w w .j a va 2 s. co m Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); int returnCode = IDialogConstants.RETRY_ID; // Increase login attempt time getInstance().loginAttempts++; // LoginDialog dialog = new LoginDialog(shell, map); if (map.containsKey(KEY_BASIC_AUTH) && map.get(KEY_BASIC_AUTH).equals("true")) { // ? returnCode = IDialogConstants.OK_ID; } // Reopen if RETRY_ID returned while (returnCode == IDialogConstants.RETRY_ID) { returnCode = dialog.open(); } // Close all if no connection left if (returnCode != IDialogConstants.OK_ID && !LoginManager.isLogin()) { m_log.info("login() : cancel, " + returnCode); updateStatusBar(); return; } // Proceed connecting if not Close button pressed if (returnCode == IDialogConstants.OK_ID) { if (addConnect(dialog.getLoginList())) { ClientSession.doCheck(); // ?? IPreferenceStore store = ClusterControlPlugin.getDefault().getPreferenceStore(); int interval = store.getInt(KEY_INTERVAL); m_log.trace("LoginManager.getInterval() interval = " + interval); ClientSession.startChecktask(interval); // Save login info saveLoginState(); } } updateStatusBar(); }
From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java
License:Open Source License
public int retryAbortMessage(String title, String message) { // retry is the default MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.ABORT_LABEL }, IDialogConstants.RETRY_ID); return dialog.open(); }
From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java
License:Open Source License
public int retryAbortCancelMessage(String title, String message) { // retry is the default MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.ABORT_LABEL, IDialogConstants.CANCEL_LABEL }, IDialogConstants.RETRY_ID); return dialog.open(); }
From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java
License:Open Source License
public int retryOkCancelMessage(String title, String message) { // retry is the default MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, IDialogConstants.RETRY_ID); return dialog.open(); }
From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java
License:Open Source License
public int retryOkMessage(String title, String message) { // retry is the default MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, new String[] { IDialogConstants.RETRY_LABEL, IDialogConstants.OK_LABEL }, IDialogConstants.RETRY_ID); return dialog.open(); }
From source file:com.salesforce.ide.ui.wizards.project.ProjectOrganizationPage.java
License:Open Source License
private int createOfflineAbortRetryMessage(String title, String message) { // retry is the default MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, new String[] { "Create Offline", IDialogConstants.ABORT_LABEL, IDialogConstants.RETRY_LABEL }, IDialogConstants.RETRY_ID); return dialog.open(); }
From source file:org.caleydo.vis.lineup.ui.detail.JSCombineEditorDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.RETRY_ID, "Apply", false); super.createButtonsForButtonBar(parent); }