Table Template

com.sodius.mdw.platform.model.tableTemplate

MDWorkbench 3.0.0

This extension is used to add new table templates.

Model elements are by default displayed as a tree in the model editor, where you can expand the model element references. You may alternatively display model elements into tables, with columns revealing most notable features of these elements.

Tip: Instead of creating a template by hand, you may add a new table template using the corresponding preference page (Window > Preferences and MDWorkbench > Models > Tables). This allows to select types and features using dedicated views and to quickly ensure the table definition looks correct on models. Then you just need to use the "Preview XML Declaration..." contextual menu on the table template preference, and to copy/paste the contents in a plugin.xml file.

<!ELEMENT extension (tableTemplate*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT tableTemplate (typeColumns+)>

<!ATTLIST tableTemplate

id              CDATA #REQUIRED

name            CDATA #REQUIRED

metamodel       CDATA #REQUIRED

rowHeightFactor CDATA #IMPLIED>


<!ELEMENT typeColumns (column+)>

<!ATTLIST typeColumns

type CDATA #REQUIRED>


<!ELEMENT column EMPTY>

<!ATTLIST column

feature CDATA #REQUIRED

width   CDATA #IMPLIED

weight  CDATA #IMPLIED>


Following is an example of a Table Template extension for Ecore metamodel:


<extension point=

"com.sodius.mdw.platform.model.tableTemplate"

>

<tableTemplate id=

"com.sodius.mdw.metamodel.ecore.tableView"

metamodel=

"ecore"

name=

"Table View"

>

<typeColumns type=

"Attribute"

>

<column feature=

"name"

/>

<column feature=

"type"

/>

</typeColumns>

<typeColumns type=

"Class"

>

<column feature=

"name"

/>

<column feature=

"abstract"

width=

"90"

/>

<column feature=

"superTypes"

/>

</typeColumns>

<typeColumns type=

"Package"

>

<column feature=

"name"

/>

<column feature=

"nsPrefix"

width=

"100"

/>

<column feature=

"nsURI"

/>

</typeColumns>

<typeColumns type=

"Reference"

>

<column feature=

"name"

/>

<column feature=

"many"

width=

"60"

/>

<column feature=

"type"

/>

<column feature=

"opposite"

/>

</typeColumns>

</tableTemplate>

</extension>