List of usage examples for org.eclipse.jface.dialogs IDialogConstants PROCEED_ID
int PROCEED_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants PROCEED_ID.
Click Source Link
From source file:com.aptana.ide.syncing.ui.old.views.SmartSyncDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default startSync = createButton(parent, IDialogConstants.PROCEED_ID, Messages.SmartSyncDialog_StartSync, true); GridData gridData = new GridData(SWT.FILL, SWT.END, false, false); GC gc = new GC(startSync); // calculates the ideal width gridData.widthHint = Math.max(gc.stringExtent(Messages.SmartSyncDialog_StartSync).x, gc.stringExtent(Messages.SmartSyncDialog_RunInBackground).x) + 50; gc.dispose();//from ww w . ja v a 2 s. com startSync.setLayoutData(gridData); startSync.addSelectionListener(this); saveLog = createButton(parent, IDialogConstants.DETAILS_ID, "Save Log...", false); //$NON-NLS-1$ saveLog.addSelectionListener(this); saveLog.setEnabled(false); cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); cancel.addSelectionListener(this); }
From source file:com.genuitec.org.eclipse.egit.ui.internal.branch.CleanupUncomittedChangesDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.PROCEED_ID: CommitUI commitUI = new CommitUI(getShell(), repository, new IResource[0], true); shouldContinue = commitUI.commit(); break;// w ww . j a v a 2s . c om case IDialogConstants.ABORT_ID: final ResetOperation operation = new ResetOperation(repository, Constants.HEAD, ResetType.HARD); String jobname = NLS.bind(UIText.ResetAction_reset, Constants.HEAD); JobUtil.scheduleUserWorkspaceJob(operation, jobname, JobFamilies.RESET); shouldContinue = true; break; case IDialogConstants.SKIP_ID: StashCreateUI stashCreateUI = new StashCreateUI(repository); shouldContinue = stashCreateUI.createStash(getShell()); break; case IDialogConstants.CANCEL_ID: } super.buttonPressed(buttonId); }
From source file:com.genuitec.org.eclipse.egit.ui.internal.branch.CleanupUncomittedChangesDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); createButton(parent, IDialogConstants.PROCEED_ID, UIText.BranchResultDialog_buttonCommit, false); createButton(parent, IDialogConstants.SKIP_ID, UIText.BranchResultDialog_buttonStash, false); createButton(parent, IDialogConstants.ABORT_ID, UIText.BranchResultDialog_buttonReset, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }
From source file:com.google.gdt.eclipse.designer.model.property.css.StylePropertyEditor.java
License:Open Source License
private void openEditDialog(Property property) throws Exception { ObjectProperty objectProperty = (ObjectProperty) property; ObjectInfo objectInfo = objectProperty.getObjectInfo(); IGwtStateProvider stateProvider = (IGwtStateProvider) objectInfo; // prepare not empty array of CSS files List<IFile> cssFiles = stateProvider.getState().getCssSupport().getFiles(); if (cssFiles.isEmpty()) { MessageDialog.openError(DesignerPlugin.getShell(), "Error", "There are no CSS files referenced from module or HTML."); return;/*from ww w . j a v a 2 s . co m*/ } // prepare dialog StylesEditDialog stylesDialog; { String currentText = getText(property); stylesDialog = new StylesEditDialog(DesignerPlugin.getShell(), cssFiles, StringUtils.isEmpty(currentText) ? "" : "." + currentText, true); } // open dialog and edit CSS files int result = stylesDialog.open(); if (result == Window.CANCEL) { return; } // wait for auto-build - for coping CSS files from source folder to binary ProjectUtils.waitForAutoBuild(); // check CSS files modification stateProvider.getState().isModified(); // do edit switch (result) { case Window.OK: // "OK" button pressed, refresh for displaying modified styles ExecutionUtils.refresh(objectInfo); break; case IDialogConstants.PROCEED_ID: // "Apply" button pressed, set new style name String newSelector = stylesDialog.getSelectionValue(); String newStyleName = extractStyleName(newSelector); property.setValue(newStyleName); break; } }
From source file:com.google.gdt.eclipse.designer.model.property.css.StylesEditDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); if (m_showApplyButton) { createButton(parent, IDialogConstants.PROCEED_ID, "Apply", false); }//www .j a va 2 s . co m }
From source file:com.google.gdt.eclipse.designer.model.property.css.StylesEditDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { super.buttonPressed(buttonId); if (buttonId == IDialogConstants.PROCEED_ID) { applyChanges();/*from ww w.ja v a 2s .c o m*/ setReturnCode(buttonId); close(); } }
From source file:com.quantcomponents.ui.marketdata.TimeChartDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.PROCEED_ID, "Apply", false); super.createButtonsForButtonBar(parent); }
From source file:com.quantcomponents.ui.marketdata.TimeChartDialog.java
License:Open Source License
protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.PROCEED_ID) { executeChange();//from ww w. j a v a2 s .c o m } else { super.buttonPressed(buttonId); } }
From source file:com.rinke.solutions.pinball.GlobalExceptionHandler.java
public void showError(Exception e) { display.asyncExec(new Runnable() { @Override// ww w .j a v a 2s .c o m public void run() { if (e instanceof LicenseException) { MessageBox messageBox = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK); messageBox.setText("License problem"); messageBox.setMessage("This action requires a license. Error message was: " + e.getMessage() + "\nIf you hav a license file please register your key file via menu Help/Register."); messageBox.open(); } else { MultiStatus status = createMultiStatus(e.getLocalizedMessage(), e); ErrorDialog errorDialog = new ErrorDialog(Display.getCurrent().getActiveShell(), "Error", "Ein unerwarteter Fehler ist aufgetreten", status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR) { protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.ABORT_ID, IDialogConstants.ABORT_LABEL, true); createButton(parent, IDialogConstants.PROCEED_ID, IDialogConstants.PROCEED_LABEL, false); createDetailsButton(parent); } @Override protected void buttonPressed(int id) { super.buttonPressed(id); if (id == IDialogConstants.ABORT_ID || id == IDialogConstants.PROCEED_ID) { setReturnCode(id); close(); } } }; int ret = errorDialog.open(); if (ret == IDialogConstants.ABORT_ID) System.exit(1); } //System.out.println(ret); // cancel = 1 lastException = null; } }); }
From source file:com.twinsoft.convertigo.eclipse.dialogs.CouchVariablesDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { /* APPLY ACTION */ Button buttonApply = createButton(parent, IDialogConstants.PROCEED_ID, "Apply", true); buttonApply.addSelectionListener(new SelectionListener() { @Override/*from w ww . java 2 s . co m*/ public void widgetSelected(SelectionEvent e) { applyProceed(); } @Override public void widgetDefaultSelected(SelectionEvent e) { } }); buttonApply.setEnabled(true); }