List of usage examples for org.eclipse.jface.wizard IWizardPage isPageComplete
public boolean isPageComplete();
From source file:com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.java
License:Open Source License
@Override public boolean canFinish() { // Deal with lazy creation of some pages: these may not be in the page-list yet // since they are constructed lazily, so consider that option here. if (mValues.createIcon && (mIconPage == null || !mIconPage.isPageComplete())) { return false; }// w ww. j av a 2 s .c o m if (mValues.createActivity && (mTemplatePage == null || !mTemplatePage.isPageComplete())) { return false; } // Override super behavior (which just calls isPageComplete() on each of the pages) // to special case the template and icon pages since we want to skip them if // the appropriate flags are not set. for (IWizardPage page : getPages()) { if (page == mTemplatePage && !mValues.createActivity) { continue; } if (page == mIconPage && !mValues.createIcon) { continue; } if (!page.isPageComplete()) { return false; } } return true; }
From source file:com.atlassian.clover.eclipse.core.reports.GenerateReportWizard.java
/** * This wizard 'canFinish' if the following conditions are met. * <ul>// w w w.j a va2s . c o m * <li>The current page is not the starting page.</li> * <li>The current page is complete.</li> * </ul> * * @return */ @Override public boolean canFinish() { IWizardPage currentPage = this.getContainer().getCurrentPage(); if (currentPage == selectReportPage || currentPage == selectProjectsPage) { return false; } return (currentPage.isPageComplete()); }
From source file:com.codenvy.eclipse.ui.wizard.importer.ImportProjectFromCodenvyWizard.java
License:Open Source License
@Override public boolean canFinish() { final IWizardPage currentWizardPage = getContainer().getCurrentPage(); return currentWizardPage != null && currentWizardPage.getName().equals(projectWizardPage.getName()) && currentWizardPage.isPageComplete(); }
From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.AddFilesWizard.java
License:Open Source License
@Override public boolean enableNext(final IWizardPage page) { return page instanceof AddFilesWizardPage && page.isPageComplete(); }
From source file:com.microsoft.tfs.client.common.ui.dialogs.vc.AddFilesWizard.java
License:Open Source License
@Override protected boolean enableFinish(final IWizardPage currentPage) { return currentPage.isPageComplete(); }
From source file:com.microsoft.tfs.client.common.ui.framework.wizard.ExtendedWizard.java
License:Open Source License
/** * This {@link IWizard} method is overridden by {@link ExtendedWizard}. If * the current page is not complete, <code>false</code> is returned since * finishing should usually not be enabled if the current page is * incomplete. Otherwise, the subclass {@link #enableFinish(IWizardPage)} * method is called to compute finish enablement. *//*from w w w .ja v a2 s .c o m*/ @Override public boolean canFinish() { final IWizardPage currentPage = getContainer().getCurrentPage(); if (currentPage != null) { if (!currentPage.isPageComplete()) { // if we're on any page that is not complete, can't finish return false; } } return enableFinish(currentPage); }
From source file:com.motorola.studio.android.wizards.BaseWizard.java
License:Apache License
@Override public boolean canFinish() { IWizardPage currentPage = getContainer().getCurrentPage(); if (getNextPage(currentPage) == null) { return currentPage.isPageComplete(); }/* ww w.j ava 2 s .c om*/ return super.canFinish(); }
From source file:com.nextep.designer.vcs.ui.services.VersionUIHelper.java
License:Open Source License
/** * This method handles the startup of the versioning features. It handles the check of the * repository connection, its version, user setup and displays the appropriate wizards when * needed./* ww w .j ava 2 s. c om*/ * * @return <code>true</code> if startup requirements are ok, else </code>. Users should not go * on with the startup of neXtep if this method returns false. */ public static boolean startup() { final List<IWizardPage> pages = new ArrayList<IWizardPage>(); final IDatabaseConnector dbConnector = CoreUiPlugin.getRepositoryUIService().getRepositoryConnector(); final RepositoryStatus repositoryStatus = getRepositoryStatus(dbConnector); // Enabling controls switch (repositoryStatus) { case NO_CONNECTION: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryConnectionEditor()); break; case NO_REPOSITORY: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryInstallerMonitorPage(dbConnector)); pages.add(new UserCreationWizard()); break; case REPOSITORY_TOO_OLD: pages.add(new RepositoryUpgradeWizardPage(repositoryStatus)); pages.add(new RepositoryInstallerMonitorPage(dbConnector)); break; case CLIENT_TOO_OLD: // update manager cannot work here because the platform is not yet running // UpdateManagerUI.openInstaller(statusLabel.getShell()); IWorkspace view = new Workspace("Update view", ""); view.setId(1); VersionHelper.setCurrentView(view); break; } // Wizarding only if there's something to do... if (pages.size() > 0) { final Shell shell = Display.getDefault().getActiveShell(); try { final String title = VCSUIMessages.getString("repositoryUpgradeTitle"); //$NON-NLS-1$ Wizard wiz = new DefaultWizard(title) { @Override public boolean canFinish() { for (IWizardPage page : getPages()) { if (!page.isPageComplete()) { return false; } } return true; } @Override public boolean performCancel() { if (getContainer().getCurrentPage() instanceof RepositoryInstallerMonitorPage) { return false; } return super.performCancel(); } };// title,pages); WizardDialog d = new WizardDialog(shell, wiz) { @Override public void updateButtons() { super.updateButtons(); if (getCurrentPage() instanceof RepositoryInstallerMonitorPage) { getButton(IDialogConstants.CANCEL_ID).setEnabled(false); } } }; d.setHelpAvailable(true); d.setTitle(title); d.setBlockOnOpen(true); for (IWizardPage page : pages) { wiz.addPage(page); } // This setting overrides the computed size which might not be enough to display // correctly all controls d.setMinimumPageSize(500, 300); d.open(); if (d.getReturnCode() == Window.OK) { final IDatabaseConnector repoConnector = CoreUiPlugin.getRepositoryUIService() .getRepositoryConnector(); final RepositoryStatus newStatus = getRepositoryStatus(repoConnector); if (repositoryStatus == RepositoryStatus.NO_CONNECTION && newStatus != RepositoryStatus.NO_CONNECTION) { return startup(); } return newStatus == RepositoryStatus.OK; } else { return false; } } catch (CancelException e) { log.info("Action cancelled", e); return false; } catch (RuntimeException e) { MessageDialog.openError(shell, "Unexpected exception", "An unexpected exception was raised while checking the repository status, please contact neXtep Softwares.\nException was :\n" + e.getMessage()); log.error("Unexpected exception", e); return false; } } else { return true; } }
From source file:com.nokia.carbide.cpp.internal.pi.wizards.ui.NewPIWizard.java
License:Open Source License
private boolean isAllFollowingPagesComplete(IWizardPage page) { IWizardPage currentPage = page; while (currentPage != null) { if (currentPage.isPageComplete() == false) { return false; }/*from w w w . j a va 2 s .c om*/ currentPage = getNextPage(currentPage); } // after ending page return true; }
From source file:com.sap.dirigible.ide.template.ui.common.TemplateWizard.java
License:Open Source License
@Override public boolean canFinish() { final IWizardPage currentPage = getContainer().getCurrentPage(); if (currentPage == null || !currentPage.isPageComplete()) { return false; }/*w w w .j a v a 2 s . c om*/ if (getModel().validate().hasErrors()) { return false; } return followingPagesAreComplete(currentPage); }