Expressions
SysON supports the visualisation, creation and edition of SysML v2 expressions directly using their natural textual representation.
1. Visualisation
In the Project Explorer view, elements corresponding to top-level expressions display the textual representation of the whole expression:
By default, the internal structure of the expressions is hidden, but can be revealed by disabling the Hide expression internals filter:
Internals hidden (default) |
Internals visible |
|
|
2. Creation
To create an expression, invoke the New expression context menu action on a compatible element (supported elements are Attributes, Constraints and Transitions).
A modal will open where you can enter the textual representation of the expression to create. Click on the Update button to validate.
-
If the expression entered is valid, it will be created and the modal will be automatically close.
-
If the expression entered is not valid, the modal will be kept open and show the error(s) in an expandable accordion. Fix any error reported before clicking on Update again (or canceling the operation).
3. Edition
To edit an already existing expression, invoke the Edit expression context menu action directly on the existing expression. The same modal as for expression creation will open, but with the current textual representation of the expression pre-filled.
Edit the textual representation of the expression as required, and click on the Update button to validate.
As for expression creation, the change will only be applied if there are no errors detected; otherwise the modal will display any errors (e.g. names used in the expression that can not be resolve to existing elements) so that you can fix the input.
Note that if the new text value entered for the expression is empty, applying the change will delete the expression.
4. Deletion
To delete an existing expression, you can simply invoke the normal Delete menu item action on the expression itself or the new Delete expression on its parent element.
You can also open the Edit expression modal, clear the text and apply the change; this will also delete the expression.