Node Description
The NodeDescription describes a node and its children, border nodes, labels, style, visibility and interactions.
1. Core Properties
-
name: IdentifierA unique identifier of the node description. If the name is changed, existing nodes created from this description will disappear and new nodes will replace them. Existing positions, sizes and customizations done by the end users will be lost. -
description: StringSome documentation to let the studio makers understand the purpose of the node description.
2. Rendering
-
semanticCandidatesExpression: InterpretedExpression Used to selected the semantic elements for which a node may be created. The semantic elements selected by this expression will be then filtered by the
domainType`and thepreconditionExpression.-
self: ObjectThe current context on which the expression is evaluated. If the node is under the diagram description, it is the semantic element on which the diagram has been created. If the node is under another node description, it is the semantic element on which the parent node has been created. -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
ancestors: List<Object>The list of all the semantic elements used to create the parents of the current node. The first element of the list is the semantic element used to create the parent node, the second element is the semantic element used to create the grandparent node, and so on up until the semantic element of the diagram itself. -
semanticElementIds: List<String>The list of the identifiers of all semantic elements which should appear with the current description. For node descriptions using anUNSYNCHRONIZEDsynchronization policy, it can be expensive to consider all the potential semantic elements in the model. This variable can thus be used to consider only the semantic elements which are already present in the diagram and those who would be added by a create view model operation. -
collapsingState: CollapsingStateIndicates if the node is collapsed or expanded. -
isBorderNode: booleanIndicates if the node being created is a border node or not. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
domainType: DomainType Fully qualified type of the semantic elements for which a node should be created. For example
flow::Systemorecore::EClass. Used to filter the semantic elements selected by thesemanticCandidatesExpression. -
preconditionExpression: InterpretedExpression Used to filter the semantic elements selected by the
semanticCandidatesExpressionafter filtering bydomainType.-
self: ObjectThe current context on which the expression is evaluated. If the node is under the diagram description, it is the semantic element on which the diagram has been created. If the node is under another node description, it is the semantic element on which the parent node has been created. -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
ancestors: List<Object>The list of all the semantic elements used to create the parents of the current node. The first element of the list is the semantic element used to create the parent node, the second element is the semantic element used to create the grandparent node, and so on up until the semantic element of the diagram itself. -
semanticElementIds: List<String>The list of the identifiers of all semantic elements which should appear with the current description. For node descriptions using anUNSYNCHRONIZEDsynchronization policy, it can be expensive to consider all the potential semantic elements in the model. This variable can thus be used to consider only the semantic elements which are already present in the diagram and those who would be added by a create view model operation. -
collapsingState: CollapsingStateIndicates if the node is collapsed or expanded. -
isBorderNode: booleanIndicates if the node being created is a border node or not. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
synchronizationPolicy: SynchronizationPolicyUsed to configure how the node created from this description will be synchronized with the semantic model. This is especially important when dealing with large models in which thesemanticCandidatesExpressioncould return a very large number of elements. In order to prevent the creation of massive diagrams which are difficult to manipulate, one can use the synchronization policy to take control over the synchronization process. It can be configured to one of the following values:-
SYNCHRONIZEDThe node will be automatically created when if a semantic element is returned by thesemanticCandidatesExpression. To delete the node, the underlying semantic element must not be reachable by thesemanticCandidatesExpressionanymore (most of the time, when the semantic element is deleted). -
UNSYNCHRONIZEDThe node will not be automatically created when the semantic element is returned by thesemanticCandidatesExpression. Instead the node will only be created if a tool explicitely asks for it. In this case, the node can be deleted by another tool without deleting the underlying semantic element. The node will be automatically deleted if the underlying semantic element is not reachable by thesemanticCandidatesExpressionanymore.
-
3. Labels
Nodes can have multiple labels which can be displayed inside or outside the node. The labels can be configured by an expression to display information about the semantic element, such as its name or type.
3.1. Inside Label Description
InsideLabelDescription specializes LabelDescription for labels displayed inside a node.
A node description can only have a single inside label description.
3.1.1. Rendering
-
labelExpression: InterpretedExpression Used to compute the text of the label.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
ancestors: List<Object>The list of all the semantic elements used to create the parents of the current node. -
collapsingState: CollapsingStateIndicates if the node is collapsed or expanded. -
isBorderNode: booleanIndicates if the node being created is a border node or not. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
overflowStrategy: LabelOverflowStrategyUsed to indicate how the label is supposed to behave if its size becomes larger the the size of the node.-
NONEThe node should grow to display the entire label -
WRAPThe label should be wrapped to create a new line -
ELLIPSISThe end of the label should be replaced with "…"
-
-
textAlign: LabelTextAlignHow the text in the label should be aligned-
LEFT -
RIGHT -
CENTER -
JUSTIFY
-
-
position: InsideLabelPosition: Used to specify the position of the label within the node-
TOP_CENTER -
TOP_LEFT -
TOP_RIGHT -
MIDDLE_LEFT -
MIDDLE_CENTER -
MIDDLE_RIGHT -
BOTTOM_LEFT -
BOTTOM_CENTER -
BOTTOM_RIGHT
-
3.1.2. Styling
-
style: InsideLabelStyle -
conditionalStyles: ConditionalInsideLabelStyle
3.2. Outside Label Description
OutsideLabelDescription specializes LabelDescription for labels displayed outside a node.
A node description can have multiple outside label description.
3.2.1. Rendering
-
labelExpression: InterpretedExpression Used to compute the text of the label.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
ancestors: List<Object>The list of all the semantic elements used to create the parents of the current node. -
collapsingState: CollapsingStateIndicates if the node is collapsed or expanded. -
isBorderNode: booleanIndicates if the node being created is a border node or not. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
overflowStrategy: LabelOverflowStrategyUsed to indicate how the label is supposed to behave if its size becomes larger the the size of the node.-
NONEThe node should grow to display the entire label -
WRAPThe label should be wrapped to create a new line -
ELLIPSISThe end of the label should be replaced with "…"
-
-
textAlign: LabelTextAlignHow the text in the label should be aligned-
LEFT -
RIGHT -
CENTER -
JUSTIFY
-
-
position: OutsideLabelPositionWhere the label can be positioned outside of the node-
BOTTOM_CENTER
-
3.2.2. Styling
-
style: OutsideLabelStyle -
conditionalStyles: ConditionalOutsideLabelStyle
4. Structure
A node can contain child nodes and border nodes. To configure this structure, a node description can contain various child node descriptions and reuse existing node descriptions as its children too. One can for example, create a node description that reuses itself as a child node description to create a recursive structure of nodes in a diagram.
-
childrenDescriptions: NodeDescriptionThe list of child node descriptions which can be used to render child nodes -
borderNodesDescriptions: NodeDescriptionThe list of border node descriptions which can be used to render nodes on the border of the current node. -
reusedChildNodeDescriptions: NodeDescriptionThe list of existing node descriptions that should be reused as child node descriptions -
reusedBorderNodeDescriptions: NodeDescriptionThe list of existing node descriptions that should be reused as boder node descriptions
5. Styling
-
style: NodeStyleDescriptionThe default style of the node -
conditionalStyles: ConditionalNodeStyleA list of conditional styles that can be applied to the node based on its state -
isHiddenByDefaultExpression: InterpretedExpression Used to configure if the node should be hidden by default.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
isFadedByDefaultExpression: InterpretedExpression Used to configure if the node should be faded by default.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
5.1. Node Style Description
The style of a node being rendered is compute thanks to a node style description. All the node style descriptions are sharing some common properties:
-
description: StringSome documentation to let the studio makers understand the purpose of the node style description. -
childrenLayoutStrategy: LayoutStrategyDescription -
borderColor: UserColor -
borderRadius: int -
borderSize: int -
borderLineStyle: LineStylewhich can take one of the following values-
SOLID -
DASH -
DOT -
DASH_DOT
-
5.1.1. Rectangular Node Style Description
Use this node style description to create rectangular nodes. On top of the properties of all node style descriptions, the rectangular one adds the following properties:
-
background: UserColor
5.1.2. Image Node Style Description
Use this node style description to create nodes using an image. On top of the properties of all node style descriptions, the image one adds the following properties:
-
shape: String -
isPositionDependentRotation: boolean
5.1.3. Icon Label Node Style Description
Use this node style description to create nodes composed of an icon and a label. On top of the properties of all node style descriptions, the icon label one adds the following properties:
-
background: UserColor
5.1.4. Ellipse Node Style Description
Use this node style description to create nodes as an ellipse. On top of the properties of all node style descriptions, the ellipse one adds the following properties:
-
background: UserColor
6. Interaction
-
palette: NodePaletteUsed to configure the palette of the node. This palette is accessible thanks to a right click on a node. It can contain tools to create new elements in the diagram or to perform actions on the node or its target semantic element. -
actions: ActionUsed to display actions on the node being rendered. Actions are displayed as a clickable icon to trigger some specific behavior.
7. Layout
-
collapsible: booleanIndicate if the node is collapsible. A collapsed node does not display its child nodes. -
isCollapsedByDefaultExpression: InterpretedExpression Used to indicate if the node should be collapsed by default.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
userResizable: UserResizableDirectionUsed to indicate if the node can be resized by end users. -
keepAspectRatio: booleanUsed to indicate that resizing a node should keep the same aspect ratio. Use it withdefaultWidthExpressionanddefaultHeightExpressionto control precisely the size of the node. -
defaultWidthExpression: InterpretedExpression Used to configure the default width of the node.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-
-
defaultHeightExpression: InterpretedExpression Used to configure the default height of the node.
-
self: ObjectThe semantic element used as the target of the node being rendered -
editingContext: IEditingContextThe editing context of the workbench. It can be used with core services to retrieve information about the semantic elements. -
previousDiagram: DiagramThe previously rendered diagram. It can be used to retrieve information about the previous state of the diagram and its elements. -
diagramEvent: IDiagramEventThe current event that is involved in the refresh of the diagram.
-