List of usage examples for org.eclipse.jface.wizard IWizard addPages
void addPages();
From source file:at.medevit.elexis.ehc.ui.dialog.ExportWizardSelectionPage.java
License:Open Source License
/** * The <code>WizardSelectionPage</code> implementation of this <code>IWizardPage</code> method * returns the first page of the currently selected wizard if there is one. */// www. ja va 2 s. c om public IWizardPage getNextPage() { if (selectedWizardDescriptor == null) { return null; } IWizard wizard = null; try { wizard = selectedWizardDescriptor.createWizard(); } catch (CoreException e) { e.printStackTrace(); } if (wizard == null) { setSelectedDescriptor(null); return null; } if (!selectedWizardDescriptors.contains(selectedWizardDescriptor)) { wizard.addPages(); addSelectedDescriptor(selectedWizardDescriptor); } return wizard.getStartingPage(); }
From source file:com.siteview.mde.internal.ui.wizards.WizardListSelectionPage.java
License:Open Source License
public IWizardPage getNextPage(boolean shouldCreate) { if (!shouldCreate) return super.getNextPage(); IWizardNode selectedNode = getSelectedNode(); selectedNode.dispose();// w ww . j a v a 2 s .co m IWizard wizard = selectedNode.getWizard(); if (wizard == null) { super.setSelectedNode(null); return null; } if (shouldCreate) // Allow the wizard to create its pages wizard.addPages(); return wizard.getStartingPage(); }
From source file:eu.celar.ui.wizards.wizardselection.WizardSelectionListPage.java
License:Open Source License
private IWizard initWizard(final IWizardNode node) { IWizard wizard = null; if (node != null) { boolean isCreated = node.isContentCreated(); wizard = node.getWizard();/*from ww w. j a v a2 s .c o m*/ if (wizard != null && !isCreated) { if (wizard instanceof IInitializableWizard) { ((IInitializableWizard) wizard).init(this.initData); } wizard.addPages(); updateCheatSheetManager(wizard); } } return wizard; }
From source file:org.eclipse.cdt.ui.templateengine.TemplateListSelectionPage.java
License:Open Source License
public IWizardPage getNextPage(boolean shouldCreate) { if (!shouldCreate) { return super.getNextPage(); }// ww w .jav a 2 s. c om IWizardNode selectedNode = getSelectedNode(); selectedNode.dispose(); IWizard wizard = selectedNode.getWizard(); if (wizard == null) { super.setSelectedNode(null); return null; } if (shouldCreate) { wizard.addPages(); } return wizard.getStartingPage(); }
From source file:org.eclipse.datatools.connectivity.internal.ui.wizards.CPWizardSelectionPage.java
License:Open Source License
public IWizardPage getNextPage() { IWizardNode selectedNode = this.getSelectedNode(); if (selectedNode == null) return null; IProfileWizardProvider wizardProvider = ((CPWizardNode) getSelectedNode()).getProvider(); boolean isCreated = selectedNode.isContentCreated(); IWizard wizard = selectedNode.getWizard(); if (wizard == null) { setSelectedNode(null);/*from w w w.j av a 2 s. c om*/ return null; } if (wizard instanceof NewCategoryWizard) { List categoryItems = getCategoryItems(wizardProvider.getId()); if (categoryItems.size() == 1) { // Get next wizard and the wizard provider for next page. IWizardNode wizardNode = (IWizardNode) categoryItems.get(0); isCreated = wizardNode.isContentCreated(); wizard = wizardNode.getWizard(); wizardProvider = ((CPWizardNode) wizardNode).getProvider(); } } if (!isCreated) { initWizard(wizard, wizardProvider); if (wizard instanceof NewConnectionProfileWizard) { NewConnectionProfileWizard ancpw = (NewConnectionProfileWizard) wizard; ancpw.setProfileName(getProfileName()); ancpw.setProfileDescription(getProfileDescription()); } // Allow the wizard to create its pages wizard.addPages(); } else { if (wizard instanceof NewConnectionProfileWizard) { NewConnectionProfileWizard ancpw = (NewConnectionProfileWizard) wizard; ancpw.setProfileName(getProfileName()); ancpw.setProfileDescription(getProfileDescription()); } } if (this.mPageIsVisible) { if (wizard instanceof NewConnectionProfileWizard) { NewConnectionProfileWizard ancpw = (NewConnectionProfileWizard) wizard; ancpw.setSkipProfileNamePage(true); } } return wizard.getStartingPage(); }
From source file:org.eclipse.datatools.connectivity.internal.ui.wizards.WizardSelectionPage.java
License:Open Source License
/** * The <code>WizardSelectionPage</code> implementation of * this <code>IWizardPage</code> method returns the first page * of the currently selected wizard if there is one. *//* w ww . j a va 2 s. co m*/ public IWizardPage getNextPage() { if (selectedNode == null) return null; boolean isCreated = selectedNode.isContentCreated(); IWizard wizard = selectedNode.getWizard(); if (wizard == null) { setSelectedNode(null); return null; } if (!isCreated) { // Extended behavior by shongxum initWizard(wizard); // Allow the wizard to create its pages wizard.addPages(); } return wizard.getStartingPage(); }
From source file:org.eclipse.jst.j2ee.internal.wizard.NewJ2EEComponentSelectionPage.java
License:Open Source License
/** * The <code>WizardSelectionPage</code> implementation of this * <code>IWizardPage</code> method returns the first page of the currently * selected wizard if there is one.//from www.ja v a2 s . c o m */ @Override public IWizardPage getNextPage() { if (selectedNode == null) return null; IPluginContribution pluginContribution = new IPluginContribution() { public String getLocalId() { String id = null; if (selectedNode == appClientNode) { id = "org.eclipse.jst.j2ee.internal.internal.internal.appclientProjectWizard"; //$NON-NLS-1$ } else if (selectedNode == ejbNode) { id = "org.eclipse.jst.j2ee.internal.internal.internal.ejb.ui.util.ejbProjectWizard"; //$NON-NLS-1$ } else if (selectedNode == connectorNode) { id = "org.eclipse.jst.j2ee.internal.internal.internal.jcaProjectWizard"; //$NON-NLS-1$ } else if (selectedNode == webNode) { id = "org.eclipse.jst.j2ee.internal.internal.internal.webProjectWizard"; //$NON-NLS-1$ } return id; } public String getPluginId() { return "org.eclipse.jst.j2ee.internal.internal.internal.ui"; //$NON-NLS-1$ } }; if (!WorkbenchActivityHelper.allowUseOf(null, pluginContribution)) { return null; } boolean isCreated = selectedNode.isContentCreated(); IWizard wizard = selectedNode.getWizard(); if (wizard == null) { setSelectedNode(null); return null; } if (!isCreated) // Allow the wizard to create its pages wizard.addPages(); return wizard.getStartingPage(); }
From source file:org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardSelectionPage.java
License:Open Source License
@Override public IWizardPage getNextPage() { ITriggerPoint triggerPoint = workbench.getActivitySupport().getTriggerPointManager() .getTriggerPoint(WorkbenchTriggerPoints.NEW_WIZARDS); if (triggerPoint == null || WorkbenchActivityHelper.allowUseOf(triggerPoint, getSelectedNode())) { IWizardNode selectedNode = getSelectedNode(); if (selectedNode != null) { // Determine if the content got create before(!) triggering // the wizard creation boolean isCreated = selectedNode.isContentCreated(); // Get the wizard from the selected node (triggers wizard creation if needed) IWizard wizard = selectedNode.getWizard(); if (wizard != null) { // If the wizard got created by the call to getWizard(), // then allow the wizard to create its pages if (!isCreated) { wizard.addPages(); }/* w w w. j av a 2s .c om*/ // Return the starting page of the wizard return wizard.getStartingPage(); } } } return null; }
From source file:org.eclipse.team.internal.ui.wizards.ConfigurationWizardElement.java
License:Open Source License
/** * Return whether the wizard created for this element has pages. * Unfortunately, the only way to find this out is to create the wizard. * @param projects the projects being shared * @return whether the resulting wizard has pages *//*from w ww .j a va2 s . co m*/ public boolean wizardHasPages(IProject[] projects) { try { IWizard wizard = (IWizard) createExecutableExtension(projects); try { wizard.addPages(); return (wizard.getPageCount() > 0); } finally { wizard.dispose(); } } catch (CoreException e) { TeamUIPlugin.log(e); } catch (RuntimeException e) { // If a general exception occurred here, log it and continue TeamUIPlugin.log(IStatus.ERROR, "An internal error occurred", e); //$NON-NLS-1$ } return false; }
From source file:org.eclipse.tm.te.ui.wizards.newWizard.NewWizardSelectionPage.java
License:Open Source License
@Override public IWizardPage getNextPage() { ITriggerPoint triggerPoint = workbench.getActivitySupport().getTriggerPointManager() .getTriggerPoint(WorkbenchTriggerPoints.NEW_WIZARDS); if (triggerPoint == null || WorkbenchActivityHelper.allowUseOf(triggerPoint, getSelectedNode())) { IWizardNode selectedNode = getSelectedNode(); if (selectedNode != null) { // Determine if the content got create before(!) triggering // the wizard creation boolean isCreated = selectedNode.isContentCreated(); // Get the wizard from the selected node (triggers wizard creation if needed) IWizard wizard = selectedNode.getWizard(); if (wizard != null) { // If the wizard got created by the call to getWizard(), // then allow the wizard to create its pages if (!isCreated) wizard.addPages(); // Return the starting page of the wizard return wizard.getStartingPage(); }/*from ww w .j a v a 2 s . c om*/ } } return null; }