List of usage examples for org.eclipse.jface.wizard IWizard canFinish
boolean canFinish();
From source file:org.bonitasoft.studio.connectors.ui.wizard.page.ExportConnectorWizardPage.java
License:Open Source License
@Override public void doubleClick(DoubleClickEvent event) { Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement(); if (selection instanceof ConnectorImplementation) { if (getNextPage() != null) { getContainer().showPage(getNextPage()); } else {// w w w .jav a2s . c o m final IWizard wizard = getWizard(); if (wizard.canFinish() && wizard.performFinish()) { ((WizardDialog) getContainer()).close(); } } } }
From source file:org.eclipse.datatools.connectivity.internal.ui.wizards.NewCPWizard.java
License:Open Source License
/** * @see Wizard#performFinish/*from w ww . java 2 s . com*/ */ public boolean performFinish() { if (mProfilePage != null && !mProfilePage.getControl().isDisposed()) { IWizardNode selectedNode = mProfilePage.getSelectedNode(); if (selectedNode == null) return false; IWizard wizard = selectedNode.getWizard(); if (wizard == null) { return false; } else if (wizard.canFinish()) return wizard.performFinish(); } // mStore.setValue(DONNT_SHOW_INRO, mIntroPage.isHideIntro()); return true; }
From source file:org.eclipse.datatools.connectivity.oda.design.internal.ui.profile.db.DbTypesSelectionPage.java
License:Open Source License
public boolean isPageComplete() { if (super.isPageComplete()) return true; if (getSelectedNode() != null) { IWizard cpNodeWizard = getSelectedNodeWizard(); return cpNodeWizard != null && cpNodeWizard.canFinish(); }//from www . j a v a 2s . c om return false; }
From source file:org.eclipse.mylyn.tasks.ui.TasksUiUtil.java
License:Open Source License
private static boolean openNewTaskEditor(Shell shell, IWizard wizard, ITaskMapping taskSelection) { WizardDialog dialog = new WizardDialog(shell, wizard); dialog.setBlockOnOpen(true);//from w ww . j a v a 2 s.c o m // make sure the wizard has created its pages dialog.create(); if (!(wizard instanceof MultiRepositoryAwareWizard) && wizard.canFinish()) { wizard.performFinish(); return true; } int result = dialog.open(); return result == Window.OK; }
From source file:org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard.java
License:Open Source License
public boolean performFinish() { // If we are on the first page and the selected wizard has no pages then // allow it to finish. // save dialog settings mainPage.performFinish();/*ww w. j ava2 s .co m*/ if (getContainer().getCurrentPage() == mainPage) { IWizard noPageWizard = mainPage.getSelectedWizard(); if (noPageWizard != null) { if (noPageWizard.canFinish()) { return noPageWizard.performFinish(); } } } // If the wizard has pages and there are several // wizards registered then the registered wizard // will call it's own performFinish(). return true; }
From source file:org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard.java
License:Open Source License
public boolean performFinish() { // If we are on the first page and the selected wizard has no pages then allow it to finish. if (getContainer().getCurrentPage() == mainPage) { IWizard noPageWizard = mainPage.getSelectedWizard(); if (noPageWizard != null) { if (noPageWizard.canFinish()) { mainPage.savePageSettings(); return noPageWizard.performFinish(); }/*from w ww . j a v a 2s. c om*/ } } mainPage.savePageSettings(); return true; }
From source file:org.jboss.tools.common.ui.WizardUtils.java
License:Open Source License
/** * Flips to the next wizard page or finishes the current wizard. * // ww w .j a v a 2 s . c o m * @param wizardPage * the wizard page this call is executed in */ public static void nextPageOrFinish(IWizardPage wizardPage) { IWizard wizard = wizardPage.getWizard(); if (wizardPage.canFlipToNextPage()) { IWizardPage nextPage = wizard.getNextPage(wizardPage); wizard.getContainer().showPage(nextPage); } else if (wizard.canFinish()) { if (wizard.performFinish()) { wizard.getContainer().getShell().close(); } } }