Docs

SysModeler — User Manual

10. SysML v2 — Code-Based Modeling

SysML v2 projects are code-first: you write model source in .sysml files, and SysModeler generates and continuously synchronizes the diagram from your text.

10.1 The integrated code editor

The built-in editor is tailored to SysML v2 textual syntax and backed by a Language Server Protocol (LSP) engine.

CapabilityDescription
LSP intelligenceReal-time syntax checking, contextual auto-completion, hover definitions, and structured symbol navigation across all files
Code MinimapA scaled overview on the right of the editor; click/drag to jump to sections, locate syntax errors, or find highlighted search results without manual scrolling
Copy codeCopy the current editor script to your system clipboard
Download CodeSave the code file directly to your local machine
Compile (Ctrl + S)Executes compilation to test syntax and render the graphical view

10.2 Compilation lifecycle

When your code changes, it recompiles and the graphical view regenerates. A compilation status indicator reports progress through its lifecycle — startedin progresscompleted / failed — along with the current phase (e.g., parsing, name resolution). On failure, errors point you to what to fix.

10.3 Navigation & symbol refactoring (LSP)

ActionDescriptionShortcut
Go to DefinitionJump to where the selected element/variable is declaredF12
Go to ReferencesList every place a symbol is used across the projectShift + F12
Peek DefinitionPreview a definition/reference inline without leaving your locationAlt + F12 (Linux: Ctrl + Shift + F10)
Rename SymbolSafely rename a symbol across the entire projectF2
Change All OccurrencesMulti-caret edit of all matching instances in the active documentCtrl + F2
Format DocumentAuto-clean indentation, spacing, and syntax alignmentShift + Alt + F (Linux: Ctrl + Shift + I)
Toggle line commentComment/uncomment the current line(s)Ctrl + /
Command PaletteKeyboard-first access to all editor actionsF1 (or Ctrl + Shift + P)

10.4 The generated diagram (bi-directional editing)

As your code compiles, the graphical canvas re-renders your model automatically — the rigor of text with the readability of a diagram, without hand-drawing anything.

  • You can adjust the layout (move/resize elements) on the generated diagram.
  • Renaming an element on the canvas updates the underlying source code and triggers recompilation — editing is bi-directional.
  • Recent v2 releases render multiplicity in graphical notation.

10.5 Canvas contextual node actions (v2)

Right-click a node on the v2 canvas for context actions:

ActionDescriptionShortcut
Go to Source CodeJump to the exact line in the editor where the node is defined
Add Reference to ChatInsert the node into the AI Agent context to ask about it
Hide / Show NodeTemporarily remove a node from the canvas without deleting its code definitionCtrl + Shift + H
Delete NodePermanently remove the component from the modelDel
Custom coloringAssign a custom node color
Expand / Collapse childrenFold or unfold a node's child elementsCtrl + Shift + C

Caution: In v2, Ctrl + Shift + H hides the selected node. In v1 the same chord aligns middle. Some references also document a plain Shift + H for hiding; the in-app Key Bindings dialog is authoritative for your build.

10.6 Canvas navigation (v2)

ActionShortcut
Open file searchCtrl + P
Close active tabAlt + W
Zoom inCtrl + +
Zoom outCtrl + -
Horizontal scrollShift + Scroll
Reset zoom & centerCtrl + 0
Fullscreen canvasCtrl + Shift + F
MagnifierAlt + Hover

The v2 diagram also provides Dynamic Collision Avoidance, the Canvas Minimap, Search Node, and ELK Auto-Layout, exactly as on the v1 canvas (Section 9.3, 9.8).