List of usage examples for org.eclipse.jface.dialogs IDialogConstants BACK_ID
int BACK_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants BACK_ID.
Click Source Link
From source file:org.eclipse.buckminster.jnlp.p2.ui.general.wizard.AdvancedWizardDialog.java
License:Open Source License
public void disableNavigation() { getButton(IDialogConstants.BACK_ID).setEnabled(false); getButton(IDialogConstants.NEXT_ID).setEnabled(false); getButton(IDialogConstants.FINISH_ID).setEnabled(false); }
From source file:org.eclipse.ease.modules.unittest.ui.dialogs.AddRemarkDialog.java
License:Open Source License
/** * Create contents of the button bar.//from w w w. j av a 2 s .com * * @param parent */ @Override protected void createButtonsForButtonBar(final Composite parent) { final Button clearButton = createButton(parent, IDialogConstants.BACK_ID, "Clear", false); clearButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(final SelectionEvent e) { fTxtTitle.setText(""); fTxtDescription.setText(""); } @Override public void widgetDefaultSelected(final SelectionEvent e) { } }); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.eclipse.ease.modules.unittest.ui.dialogs.CreateReportDialog.java
License:Open Source License
/** * Create contents of the button bar.//from www . ja v a 2 s. co m * * @param parent */ @Override protected void createButtonsForButtonBar(final Composite parent) { final Button clearButton = createButton(parent, IDialogConstants.BACK_ID, "Clear", false); clearButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(final SelectionEvent e) { mTxtFileName.setText(""); mTxtTitle.setText(""); mTxtDescription.setText(""); btnOpenReportAfter.setSelection(false); } @Override public void widgetDefaultSelected(final SelectionEvent e) { } }); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { fBackButton = createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); fNextButton = createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, true); fFinishButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java
License:Open Source License
protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.BACK_ID) { turnPage(false);//from ww w . j a v a 2s . co m } else if (buttonId == IDialogConstants.NEXT_ID) { turnPage(true); } else { super.buttonPressed(buttonId); } }
From source file:org.eclipse.emf.codegen.ecore.genmodel.handler.GenerateHandler.java
License:Open Source License
public Object execute(ExecutionEvent event) throws ExecutionException { Shell shell = HandlerUtil.getActiveShell(event); List<GenModel> genModels = null; boolean usingSelection = false; ISelection selection = HandlerUtil.getCurrentSelection(event); if (selection instanceof IStructuredSelection) { Object[] selectedObjects = ((IStructuredSelection) selection).toArray(); if (selectedObjects.length >= 1) { IProgressMonitor progressMonitor = new NullProgressMonitor(); List<URI> uris = getGenModelURIs(progressMonitor, selectedObjects); if (!uris.isEmpty()) { genModels = GeneratorUIUtil.loadGenModels(progressMonitor, uris, shell); if (genModels.isEmpty()) return null; usingSelection = true;//from w ww. j a va 2 s . c o m } } } if (!usingSelection) { GenModelSelectionDialog selectionDialog = new GenModelSelectionDialog(shell, true, ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE); selectionDialog.initialize(dialogSize, dialogLocation); selectionDialog.setTitle(GenModelEditPlugin.INSTANCE.getString("_UI_GenModelSelectionDialog_title")); selectionDialog.setInitialPattern("*.genmodel"); if (selectionDialog.open() == Window.OK) { dialogSize = selectionDialog.getSize(); dialogLocation = selectionDialog.getLocation(); genModels = selectionDialog.getGenModels(); } } if (genModels != null && !genModels.isEmpty()) { GenModelGenerationDialog generationDialog = new GenModelGenerationDialog(shell, genModels); generationDialog.setShowBackButton(!usingSelection); generationDialog.initialize(dialogSize, dialogLocation); int ret = generationDialog.open(); if (ret == Window.OK) { try { new ProgressMonitorDialog(shell).run(true, true, new GeneratorUIUtil.GeneratorOperation(shell, generationDialog.getGeneratorAndArgumentsList())); } catch (Exception exception) { GenModelEditPlugin.INSTANCE.log(exception); } } else if (ret == IDialogConstants.BACK_ID) { dialogSize = generationDialog.getSize(); dialogLocation = generationDialog.getLocation(); execute(event); } } return null; }
From source file:org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizardDialog.java
License:Open Source License
@Override protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { Button button = super.createButton(parent, id, label, defaultButton); switch (id) { case IDialogConstants.NEXT_ID: nextButton = button;//from w w w .j a v a 2 s . c om break; case IDialogConstants.BACK_ID: backButton = button; break; } return button; }
From source file:org.eclipse.jface.tests.wizards.TheTestWizardDialog.java
License:Open Source License
public Button getBackButton() { return getButton(IDialogConstants.BACK_ID); }
From source file:org.eclipse.ltk.internal.ui.refactoring.RefactoringStatusDialog.java
License:Open Source License
protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.BACK_ID) { setReturnCode(IDialogConstants.BACK_ID); close();//from w ww. j ava2 s. c o m } else { super.buttonPressed(buttonId); } }
From source file:org.eclipse.ltk.internal.ui.refactoring.RefactoringStatusDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { if (!fStatus.hasFatalError()) { if (fBackButton) createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); createButton(parent, IDialogConstants.OK_ID, fLightWeight ? IDialogConstants.OK_LABEL : RefactoringUIMessages.RefactoringStatusDialog_Continue, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } else {//from ww w . j av a 2s . co m if (fBackButton) createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, fBackButton ? false : true); } }