public interface IWizardContributor
actionPerformed(ModelElement, String, String)
method is in charge of creating the element from the provided data.
Modifier and Type | Method and Description |
---|---|
boolean |
accept(ModelElement main)
This method checks if an element is accepted.
|
MObject |
actionPerformed(ModelElement context,
java.lang.String name,
java.lang.String description)
Execute the creation action.
|
void |
dispose()
Release resources allocated by this contributor.
|
ElementDescriptor |
getCreatedElementType()
Get the type of element which is created by this contributor.
|
java.lang.String |
getDetails()
Get a complete textual explanation of the contributior's role or function.
|
java.lang.String |
getHelpUrl()
Get a URL to some 'help' or 'documentation' page about the behavior and usage of the contributor.
|
ImageDescriptor |
getIconDescriptor()
The contributor's icon.
|
Image |
getIconImage()
The contributor's icon.
|
java.lang.String |
getInformation()
Get a short textual explanation of the contributor's role or function.
|
java.lang.String |
getLabel()
Get the label to be displayed for the contributor by the Creation Wizard in its "type" browser.
|
java.lang.String |
getModelViewTemplateId()
Get the id of the creator that is used by this contributor
IModelViewTemplate . |
IModule |
getModule()
Get the module that is providing this contributor.
|
ImageDescriptor |
getPreviewImage()
Get the preview image of this contributor.
|
java.util.List<ElementScope> |
getScopes()
Get the valid scopes for this contributor, ie the (metaclass+stereotype) combinations which are accepted as 'context' in
#accept(MObject) and actionPerformed(ModelElement, String, String) |
IPanelProvider |
getWizardPanel()
Get the GUI panel to display in the wizard.
|
void |
setDetails(java.lang.String details)
Set a textual explanation of the contribution's role or function.
|
void |
setHelpUrl(java.lang.String helpUrl) |
void |
setIconDescriptor(ImageDescriptor iconDescriptor)
Sets the contributor icon.
|
void |
setInformation(java.lang.String information)
Get a short textual explanation of the contribution's role or function.
|
void |
setLabel(java.lang.String label) |
void |
setModelViewTemplateId(java.lang.String id)
Sets the id of the creator that is used by this contributor
IModelViewTemplate . |
void |
setModule(IModule module) |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters) |
void |
setPreviewImage(ImageDescriptor descriptor) |
void |
setScopes(java.util.List<ElementScope> scopes) |
MObject actionPerformed(ModelElement context, java.lang.String name, java.lang.String description)
context
- the model element on which the wizard is runname
- the name of the element to create.description
- the description of the element to create.java.lang.String getDetails()
java.lang.String getHelpUrl()
Image getIconImage()
java.lang.String getInformation()
This text is displayed in the panel header. Must be short (one line). Must be I18n'ed.
java.lang.String getLabel()
IModule getModule()
ImageDescriptor getPreviewImage()
java.util.List<ElementScope> getScopes()
#accept(MObject)
and actionPerformed(ModelElement, String, String)
void setDetails(java.lang.String details)
details
- a textual explanationvoid setHelpUrl(java.lang.String helpUrl)
helpUrl
- the help URLvoid setInformation(java.lang.String information)
This text is displayed in the panel header.
information
- the short explanation.void setLabel(java.lang.String label)
label
- this contribution label.void setModule(IModule module)
module
- the module that provides this wizard contribution.void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters
- the wizard parametersvoid setScopes(java.util.List<ElementScope> scopes)
scopes
- the wizard scopeboolean accept(ModelElement main)
main
- the model element to check.true
if the element is accepted.IPanelProvider getWizardPanel()
void dispose()
Should for example dispose the icon allocated by #getIcon()
if any.
void setPreviewImage(ImageDescriptor descriptor)
descriptor
- a descriptor for the wizard preview imageElementDescriptor getCreatedElementType()
void setIconDescriptor(ImageDescriptor iconDescriptor)
iconDescriptor
- this wizard contribution iconjava.lang.String getModelViewTemplateId()
IModelViewTemplate
. Optional, empty string means no creator defined.void setModelViewTemplateId(java.lang.String id)
IModelViewTemplate
.ImageDescriptor getIconDescriptor()