Model Navigation
In eTrice the source of the models is text based. For better comprehensibility there are also viewers for the structure and the behavior of structure classes. Further, the textual models can be structured hierarchically using the import statement.
So jumping between textual models and switching to and between diagrams and back to the textual representation is a frequent task. Therefore in this chapter we want to show the various possibilities to navigate the models.
From Model to Behavior to Structure
There are three global key bindings (cf. the eTrice main menu item):
-
Ctrl+Shift+Alt+M – jump to the textual model (determined by the current diagram selection)
-
Ctrl+Shift+Alt+B – jump to the behavior diagram of the current actor class (determined by the cursor or selection position)
-
Ctrl+Shift+Alt+S – jump to the structure of the current structure class (determined by the cursor or selection position)
Jumping from a diagram to the textual model using Ctrl+Shift+Alt+M will open (or bring to the front) an editor with the ROOM file and will select the textual representation of the element currently selected in the diagram in the text.
The other way round, the position of the cursor or selection in the ROOM file is relevant. If it is enclosed by an actor class then for Ctrl+Shift+Alt+B a state machine editor is opened. If it is a structure class and Ctrl+Shift+Alt+S is pressed then the structure editor is opened for this class.
As an alternative to the keyboard shortcuts the user can directly use the associated VSCode Commands via the VSCode Command Menu (Ctrl+Shift+P under section eTrice) or use the provided Code Lens Buttons above the ActorClass definition / the buttons on the top Left corner of the diagrams.
Switching from the behavior to the structure is performed on Ctrl+Shift+Alt+S and vice versa on Ctrl+Shift+Alt+B.