Systems-Modeling / SysML-v2-Pilot-Implementation

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization
GNU Lesser General Public License v3.0
114 stars 23 forks source link

ST6RI-671 Non-keyword highlighting does not work #478

Closed seidewitz closed 1 year ago

seidewitz commented 1 year ago

This PR adds the following to org.omg.kerml.xtext.ui:

  1. KerMLAntlrTokenToAttributeIdMapper – This class extends the DefaultAntlrTokenToAttributeIdMapper to appropriately map tokens using the names of the lexical rules in the KerMLExpressions grammar (which is the base for the KerML and SysML grammars).
  2. KerMLHighlightingConfiguration – This class extends the DefaultHighlightingConfiguration so that the default style for numbers is the same as the default text style, because the usual Xtext gray style looks strange for numbers used in multiplicities with *. (The * symbol is also used as the multiplication operator, so it can't be given a number style.)

The org.omg.kerml.xtext.ui.KerMLUIModel and org.omg.sysml.xtext.ui.SysMLUiModel classes have been updated with the appropriate bindings for the above.