public abstract class AbstractWizardContributor extends Object implements IWizardContributor
Constructor and Description |
---|
AbstractWizardContributor()
Default constructor that ensure
getParameters() and
getScopes() won't return null. |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept(MObject element)
This method checks if an element is accepted.
|
abstract MObject |
actionPerformed(ModelElement diagramContext,
String diagramName,
String diagramDescription)
Execute the creation action.
|
void |
dispose()
Disposes the icon set by
setIcon(Image) . |
Stereotype |
findStereotypeFromSpec(MClass metaclass,
String stereotypeSpec)
Find the stereotype from a stereotype specification.
|
String |
getDetails()
Get a complete textual explanation of the contribution's role or function.
|
String |
getHelpUrl()
Get a URL to some 'help' or 'documentation' page about the contribution.
|
org.eclipse.swt.graphics.Image |
getIcon() |
String |
getInformation()
Get a short textual explanation of the contribution's role or function.
|
String |
getLabel()
Get the label to be displayed for the contribution by the Creation Wizard in the "type" browser.
|
IModule |
getModule() |
Map<String,String> |
getParameters() |
org.eclipse.jface.resource.ImageDescriptor |
getPreviewImage() |
List<ElementScope> |
getScopes() |
IPanelProvider |
getWizardPanel()
Get the GUI panel to display in the wizard.
|
void |
setDetails(String details)
Set a textual explanation of the contribution's role or function.
|
void |
setHelpUrl(String helpUrl) |
void |
setIcon(org.eclipse.swt.graphics.Image icon) |
void |
setInformation(String information)
Get a short textual explanation of the contribution's role or function.
|
void |
setLabel(String label) |
void |
setModule(IModule module) |
void |
setParameters(Map<String,String> parameters) |
void |
setPreviewImage(org.eclipse.jface.resource.ImageDescriptor previewDescriptor) |
void |
setScopes(List<ElementScope> scopes) |
public AbstractWizardContributor()
getParameters()
and
getScopes()
won't return null.public String getLabel()
IWizardContributor
getLabel
in interface IWizardContributor
public void setLabel(String label)
setLabel
in interface IWizardContributor
label
- this contribution label.public String getInformation()
IWizardContributor
This text is displayed in the panel header.
getInformation
in interface IWizardContributor
public void setInformation(String information)
IWizardContributor
This text is displayed in the panel header.
setInformation
in interface IWizardContributor
information
- the short explanation.public String getHelpUrl()
IWizardContributor
getHelpUrl
in interface IWizardContributor
public void setHelpUrl(String helpUrl)
setHelpUrl
in interface IWizardContributor
helpUrl
- the help URLpublic String getDetails()
IWizardContributor
getDetails
in interface IWizardContributor
public void setDetails(String details)
IWizardContributor
setDetails
in interface IWizardContributor
details
- a textual explanationpublic org.eclipse.swt.graphics.Image getIcon()
getIcon
in interface IWizardContributor
public void setIcon(org.eclipse.swt.graphics.Image icon)
setIcon
in interface IWizardContributor
icon
- this wizard contribution iconpublic Map<String,String> getParameters()
public void setParameters(Map<String,String> parameters)
setParameters
in interface IWizardContributor
parameters
- the wizard parameterspublic List<ElementScope> getScopes()
getScopes
in interface IWizardContributor
public void setScopes(List<ElementScope> scopes)
setScopes
in interface IWizardContributor
scopes
- the wizard scopepublic abstract boolean accept(MObject element)
IWizardContributor
accept
in interface IWizardContributor
element
- the model element to check.true
if the element is accepted.public abstract MObject actionPerformed(ModelElement diagramContext, String diagramName, String diagramDescription)
Note : a model transaction is already open by the caller.
actionPerformed
in interface IWizardContributor
diagramContext
- the model element on which the wizard is rundiagramName
- the name of the element to create.diagramDescription
- the description of the element to create.public IModule getModule()
getModule
in interface IWizardContributor
public void setModule(IModule module)
setModule
in interface IWizardContributor
module
- the module that provides this wizard contribution.public org.eclipse.jface.resource.ImageDescriptor getPreviewImage()
getPreviewImage
in interface IWizardContributor
public final Stereotype findStereotypeFromSpec(MClass metaclass, String stereotypeSpec)
The stereotype specification may have one of the following formats:
metaclass
- the metaclass to look fromstereotypeSpec
- the stereotype specificationpublic IPanelProvider getWizardPanel()
IWizardContributor
getWizardPanel
in interface IWizardContributor
public void dispose()
setIcon(Image)
.dispose
in interface IWizardContributor
public void setPreviewImage(org.eclipse.jface.resource.ImageDescriptor previewDescriptor)
setPreviewImage
in interface IWizardContributor
previewDescriptor
- a descriptor for the wizard preview image