InlayHints

class InlayHints

Options for inlay hints.

SysML models contain extensive implicit state which is hard to track manually. Inlay hints display some of this state as a virtual text inserted into the code.

While the hints may be useful, there can be a lot of them. Unlike regular text, inlay hints cannot be navigated to via keyboard hence they may make source editing harder and more frustrating. To counter this, this table contains fine-grained editor-agnostic control over which hints are shown, cascading toggle properties can be used to control groups of inlay hints.

Because inlay hints are a user preference, user-specific configuration is the recommended place for configuring them, either globally or per-project. See config file discovery for more details.

Further, Visual Studio Code contains and editor.inlayHints.enabled configuration option. It is recommended to set it to onUnlessPressed or offUnlessPressed to have them globally on or off at the press of a button. See Inlay Hints for more details. While not explicitly stated, the default keyboard shortcuts for inlay hints are Ctrl + Alt on Windows and Linux, and Control + Option on macOS.

Members defined in InlayHints (8 members)

constant

RW

Whether to show the constant keyword on implicitly constant features in SysML.

effective_names

RW

Inlay hint options for effective names.

expose_visibility

RW

Whether to show implicit expose visibility (protected).

implicit_specializations

RW

Options for implicit specialization hints.

membership_import_names

RW

Whether to show the other imported name on membership imports.

ref

RW

Whether to show the ref keyword on non-composite features in SysML.

toggle

RW

Toggle for all nested options.

__init__

Attributes

property constant: syside.conf.ConstantHint

Whether to show the constant keyword on implicitly constant features in SysML.

part def P {
    //* constant */ end e;
}
property effective_names: syside.conf.EffectiveNameHints

Inlay hint options for effective names.

property expose_visibility: bool

Whether to show implicit expose visibility (protected).

view V {
    //* protected */ expose V;
}
property implicit_specializations: syside.conf.ImpliedHeritageHints

Options for implicit specialization hints.

attribute x //* :> dataValues */;
property membership_import_names: bool

Whether to show the other imported name on membership imports.

package <short> long;

private import //* <short> */ long;
private import //* < */ short //* > long */;
property ref: syside.conf.RefHint

Whether to show the ref keyword on non-composite features in SysML.

part def P {
    //* ref */ attribute a;
}
property toggle: syside.conf.Toggle

Toggle for all nested options.

  • on enables the default behaviour

  • off disables the default behaviour and all nested options

  • explicit disables the default behaviour. Same as on if there is no default behaviour not covered by nested options.

Methods

__init__() None