List of usage examples for org.eclipse.jface.wizard IWizardPage getTitle
String getTitle();
From source file:com.centurylink.mdw.plugin.project.DataSourcePage.java
License:Apache License
@Override public IWizardPage getNextPage() { if (getProject().isRemote() || getProject().isOsgi() || !getProject().checkRequiredVersion(5, 1)) { return null; } else {//w w w . ja v a2s .co m for (IWizardPage page : getWizard().getPages()) { if (page.getTitle().equals(ExtensionModulesWizardPage.PAGE_TITLE)) return page; } return super.getNextPage(); } }
From source file:com.centurylink.mdw.plugin.project.RemoteHostInfoPage.java
License:Apache License
@Override public IWizardPage getNextPage() { boolean vcsAssets = gitCheckbox.getSelection(); if (vcsAssets) getProject().setPersistType(PersistType.Git); String nextPageTitle = vcsAssets ? GitRepositoryPage.PAGE_TITLE : DataSourcePage.PAGE_TITLE; for (IWizardPage page : getWizard().getPages()) { if (page.getTitle().equals(nextPageTitle)) { ((WizardPage) page).initValues(); // version specific return page; }/* w w w . j av a 2 s .com*/ } return super.getNextPage(); }
From source file:com.centurylink.mdw.plugin.project.ServerSettingsPage.java
License:Apache License
@Override public IWizardPage getNextPage() { PersistType persistType = getProject().getPersistType(); for (IWizardPage page : getWizard().getPages()) { if (page.getTitle().equals(DataSourcePage.PAGE_TITLE)) { ((DataSourcePage) page).initValues(); // version specific return page; } else if (persistType == PersistType.Git && page.getTitle().equals(GitRepositoryPage.PAGE_TITLE)) { ((GitRepositoryPage) page).initValues(); // version specific return page; } else if (persistType == PersistType.None) { return null; }/*from w ww . jav a2 s .c o m*/ } return super.getNextPage(); }
From source file:com.centurylink.mdw.plugin.project.WorkflowProjectPage.java
License:Apache License
@Override public IWizardPage getNextPage() { if (getProject().isRemote()) { RemoteWorkflowProjectWizard wizard = (RemoteWorkflowProjectWizard) getWizard(); return wizard.getRemoteHostInfoPage(); } else if (getWizard() instanceof LocalCloudProjectWizard) { // cloud or ear from new project wizard ServerSettingsPage serverSettingsPage = null; if (getProject().isCloudProject()) { LocalCloudProjectWizard wizard = (LocalCloudProjectWizard) getWizard(); if (getServerSettings().isJBoss()) serverSettingsPage = wizard.getJBossSettingsPage(); else if (getServerSettings().isServiceMix()) serverSettingsPage = wizard.getServiceMixSettingsPage(); else if (getServerSettings().isFuse()) serverSettingsPage = wizard.getFuseSettingsPage(); else if (getServerSettings().isTomcat()) serverSettingsPage = wizard.getTomcatSettingsPage(); else//from w w w .j av a 2s .co m serverSettingsPage = wizard.getWebLogicSettingsPage(); if (wizard.getExtensionModulesPage() != null) wizard.getExtensionModulesPage().initValues(); } serverSettingsPage.initValues(); return serverSettingsPage; } else { // is the case when adding workflow facet to existing EAR or Java // project ModifyFacetedProjectWizard wizard = (ModifyFacetedProjectWizard) getWizard(); ServerSettingsPage serverSettingsPage = null; for (IWizardPage page : wizard.getPages()) { if (getServerSettings().isJBoss()) { if (page.getTitle().equals(JBossSettingsPage.PAGE_TITLE)) serverSettingsPage = (ServerSettingsPage) page; } else if (getServerSettings().isServiceMix()) { if (page.getTitle().equals(ServiceMixSettingsPage.PAGE_TITLE)) serverSettingsPage = (ServerSettingsPage) page; } else if (getServerSettings().isFuse()) { if (page.getTitle().equals(FuseSettingsPage.PAGE_TITLE)) serverSettingsPage = (ServerSettingsPage) page; } else if (getServerSettings().isTomcat()) { if (page.getTitle().equals(TomcatSettingsPage.PAGE_TITLE)) serverSettingsPage = (ServerSettingsPage) page; } else { if (page.getTitle().equals(WebLogicSettingsPage.PAGE_TITLE)) serverSettingsPage = (ServerSettingsPage) page; } if (page.getTitle().equals(ExtensionModulesWizardPage.PAGE_TITLE)) ((ExtensionModulesWizardPage) page).initValues(); } if (serverSettingsPage != null) { serverSettingsPage.initValues(); return serverSettingsPage; } else { return super.getNextPage(); } } }
From source file:com.windowtester.runtime.swt.internal.locator.WizardTitleLocator.java
License:Open Source License
public String getText(IUIContext ui) throws WidgetSearchException { final String[] title = new String[1]; final Exception[] exception = new Exception[1]; Display.getDefault().syncExec(new Runnable() { public void run() { Shell activeShell = Display.getDefault().getActiveShell(); if (activeShell == null) { exception[0] = new WidgetSearchException("No active shell"); return; }//from w ww . ja v a2 s .c o m Object dialog = activeShell.getData(); if (!(dialog instanceof WizardDialog)) { exception[0] = new WidgetSearchException("Expected WizardDialog but found " + dialog); return; } final IWizardPage page = ((WizardDialog) dialog).getCurrentPage(); if (page == null) { exception[0] = new WidgetSearchException("WizardDialog current page is null"); return; } title[0] = page.getTitle(); } }); if (exception[0] != null) throw ((WidgetSearchException) exception[0]); return title[0]; }
From source file:org.bonitasoft.studio.configuration.ui.wizard.ConfigurationWizardDialog.java
License:Open Source License
@Override public void showPage(IWizardPage page) { super.showPage(page); page.setPreviousPage(null);// ww w . ja v a2s .com setControlEnabled(page.getControl(), ((ConfigurationWizard) getWizard()).getProcess() != null); ConfigurationWizard confWizard = (ConfigurationWizard) getWizard(); confWizard.updatePages(); page.setVisible(true); pageChooserViewer.setSelection(new StructuredSelection(getCurrentPage())); group.setText(page.getTitle()); String processName = getProcess().getName() + " (" + getProcess().getVersion() + ")"; setTitle(Messages.bind(Messages.configurationWizardTitle, processName)); if (((IProcessConfigurationWizardPage) page).isConfigurationPageValid(getConfiguration()) == null) { setMessage(Messages.bind(Messages.configurationWizardDesc, processName)); } }
From source file:org.bonitasoft.studio.configuration.ui.wizard.WizardPageLabelProvider.java
License:Open Source License
@Override public String getText(Object element) { if (container.getCurrentPage() != null) { IWizardPage page = (IWizardPage) element; return page.getTitle(); }/*w ww .ja v a 2 s .c o m*/ return null; }
From source file:org.eclipse.ajdt.ui.tests.wizards.AspectJProjectWizardTest.java
License:Open Source License
public void testProjectWizardPageAddition() { AspectJProjectWizard projectWizard = new AspectJProjectWizard(); boolean AJTitleCorrect = false; boolean AJDescriptionCorrect = false; projectWizard.addPages();//from w ww . j av a 2s . co m if (projectWizard.getPageCount() != 2) { fail("addPages() failed, 2 pages have not be accurately added."); //$NON-NLS-1$ } IWizardPage firstPage = projectWizard.getPage("NewJavaProjectWizardPageOne"); //$NON-NLS-1$ IWizardPage secondPage = projectWizard.getPage("JavaCapabilityConfigurationPage"); //$NON-NLS-1$ if (firstPage == null) fail("addPages() has failed to add a NewJavaProjectWizardPageOne at the correct location."); //$NON-NLS-1$ if (secondPage == null) fail("addPages() has failed to add a JavaCapabilityConfigurationPage at the correct location."); //$NON-NLS-1$ try { AJTitleCorrect = firstPage.getTitle().equals(UIMessages.NewAspectJProject_CreateAnAspectJProject); AJDescriptionCorrect = firstPage.getDescription() .equals(UIMessages.NewAspectJProject_CreateAnAspectJProjectDescription); } catch (NullPointerException e) { fail("The title or description for the AJ page is incorrect."); //$NON-NLS-1$ } if (!AJTitleCorrect) { fail("The title for the AJ page is incorrect."); //$NON-NLS-1$ } if (!AJDescriptionCorrect) { fail("The description for the AJ page is incorrect."); //$NON-NLS-1$ } }
From source file:org.eclipse.ltk.ui.refactoring.RefactoringWizard.java
License:Open Source License
private void initializeDefaultPageTitles() { if (fDefaultPageTitle == null) return;/*www .jav a2 s . c om*/ IWizardPage[] pages = getPages(); for (int i = 0; i < pages.length; i++) { IWizardPage page = pages[i]; if (page.getTitle() == null) page.setTitle(fDefaultPageTitle); } }
From source file:org.eclipse.ui.preferences.WizardPropertyPage.java
License:Open Source License
private void setPageName(IWizardPage page) { String name = page.getTitle(); if (name == null) name = page.getName();/*w w w . java 2 s . c o m*/ setMessage(name); }