List of usage examples for org.eclipse.jface.wizard WizardDialog getSelectedPage
@Override
public Object getSelectedPage()
From source file:hydrograph.ui.graph.utility.SubJobUtility.java
License:Apache License
/** * Open sub graph save dialog./* w w w . j a va 2 s . c om*/ * * @return the i file */ public IFile openSubJobSaveDialog() { IFile iFile = null; IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry() .findWizard(Messages.JOB_WIZARD_ID); if (descriptor != null) { IWizard wizard = null; try { wizard = descriptor.createWizard(); } catch (CoreException coreException) { logger.error("Error while opening create job wizard", coreException); } WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard); wizardDialog.setTitle(wizard.getWindowTitle()); wizardDialog.open(); JobCreationPage jobCreationPage = (JobCreationPage) wizardDialog.getSelectedPage(); iFile = jobCreationPage.getNewFile(); } return iFile; }
From source file:org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest.java
License:Open Source License
/** * //from w w w. ja v a 2 s. c om */ public void checkNewWizardStartPage(String ID) { IWizard aWizard = WorkbenchUtils.findWizardByDefId(ID); WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), aWizard); dialog.setBlockOnOpen(false); dialog.open(); try { SeamBaseWizardPage page = (SeamBaseWizardPage) dialog.getSelectedPage(); Map<String, IFieldEditor> editors = (Map<String, IFieldEditor>) page.getAdapter(Map.class); for (IFieldEditor editor : editors.values()) { Object[] controls = editor.getEditorControls(); for (Object object : controls) { assertNotNull(object); } } } finally { dialog.close(); } }
From source file:org.jboss.tools.seam.ui.test.wizard.SeamNewWizardTest.java
License:Open Source License
private void testSeamBaseNewWizardInstanceIsInitialized(String wizardId) { IWizard aWizard = WorkbenchUtils.findWizardByDefId(wizardId); WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), aWizard);//from w ww. j ava 2s . c om dialog.setBlockOnOpen(false); dialog.open(); try { SeamBaseWizardPage page = (SeamBaseWizardPage) dialog.getSelectedPage(); page.getEditor(ISeamParameter.SEAM_PROJECT_NAME).setValue("Test1-ear"); assertEquals("Seam web parent project was not initialized for Seam EAR project.", "Test1", page.getRootSeamProject()); } finally { dialog.close(); } }
From source file:org.jboss.tools.seam.ui.test.wizard.SeamNewWizardTest.java
License:Open Source License
/** * https://jira.jboss.org/jira/browse/JBIDE-10606 *///from w ww . j a va 2 s . com public void testSeamGenerateEntitiesNewWizardInstanceIsInitialized() { IWizard aWizard = WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_GENERATE_SEAM_ENTITY_WIZARD_ID); WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), aWizard); dialog.setBlockOnOpen(false); dialog.open(); try { SeamGenerateEntitiesWizardPage page = (SeamGenerateEntitiesWizardPage) dialog.getSelectedPage(); page.getProjectEditor().setValue("Test1-ear"); assertEquals("Seam web parent project was not initialized for Seam EAR project.", "Test1", page.getRootSeamProject().getName()); } finally { dialog.close(); } }