Matrix views UI
A matrix view in the Syside VS Code Extension opens the same way a table does, from the SysMLv2 Views panel or from its source definition. To define matrix views themselves, see Matrix view structure.
Working with matrices
A matrix view marks the relationships between two sets of elements, one on each axis. An editable matrix also creates and removes those relationships from its cells.
Toolbar
Control |
Effect |
|---|---|
View name |
Shows the view’s name and the view definition it is typed by, such as
|
Compact view |
Hides the rows and columns that have no marked cell. |
Vertical column names |
Rotates the column headers to save horizontal space. It starts from the view’s
|
Export as CSV |
Writes the matrix to a file. See Export to CSV. |
Compact view and Vertical column names change only the display. They are not saved to the view.
Cells and headers
A marked cell shows the relationship’s direction: ✔ in an undirected matrix, ↗
from row to column and ↙ from column to row (see
Direction values). With showWeakTraceability set, weak marks
are shown in a lighter shade than strong ones (see Weak marks).
Hovering shows more:
A row or column header shows the element’s qualified name, and a warning when the element cannot take new relationships, with the reason.
A marked cell warns when it holds more than one relationship, or a derivation whose end is not a requirement.
An empty cell that cannot take a relationship says why.
Right-click a marked cell and choose Go to Source to open the
relationship in its .sysml file. When the cell holds several relationships, a
submenu lists each one.
Add and remove relationships
In an editable matrix, right-click an empty cell and choose Add Traceability to create a relationship. Hovering the entry names the kind of relationship it creates. In a directed matrix the relationship is created on click. In an undirected matrix the entry opens a submenu, Row to Column or Column to Row, to choose the direction first.
To remove a relationship, right-click its marked cell and choose Remove Traceability. When the cell holds several relationships, a submenu lists each one.
Both changes are written to the .sysml file immediately.
Add Traceability appears on an empty cell and Remove Traceability on a marked one. An entry that cannot be used is disabled, and hovering it gives the reason:
Reason |
Applies to |
|---|---|
The matrix is not editable. The reason says to set |
Add and remove |
The matrix cannot create relationships, as its banner explains. |
Add and remove |
The model has errors, a source file has unsaved edits, or another change is still being saved. |
Add and remove |
The row or column element cannot take a relationship of the matrix’s kind (see why a row or column is disabled). |
Add |
The mark is weak. Remove the relationship where its mark is strong. |
Remove |
The relationship is in a library, or inherited from a supertype of the context. The reason names its owner. |
Remove |