List of usage examples for org.eclipse.jface.dialogs IDialogConstants STOP_ID
int STOP_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants STOP_ID.
Click Source Link
From source file:com.clustercontrol.approval.dialog.ApprovalDetailDialog.java
License:Open Source License
private void createButtonsForStopButtonBar(Composite parent) { //??/*from www . ja va 2 s .c o m*/ createButton(parent, IDialogConstants.STOP_ID, Messages.getString("approval.stop"), false); // createButton(parent, IDialogConstants.CANCEL_ID, Messages.getString("cancel"), false); }
From source file:com.clustercontrol.approval.dialog.ApprovalDetailDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { if (IDialogConstants.YES_ID == buttonId) { OperationApprove(true);/*from w w w .j av a2 s .c om*/ } else if (IDialogConstants.NO_ID == buttonId) { OperationApprove(false); } else if (IDialogConstants.OK_ID == buttonId) { okPressed(); } else if (IDialogConstants.CANCEL_ID == buttonId) { cancelPressed(); } else if (IDialogConstants.STOP_ID == buttonId) { OperationStop(approvalInfo); } }
From source file:org.eclipse.sirius.common.ui.tools.api.dialog.SiriusMessageDialogWithToggle.java
License:Open Source License
/** * Attempt to find a standard JFace button id that matches the specified * button label. If no match can be found, use the default id provided. * /*www .j av a 2s . com*/ * Overridden to investigate the provided buttons. * * @param buttonLabel * the button label whose id is sought * @param defaultId * the id to use for the button if there is no standard id * @return the id for the specified button label */ // CHECKSTYLE:OFF private int mapButtonLabelToButtonID(String buttonLabel, int defaultId) { // CHECKSTYLE:OON // Not pretty but does the job... if (IDialogConstants.OK_LABEL.equals(buttonLabel)) { return IDialogConstants.OK_ID; } if (IDialogConstants.YES_LABEL.equals(buttonLabel)) { return IDialogConstants.YES_ID; } if (IDialogConstants.NO_LABEL.equals(buttonLabel)) { return IDialogConstants.NO_ID; } if (IDialogConstants.CANCEL_LABEL.equals(buttonLabel)) { return IDialogConstants.CANCEL_ID; } if (IDialogConstants.YES_TO_ALL_LABEL.equals(buttonLabel)) { return IDialogConstants.YES_TO_ALL_ID; } if (IDialogConstants.SKIP_LABEL.equals(buttonLabel)) { return IDialogConstants.SKIP_ID; } if (IDialogConstants.STOP_LABEL.equals(buttonLabel)) { return IDialogConstants.STOP_ID; } if (IDialogConstants.ABORT_LABEL.equals(buttonLabel)) { return IDialogConstants.ABORT_ID; } if (IDialogConstants.RETRY_LABEL.equals(buttonLabel)) { return IDialogConstants.RETRY_ID; } if (IDialogConstants.IGNORE_LABEL.equals(buttonLabel)) { return IDialogConstants.IGNORE_ID; } if (IDialogConstants.PROCEED_LABEL.equals(buttonLabel)) { return IDialogConstants.PROCEED_ID; } if (IDialogConstants.OPEN_LABEL.equals(buttonLabel)) { return IDialogConstants.OPEN_ID; } if (IDialogConstants.CLOSE_LABEL.equals(buttonLabel)) { return IDialogConstants.CLOSE_ID; } if (IDialogConstants.BACK_LABEL.equals(buttonLabel)) { return IDialogConstants.BACK_ID; } if (IDialogConstants.NEXT_LABEL.equals(buttonLabel)) { return IDialogConstants.NEXT_ID; } if (IDialogConstants.FINISH_LABEL.equals(buttonLabel)) { return IDialogConstants.FINISH_ID; } if (IDialogConstants.HELP_LABEL.equals(buttonLabel)) { return IDialogConstants.HELP_ID; } if (IDialogConstants.NO_TO_ALL_LABEL.equals(buttonLabel)) { return IDialogConstants.NO_TO_ALL_ID; } if (IDialogConstants.SHOW_DETAILS_LABEL.equals(buttonLabel)) { return IDialogConstants.DETAILS_ID; } if (IDialogConstants.HIDE_DETAILS_LABEL.equals(buttonLabel)) { return IDialogConstants.DETAILS_ID; } for (String providedButton : buttonsMap.keySet()) { if (providedButton.equals(buttonLabel)) { return buttonsMap.get(providedButton); } } // No XXX_LABEL in IDialogConstants for these. Unlikely // they would be used in a message dialog though. // public int SELECT_ALL_ID = 18; // public int DESELECT_ALL_ID = 19; // public int SELECT_TYPES_ID = 20; return defaultId; }
From source file:org.fusesource.ide.sap.ui.dialog.TestServerDialog.java
License:Open Source License
/** * Create contents of the button bar.//from ww w . ja v a2 s.c om * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, START_ID, Messages.TestServerDialog_Start, false); createButton(parent, IDialogConstants.STOP_ID, IDialogConstants.STOP_LABEL, false); createButton(parent, CLEAR_ID, Messages.TestServerDialog_Clear, false); createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true); }
From source file:org.fusesource.ide.sap.ui.dialog.TestServerDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { super.buttonPressed(buttonId); if (buttonId == START_ID) { startServer();//w w w . ja v a 2 s. co m } else if (buttonId == IDialogConstants.STOP_ID) { stopServer(); } else if (buttonId == CLEAR_ID) { clearConsole(); } else if (buttonId == IDialogConstants.CLOSE_ID) { closePressed(); } }
From source file:org.jkiss.dbeaver.ui.dialogs.ConnectionLostDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.STOP_ID, stopButtonName, true); createButton(parent, IDialogConstants.RETRY_ID, IDialogConstants.RETRY_LABEL, false); createButton(parent, IDialogConstants.IGNORE_ID, IDialogConstants.IGNORE_LABEL, false); createDetailsButton(parent);//from www . j a v a 2 s. c o m }
From source file:org.jkiss.dbeaver.ui.dialogs.exec.ExecutionQueueErrorDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Details buttons createButton(parent, IDialogConstants.STOP_ID, IDialogConstants.STOP_LABEL, true); createButton(parent, IDialogConstants.RETRY_ID, IDialogConstants.RETRY_LABEL, false); if (script) { createButton(parent, IDialogConstants.SKIP_ID, IDialogConstants.SKIP_LABEL, false); createButton(parent, IDialogConstants.IGNORE_ID, IDialogConstants.IGNORE_LABEL, false); }/*from w w w.j a v a 2 s . com*/ createDetailsButton(parent); }
From source file:org.jkiss.dbeaver.ui.dialogs.exec.ExecutionQueueErrorJob.java
License:Open Source License
@Override public IStatus runInUIThread(DBRProgressMonitor monitor) { ExecutionQueueErrorDialog dialog = new ExecutionQueueErrorDialog(DBeaverUI.getActiveWorkbenchShell(), "Execution Error", "Error occurred during " + errorName, GeneralUtils.makeExceptionStatus(error), IStatus.INFO | IStatus.WARNING | IStatus.ERROR, queue); int result = dialog.open(); switch (result) { case IDialogConstants.STOP_ID: response = ExecutionQueueErrorResponse.STOP; break;/*from ww w . j a v a2 s . com*/ case IDialogConstants.SKIP_ID: response = ExecutionQueueErrorResponse.IGNORE; break; case IDialogConstants.RETRY_ID: response = ExecutionQueueErrorResponse.RETRY; break; default: response = ExecutionQueueErrorResponse.IGNORE_ALL; break; } return Status.OK_STATUS; }
From source file:org.jkiss.dbeaver.ui.editors.DatabaseLazyEditorInput.java
License:Apache License
public IDatabaseEditorInput initializeRealInput(final DBRProgressMonitor monitor) throws DBException { final DBNModel navigatorModel = DBeaverCore.getInstance().getNavigatorModel(); while (!dataSource.isConnected()) { boolean connected; try {//from w w w. j ava2 s. c o m connected = dataSource.connect(monitor, true, true); } catch (final DBException e) { // Connection error final Integer result = new UITask<Integer>() { @Override protected Integer runTask() { ConnectionLostDialog clDialog = new ConnectionLostDialog( DBeaverUI.getActiveWorkbenchShell(), dataSource, e, "Close"); return clDialog.open(); } }.execute(); if (result == IDialogConstants.STOP_ID) { // Close editor return null; } else if (result == IDialogConstants.RETRY_ID) { continue; } else { return new ErrorEditorInput(GeneralUtils.makeExceptionStatus(e), navigatorModel.getNodeByObject(dataSource)); } } if (!connected) { throw new DBException("Connection to '" + dataSource.getName() + "' canceled"); } break; } try { DBNDataSource dsNode = (DBNDataSource) navigatorModel.getNodeByObject(monitor, dataSource, true); if (dsNode == null) { throw new DBException("Datasource '" + dataSource.getName() + "' navigator node not found"); } dsNode.initializeNode(monitor, null); final DBNNode node = navigatorModel.getNodeByPath(monitor, project, nodePath); if (node == null) { throw new DBException("Navigator node '" + nodePath + "' not found"); } if (node instanceof DBNDatabaseNode) { EntityEditorInput realInput = new EntityEditorInput((DBNDatabaseNode) node); realInput.setDefaultFolderId(activeFolderId); realInput.setDefaultPageId(activePageId); return realInput; } else { throw new DBException("Database node has bad type: " + node.getClass().getName()); } } catch (DBException e) { return new ErrorEditorInput(GeneralUtils.makeExceptionStatus(e), navigatorModel.getNodeByObject(dataSource)); } }