Node Tree
- 5 minutes to read
The Model Editor provides a tree list, representing the Application Model structure. You can use this tree to navigate to a certain node and modify the Application Model structure by adding, removing and rearranging nodes. This topic provides information on the following capabilities and features of the nodes tree.
- Application Model Structure Visualization
- Context Menu Commands
- Drag-and-Drop Functionality
- Linked Nodes
- Grouping
Application Model Structure Visualization
Each node has a caption specified by its Id property and an associated image. Nodes that are modified in the current model layer have captions displayed in bold. Properties of the currently focused node are displayed in the property grid to the right.
Context Menu Commands
The following context menu is available when right-clicking a node.
Most of the commands available in this menu can be applied not only to a single focused node, but to several selected nodes at once. To select several nodes use the standard approach - hold down SHIFT and click a node to select sequential nodes, or hold down CTRL and click a node to select individual nodes. The context menu commands are described in the table below.
Command | Shortcut | Description |
---|---|---|
Add… | - | Creates a child of the current node. The command is not available when multiple nodes are selected. |
Group | CTRL+G | This command enables grouping. |
Ungroup | CTRL+G | Disables grouping, specified by the Group command. |
Go to Source | CTRL+ENTER | Available for child nodes of the Links nodes. Navigates to the linked node. |
Delete | CTRL+D | Deletes the current node(s). |
Show Differences | - | Shows the XML code that represents the current node(s) differences existing in the current layer and aspect. |
Reset Differences | - | Resets the current node(s) differences. The node will revert to the generated state. |
Merge Differences | - | Available in the Model Editor that is invoked at run time. Merges the current node(s) differences into the underlying model layer. See the Model Merge Tool topic for details. |
Copy | CTRL+C | Copies the current node(s). |
Paste | CTRL+V | Pastes nodes that were previously copied using the Copy command as the children of the current node. If the current node already has a child with the same ID, the “_Copy’ suffix will be added to the pasted node ID. |
Clone | CTRL+ALT+C | Creates the current node(s) duplicate at the same hierarchy level. The Id property of the new node is appended by the “_Copy” suffix and other properties remain intact. |
Generate Content | - | Generates the hierarchical content of the newly created empty View node or an existing View node that has been customized incorrectly. The information is generated using the BOModel | <Class> node that corresponds to the ModelClass property value of the current node. The command is not available when multiple nodes are selected. |
Up | ALT+UP | Moves the current node(s) one position up in the current collection. The indexes (see IModelNode.Index) of collection nodes are automatically modified to correspond to the rearrangement. Multiple selected nodes should be the children of the same parent. |
Down | ALT+DOWN | Moves the current node(s) one position down in the current collection. The indexes (see IModelNode.Index) of nodes are automatically modified to correspond to the rearrangement. Multiple selected nodes should be the children of the same parent. |
Drag-and-Drop Functionality
You can move a child node from one parent node to another using drag-and-drop. It is convenient to move an Action to another action container, move a navigation item to another group and modify the Detail View layout. The yellow arrow to the left indicates the target node.
When dragging, you can place a pointer over the target node and it will be expanded automatically after a small delay. To create a copy of the node instead of moving it, just hold down the CTRL key when dragging. If the target node already has a child with the same ID, the “_Copy’ suffix will be added.
You can rearrange child items of a certain parent node using drag-and-drop. It is convenient when reordering list view columns or navigation items. Hold down the SHIFT key and drag a child node up or down the list within the bounds of its parent node. The blue arrow to the left indicates the node’s new position.
The indexes of child nodes will be automatically modified to correspond to the rearrangement.
You can select multiple nodes and drag-and-drop several nodes at once.
Linked Nodes
Certain nodes have a “virtual” child node named Links. It is hidden by default; you can toggle its visibility using the Show Links / Hide Links toolbar command. Under this node, you can see nodes that contain references to the current node. The screenshot below illustrates the Department node of the IModelClass type. Within the Links node, you can see the Creatable Item for the Department object, Members of the Department type and Views designed for the Department type.
You can edit properties of linked nodes in place, or navigate to an actual node location using the Go to Source command.
Grouping
Use the Group/Ungroup context menu command to enable/disable grouping. The screenshot below illustrates the grouped Views node.
Views that do not depend on a certain business class (e.g., DashboardView) fall into the Unspecified node.
By default, grouping is supported for the child nodes of Views, BOModel, Controllers and Actions. To customize default grouping, or implement grouping rules for other nodes, use the ModelEditorGroupingHelper class.