List of usage examples for org.eclipse.jface.wizard IWizardNode isContentCreated
public boolean isContentCreated();
From source file:eu.celar.ui.wizards.wizardselection.WizardSelectionListPage.java
License:Open Source License
private IWizard initWizard(final IWizardNode node) { IWizard wizard = null;/*from w w w .ja va 2 s .c om*/ if (node != null) { boolean isCreated = node.isContentCreated(); wizard = node.getWizard(); if (wizard != null && !isCreated) { if (wizard instanceof IInitializableWizard) { ((IInitializableWizard) wizard).init(this.initData); } wizard.addPages(); updateCheatSheetManager(wizard); } } return wizard; }
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);//w w w . j av a 2 s . co m 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.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 ww . j av a 2 s . c o m*/ } // Return the starting page of the wizard return wizard.getStartingPage(); } } } return null; }
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();// w w w .j a va2 s . co m // Return the starting page of the wizard return wizard.getStartingPage(); } } } return null; }