MDWorkbench Model Template
Identifier:
com.sodius.mdw.platform.model.modelTemplate
Since:
MDWorkbench 3.0.0
Description:
This extension is used to add new model templates. A model template enables to populate a newly created model with some model elements, avoiding the user having to start his modeling activity from a blank page.
Configuration Markup:
<!ELEMENT extension (modelTemplate*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance
<!ELEMENT modelTemplate (description?)>
<!ATTLIST modelTemplate
id CDATA #REQUIRED
name CDATA #REQUIRED
metamodel CDATA #REQUIRED
default (true | false)
class CDATA #IMPLIED
readerName CDATA #IMPLIED
readerPath CDATA #IMPLIED
override CDATA #IMPLIED>
a template generally populates model elements from a resource (using readerName
and readerPath
attributes). It may dynamically contribute such elements providing a ModelTemplateSection
in the class
attributes. If both reader
and class
attributes are used, the resource is first loaded and the provided ModelTemplateSection
can add additional elements or to refactor some elements loaded from the resource.
- id - a unique name that will be used to identify this template
- name - a translatable name that will be used in the UI for this template
- metamodel - the id of the metamodel this template applies to (e.g. "uml21")
- default - if true, this template will be the default one selected in the new model wizard
- class - a class that implements ModelTemplateSection to dynamically populate model elements
- readerName - a model reader name (e.g. "XMI") used to load the specified readerPath to populate the new model
- readerPath - a relative path to the resource that contains model elements to populate the new model. This must be used in conjunction with readerName attribute.
- override - an optional id of a overriden model template, that won't be visible to the end-user anymore.
<!ELEMENT description (#PCDATA)>
a description of the purpose of this template, presented to the user in the new model wizard.
SODIUS