List of usage examples for org.eclipse.jface.wizard IWizardPage getNextPage
public IWizardPage getNextPage();
From source file:com.mentor.nucleus.bp.core.test.ComponentContextMenuTests.java
License:Open Source License
private void performContextMenuAssignSignalActionOnSM_TXN(Transition_c obj) { assertNotNull(obj);/*from w w w . j a v a2s . co m*/ IFile file = obj.getFile(); TestUtil.changeFileReadonlyStatus(m_readonly, file); editor = UITestingUtilities.addElementToGraphicalSelection(obj); // get the menu from the SWT Canvas Menu menu = editor.getCanvas().getMenu(); // check the status of the action assertTrue(UITestingUtilities.checkItemStatusInContextMenu(menu, "Assign Signal", "", m_readonly)); GenericPackageAssignSignalOnSM_TXNAction asa = new GenericPackageAssignSignalOnSM_TXNAction(); asa.setActivePart(null, editor.getSite().getPart()); IStructuredSelection structuredSelection = Selection.getInstance().getStructuredSelection(); WizardDialog wd = asa.SM_TXN_GenericPackageAssignSignal(structuredSelection); assertNotNull(wd); IWizardPage wp = wd.getCurrentPage(); assertNotNull(wp); if (!(wp instanceof GenericPackageAssignSignalOnSM_TXNWizardPage1)) { fail("Expected assign signal wizard page 1, but was " + wp.getClass().getName()); } else { String[] items = ((GenericPackageAssignSignalOnSM_TXNWizardPage1) wp).InterfaceCombo.getItems(); assertTrue("Expected exactly one interface, found " + items.length, items.length == 1); IWizardPage wp2 = wp.getNextPage(); if (!(wp2 instanceof GenericPackageAssignSignalOnSM_TXNWizardPage2)) { fail("Expected assign signal wizard page 2, but was " + wp2.getClass().getName()); } else { items = ((GenericPackageAssignSignalOnSM_TXNWizardPage2) wp2).SignalCombo.getItems(); assertTrue("Expected exactly two signals, found " + items.length, items.length == 2); } } wd.close(); }
From source file:com.nokia.testfw.codegen.ui.wizard.NewTestCaseWizardTest.java
License:Open Source License
public void testCreateTestSuitePerform() { wizard.setShowChooseProjectPage(true); dialog.open();/* w w w . j ava 2 s .com*/ TestUtils.delay(3000); IWizardPage currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); dialog.getShell().getDisplay().syncExec(new Runnable() { public void run() { wizard.performFinish(); } }); dialog.close(); TestUtils.delay(3000); IFolder testfolder = targetProject.getFolder("tsrc"); assertTrue(testfolder.exists()); }
From source file:com.nokia.testfw.codegen.ui.wizard.NewTestCaseWizardTest.java
License:Open Source License
public void testCreateTestCasePerform() { wizard.setShowChooseProjectPage(false); dialog.open();/*w w w. j a v a 2 s . c om*/ TestUtils.delay(3000); IWizardPage currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); currentPage = dialog.getCurrentPage(); dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); currentPage = dialog.getCurrentPage(); if (currentPage instanceof LocationAndPropertyPage) { ((LocationAndPropertyPage) currentPage).setShowPreviewChanges(true); dialog.updateButtons(); } dialog.showPage(currentPage.getNextPage()); TestUtils.delay(3000); dialog.getShell().getDisplay().syncExec(new Runnable() { public void run() { wizard.performFinish(); } }); dialog.close(); TestUtils.delay(3000); IFolder testfolder = targetProject.getFolder("tsrc"); assertTrue(testfolder.exists()); }
From source file:com.nokia.tools.screen.ui.wizards.NewProjectWizard.java
License:Open Source License
@Override public IWizardPage getNextPage(IWizardPage page) { if (page1.getThemeCreationMode() != NewProjectPage1.CREATEDEFAULT) { return null; }// w w w. j av a 2 s .com IWizardPage next = super.getNextPage(page); if (next instanceof OptionalPage) { OptionalPage o = (OptionalPage) next; while (!o.isEnabled(page1.getRelease())) { next = next.getNextPage(); if (next instanceof OptionalPage) { o = (OptionalPage) next; } else { return next; } } return next; } return next; }
From source file:com.sap.dirigible.ide.template.ui.common.TemplateWizard.java
License:Open Source License
private boolean followingPagesAreComplete(IWizardPage page) { IWizardPage currentPage = page.getNextPage(); while (currentPage != null) { if (!currentPage.isPageComplete()) { return false; }// w ww .j a v a 2s.c o m currentPage = currentPage.getNextPage(); } return true; }
From source file:com.siteview.mde.internal.ui.wizards.templates.TemplateSelectionPage.java
License:Open Source License
public IWizardPage getNextVisiblePage(IWizardPage page) { if (page == this) return page.getNextPage(); int index = fVisiblePages.indexOf(page); if (index >= 0 && index < fVisiblePages.size() - 1) return (IWizardPage) fVisiblePages.get(index + 1); return null;//ww w. j a v a 2 s.c o m }
From source file:dynamicrefactoring.interfaz.wizard.RefactoringWizardPage7.java
License:Open Source License
/** * Puebla los campos de la pgina del asistente con la informacin que se * pueda obtener de la refactorizacin existente que se est editando o que * se est a punto de crear.// w ww.j a va 2 s .c om */ private void fillInRefactoringData() { setPageComplete(true); setDescription(Messages.RefactoringWizardPage7_Summary + ": " + firstPage.getNameText().getText().trim()); //$NON-NLS-1$ t_Description.setText(firstPage.getDescriptionText().getText().trim()); t_Motivation.setText(firstPage.getMotivationText().getText().trim()); // Actualizamos el contenido de la tabla de palabras clave table_Keywords.setInput(firstPage.getKeywords()); // Actualizamos el contenido de la lista de categorias picker.setSelectedCategories(firstPage.getCategories()); IWizardPage secondPage = firstPage.getNextPage(); if (secondPage != null && secondPage instanceof RefactoringWizardPage2) { java.util.List<InputParameter> inputs = ((RefactoringWizardPage2) secondPage).getInputs(); for (InputParameter input : inputs) { TableItem item = new TableItem(tb_Inputs, SWT.BORDER); item.setText(new String[] { input.getName(), input.getType(), input.getFrom(), "", "" }); //$NON-NLS-1$ //$NON-NLS-2$ TableEditor editor = new TableEditor(tb_Inputs); Button checkButton = new Button(tb_Inputs, SWT.CHECK); checkButton.setSelection(input.isMain()); checkButton.setEnabled(false); checkButton.pack(); editor.minimumWidth = checkButton.getSize().x; editor.horizontalAlignment = SWT.CENTER; editor.setEditor(checkButton, item, 3); } IWizardPage thirdPage = secondPage.getNextPage(); IWizardPage fourthPage = thirdPage.getNextPage(); IWizardPage fifthPage = fourthPage.getNextPage(); if (thirdPage != null && thirdPage instanceof RefactoringWizardPage3 && fourthPage instanceof RefactoringWizardPage4 && fifthPage instanceof RefactoringWizardPage5) { List<RefactoringMechanismInstance> preconditions = ((RefactoringWizardPage3) thirdPage) .getPreconditions(); List<RefactoringMechanismInstance> actions = ((RefactoringWizardPage4) fourthPage).getActions(); List<RefactoringMechanismInstance> postconditions = ((RefactoringWizardPage5) fifthPage) .getPostconditions(); TreeItem preconditionsChild = TreeEditor.createBranch(tr_Components, 0, Messages.RefactoringWizardPage7_Preconditions, RefactoringImages.CHECK_ICON_PATH); TreeItem actionsChild = TreeEditor.createBranch(tr_Components, 1, Messages.RefactoringWizardPage7_Actions, RefactoringImages.RUN_ICON_PATH); TreeItem postconditionsChild = TreeEditor.createBranch(tr_Components, 2, Messages.RefactoringWizardPage7_Postconditions, RefactoringImages.VALIDATE_ICON_PATH); TreeEditor.fillInTreeBranch(RefactoringMechanismInstance.getMechanismListClassNames(preconditions), preconditionsChild, RefactoringImages.CHECK_ICON_PATH); TreeEditor.fillInTreeBranch(RefactoringMechanismInstance.getMechanismListClassNames(actions), actionsChild, RefactoringImages.RUN_ICON_PATH); TreeEditor.fillInTreeBranch(RefactoringMechanismInstance.getMechanismListClassNames(postconditions), postconditionsChild, RefactoringImages.VALIDATE_ICON_PATH); } } }
From source file:org.amanzi.neo.geoptima.loader.ui.wizard.impl.GeoptimaLoaderWizard.java
License:Open Source License
@Override public boolean canFinish() { if (getPages().length < 3) { return false; }//from w ww .j a v a 2 s . com IWizardPage configPage = getPages()[0].getNextPage(); IWizardPage filtersPage = configPage.getNextPage(); return configPage.isPageComplete() && filtersPage.isPageComplete(); }
From source file:org.bonitasoft.studio.connector.model.definition.dialog.AbstractDefinitionWizardDialog.java
License:Open Source License
protected void createToolbar(Composite parent) { toolbar = new ToolBar(parent, SWT.FLAT); toolbar.setLayoutData(//from w w w .j ava2 s . co m GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER).grab(true, false).create()); loadItem = new ToolItem(toolbar, SWT.NO_FOCUS | SWT.FLAT); loadItem.setImage(Pics.getImage("load_conf.png")); loadItem.setText(Messages.loadConfiguration); loadItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { IWizardPage page = getCurrentPage(); if (page instanceof AbstractConnectorConfigurationWizardPage) { AbstractConnectorConfigurationWizardPage connectorConfPage = (AbstractConnectorConfigurationWizardPage) page; final ConnectorConfiguration connectorConfigurationToLoad = connectorConfPage .getConfiguration(); SelectConnectorConfigurationWizard wizard = new SelectConnectorConfigurationWizard( connectorConfigurationToLoad, configurationStore); WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard); if (dialog.open() == Dialog.OK) { IConnectorDefinitionContainer connectorWizard = (IConnectorDefinitionContainer) getWizard(); ConnectorDefinition def = connectorWizard.getDefinition(); IWizardPage namePage = getWizard().getPage(SelectNameAndDescWizardPage.class.getName()); if (namePage != null) { IWizardPage previousNamePage = namePage.getPreviousPage(); showPage(namePage); namePage.setPreviousPage(previousNamePage); connectorWizard.recreateConnectorConfigurationPages(def, false); } else { IWizardPage[] wizardPages = getWizard().getPages(); if (wizardPages.length > 1) { IWizardPage firstPage = wizardPages[0]; showPage(firstPage.getNextPage()); } } updateButtons(); } } } }); saveItem = new ToolItem(toolbar, SWT.NO_FOCUS | SWT.FLAT); saveItem.setImage(Pics.getImage("save_conf.png")); saveItem.setText(Messages.saveConfiguration); ITestConfigurationListener listener = getTestListener(null, (IWizard) null); if (implStore != null && listener != null) { testItem = new ToolItem(toolbar, SWT.NO_FOCUS | SWT.FLAT); testItem.setImage(Pics.getImage("test.png")); testItem.setText(Messages.testConfiguration); testItem.setEnabled(false); } }
From source file:org.cropinformatics.ui.wizards.AbstractWizard.java
License:Apache License
protected final int getDirection(IWizardPage currentPage, IWizardPage targetPage) { if (currentPage.getNextPage() == targetPage) return FORWARD_DIRECTION; else if (currentPage.getPreviousPage() == targetPage) return BACKWARD_DIRECTION; else//ww w . j a v a 2s. c o m return UNKNOWN_DIRECTION; }