Skip to main content

Basics

ElementDetailComponent: Displaying and modifying element details​

ElementDetailComponents define the user interface for displaying and modifying the properties of a selected model element. This is where users interact with the specific attributes and relationships of an element.

  • autogenerate: Set to true, this detail view is completely generated. When false, you will have to code this view custom yourself.
  • elementClass: the elementClass from the ontology you are building the plugin for that this detailComponent represents.

Configure these components within the <elementDetailComponents> section of your extension:

<editorModelExtension xmlns="https://schemas.normalizedsystems.org/xsd/editorElements/4/0/0">
<name>elements</name>
<elementDetailComponents>
<elementDetailComponent>
<name>Component</name>
<autogenerate>true</autogenerate>
<elementClass>elements::Component</elementClass>
</elementDetailComponent>
<elementDetailComponent>
<name>DataElement</name>
<autogenerate>true</autogenerate>
<elementClass>elements::DataElement</elementClass>
</elementDetailComponent>
</elementDetailComponents>
</editorModelExtension>

EditorAction: Enabling model interactions​

Next in the EditorModelExtension, actions are defined. The plugin needs a definition of the operations that can be done on the elementClasses of your metamodel (e.g. create & delete). After defining, they can be referenced in specific tree nodes or lists where they should be available.

An Action always targets an ElementClass from the metamodel.

CreateAction:

  • elementDetailComponent: Define the ElementDetailComponent linked to the elementClass. This DetailComponent will be the place where the CreateAction will have it's create form.
  • reference: The CreateAction refers to a reference of the metamodel, since that action is executed on a certain elementClass for an elementClass that is referenced.
    • Example: you create a DataElement within the Component (where there is a composition reference from Component to DataElement).

DeleteActions:

  • elementClass: reference the target elementClass.

Actions are defined within the <actions> section of your editorModelExtension:

<editorModelExtension
xmlns="https://schemas.normalizedsystems.org/xsd/editorElements/4/0/0">
<name>elements</name>
<actions>
<editorAction type="editorElements::CreateAction" xsi:type="createAction">
<name>createComponentDataElements</name>
<elementDetailComponent>elements::DataElement</elementDetailComponent>
<reference>elements::Component::dataElements</reference>
</editorAction>
<editorAction type="editorElements::DeleteAction" xsi:type="deleteAction">
<name>deleteDataElement</name>
<elementClass>elements::DataElement</elementClass>
</editorAction>
</actions>
</editorModelExtension>

ElementTreeNode: Building the Model's Tree View​

ElementTreeNode Components are responsible for defining how elements in your model are represented within the editor's tree view. They dictate the structure and content of the tree, allowing users to navigate and understand the model's hierarchy.

An ElementTreeNode:

  • elementClass: the ElementTreeNode is linked to a specific ElementClass of the metamodel (ontology) you are building a plugin for.
  • actions: the actions that are applicable to this tree node.
    • Example: the TreeNode DataElement allows you to create a FinderFinderA search specification combining field-operator pairs to execute standard data queries on a DataElement., create a FieldFieldA property of a DataElement expanded to a database column and user interface input element., delete the DataElement, ...
  • children: ElementTreeList items. These are the children or nested nodes of the tree node. The CreateActions defined on the TreeNode, will then become the ElementTreeList instances (e.g., DataElements for Component, findersFinderA search specification combining field-operator pairs to execute standard data queries on a DataElement. for DataElement).

Within this ElementTreeList, the following is defined:

  • compositionReference between the elementClass of the TreeNode and the elementClass of the ElementTreeList
  • the CreateAction of the nested elementClass
  • the ElementTreeNode of the nested elements (childNodeType)

You define these components within the <elementTreeNodes> section of your extension:

<editorModelExtension xmlns="https://schemas.normalizedsystems.org/xsd/editorElements/4/0/0">
<name>elements</name>
<elementTreeNodes>
<elementTreeNode>
<name>Component</name>
<elementClass>elements::Component</elementClass>
<children>
<elementTreeList>
<name>dataElements</name>
<actions>
<editorAction>elements::createComponentDataElements</editorAction>
</actions>
<childNodeType>elements::DataElement</childNodeType>
<compositionReference>elements::Component::dataElements</compositionReference>
</elementTreeList>
</children>
</elementTreeNode>
</elementTreeNodes>
</editorModelExtension>