Essentials

SysIDE Editor activates when .sysml or .kerml file is open, providing features that helps you write, edit and validate SysML v2 models. All examples in this section are showcased in the Visual Studio Code editor.

Learn about:


Example Model: copy this model into your .sysml file to test out the features of SysIDE Editor, or use your own model.

package 'Part Tree Example' {
    part def Electrical {
        doc /*
             * Electrical parts have this documentation
             */
    }

    part def Mechanical;

    part Automobile {
        part 'Drive Train' {
            part Battery : Electrical;
            part Motor : Electrical;
        }

        part Chassis {
            part Suspension : Mechanical;
            part Body : Mechanical;
        }
    }
}

Semantic Highlighting

Whenever a .sysml or .kerml file is open, SysIDE Editor is active. In light-theme, highlighted textual notation should look like this:

Semantic highlighting

SysML v2 keywords – such as package, part or def – are highlighted in pink. If a part is given a name that is also a reserved keyword in SysML v2, such as frame, two things will happen:

  1. The word frame will be highlighted.

  2. The editor will show a red underline and highlight, indicating an error, together with an error message.

Additionally, SysIDE Editor highlights Definitions and Usages in distinct colors, enhancing the ability to quickly identify various semantic elements.

Documentation on Hover

SysIDE Editor understands links between SysML v2 elements and uses this to provide documentation on cursor hover. This is useful for quickly accessing information about a certain model element without having to necessarily navigate to it. Try it out by hovering over the word Battery in the example model – a tooltip like this appears:

Hover info

SysIDE Editor takes the documentation (the doc keyword) from either:

  1. The focused element, if it has any documentation defined;

  2. The first (most specific) explicitly or implicitly specializing type that has documentation.

If the element or specializing type has multiple documentations, they will be grouped together.

More information will be displayed when holding Ctrl/Cmd while hovering over the element – its definition source code will be displayed. Try it: Ctrl/Cmd+Hover over Electrical next to Battery.

Hover source

Hover functionality is useful for quickly inspecting how a certain element is defined without needing to navigate to the location of the definition, which could be in an another file entirely! SysIDE Editor takes the whole model into account.

Model Outline

The Outline view provides a quick overview of all elements in your current file. To open it:

  1. Press Ctrl+Shift+P on Windows/Linux, Command+Shift+P on MacOS to open the Command Palette

  2. Type “outline” and select “User View Container: Focus on Outline View”

Document symbols

Click any element in the outline to jump directly to its location in the editor. You can collapse the Folder section to give the Outline more space.

Folding

Use folding to hide nested elements and make large models more manageable. Hover next to any element to reveal the fold arrow:

Folding arrows

Click the arrow to fold/unfold the element. You can also use the Command Palette Ctrl+Shift+P on Windows/Linux, Command+Shift+P on MacOS to find the ‘Toggle Fold’ command and its keyboard shortcut.

Source code after folding

Auto Completion

SysIDE Editor provides intelligent code completion for both SysML v2 keywords and your model elements. To try it out:

  1. Start typing “pack” to see keyword suggestions

  2. Press Tab to accept a suggestion

Auto completion of a keyword

When importing elements, the editor suggests existing package names and automatically adds the required quotes:

Auto completion of a non-keyword

Validation

SysIDE Editor continuously validates your model as you type. Try copy-pasting this example after your model into the same file:

package Test {
    import 'Part Tree Example';
}

The editor will show an error because Test is not a valid package name. Hover over the red underlined text to see the error message:

Validation error

The tooltip informs about import not having explicit visibility. In old SysML v2 specifications, this would have been a perfectly fine model. However, since the 2024-09 version of SysML v2, this is considered an error. To comply with specification, add private before import. SysIDE Editor once again checks the model for errors automatically but does not find any this time.

Auto Formatting

SysIDE Editor can automatically format your model to maintain consistent style. To enable automatic formatting:

  1. Open settings with Ctrl/Cmd+Comma

  2. Search for “Editor: Format On Save” and enable it

  3. Set “Files: Auto Save” to “afterDelay”

You can also format selected code by right-clicking and choosing “Format Selection”. The formatter preserves your custom formatting conventions while ensuring consistent style across the model.


What’s Next?

You’ve now learned the essential features of SysIDE Editor for SysML v2 textual modeling. To continue:

  • Check out the Tips and Tricks section for improving your workflows and working environment

  • Explore Modeler for utilising visualisation capabilities

  • Visit Automator to learn about automation and scripting features