List of usage examples for org.eclipse.jface.wizard IWizardPage getDescription
String getDescription();
From source file:com.ebmwebsourcing.petals.services.su.wizards.AbstractServiceUnitWizard.java
License:Open Source License
@Override public void addPage(IWizardPage page) { super.addPage(page); page.setWizard(this); String title = this.petalsMode == PetalsMode.provides ? "Petals Service Provider" : "Petals Service Consumer"; title += " (" + getComponentVersionDescription().getComponentAlias() + ")"; page.setTitle(title);/* w w w.j av a 2 s . c om*/ if (page.getDescription() == null) { if (this.petalsMode == PetalsMode.consumes) page.setDescription(getComponentVersionDescription().getConsumeDescription()); else if (this.petalsMode == PetalsMode.provides) page.setDescription(getComponentVersionDescription().getProvideDescription()); } }
From source file:edu.toronto.cs.se.mmint.mid.diagram.part.MIDCreationWizard.java
License:Open Source License
/** * @generated NOT/*from w w w . j a va2s . co m*/ */ public boolean performFinish() { IRunnableWithProgress op = new WorkspaceModifyOperation(null) { protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException { MIDLevel midLevel = MIDLevel.INSTANCES; IWizardPage initialPage = diagramModelFilePage.getPreviousPage(); if (initialPage != null && initialPage.getDescription().contains("workflow")) { midLevel = MIDLevel.WORKFLOWS; } diagram = MIDDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(), domainModelFilePage.getURI(), monitor, midLevel); if (isOpenNewlyCreatedDiagramEditor() && diagram != null) { try { MIDDiagramEditorUtil.openDiagram(diagram); } catch (PartInitException e) { ErrorDialog.openError(getContainer().getShell(), Messages.MIDCreationWizardOpenEditorError, null, e.getStatus()); } } } }; try { getContainer().run(false, true, op); } catch (InterruptedException e) { return false; } catch (InvocationTargetException e) { if (e.getTargetException() instanceof CoreException) { ErrorDialog.openError(getContainer().getShell(), Messages.MIDCreationWizardCreationError, null, ((CoreException) e.getTargetException()).getStatus()); } else { MIDDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$ } return false; } return diagram != 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();/* www . j a v a 2 s .c o 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.ui.preferences.WizardPropertyPage.java
License:Open Source License
private void setDescription(IWizardPage page, Label messageLabel) { String description = null;//from w w w . ja va 2 s . co m if (page.getDescription() != null) { description = page.getDescription(); } else if (page instanceof IMessageProvider) { IMessageProvider messageProvider = (IMessageProvider) page; if (messageProvider.getMessageType() == IMessageProvider.NONE) { description = messageProvider.getMessage(); } } if (description != null) { messageLabel.setText(description); } else { messageLabel.setVisible(false); } }
From source file:org.eclipse.xtext.ui.wizard.template.TemplateNewFileWizard.java
License:Open Source License
@Override public IWizardPage getNextPage(IWizardPage page) { if (page instanceof NewFileWizardPrimaryPage && hasMoreThenOneTemplate()) { AbstractFileTemplate selectedTemplate = mainPage.getSelectedTemplate(); List<TemplateVariable> variables = selectedTemplate.getVariables(); if (variables.isEmpty()) return null; selectedTemplate.setTemplateInfo(getFileInfo()); TemplateParameterPage parameterPage = new TemplateParameterPage(selectedTemplate); parameterPage.setWizard(this); templateParameterPage = parameterPage; parameterPage.setTitle(page.getTitle()); parameterPage.setDescription(page.getDescription()); return parameterPage; }/*w w w . j av a2s . co m*/ return super.getNextPage(page); }