umple icon indicating copy to clipboard operation
umple copied to clipboard

CodeMirror improvements for UmpleOnline - Highlighting

Open Nava2 opened this issue 10 years ago • 4 comments

Originally reported on Google Code with ID 322


I would like to see the UmpleOnline text editor enhanced to highlight the following:

  1. State definitions and constant values in dark blue.
  2. Event names (state transitions) in dark red and method names in pink;
  3. Destination states of transitions in light blue
  4. The names of classes, in dark green and references to classes in light green.
  5. Attributes names and stateMachines in some other colour that is not too bright and doesn't conflict with the above,

This would be done by creating an overlay parser or parsers, as shown: http://codemirror.net/demo/mustache.html

Make sure this works with enumerations too, which are degenerate state machines.

You would have to parse declarations of classes finding elements that are, for example,state machines and states, and then highlight then. Remember: It will be necessary to highlight substate names that could be nested deeply.

Note I am going to add another issue that deals with syntax assistance too, which could be done at the same time as this.


Reported by @umple on 2012-08-08 18:46:49

Nava2 avatar Aug 26 '15 02:08 Nava2

Reported by @umple on 2012-12-31 17:57:13

  • Status changed: Accepted

Nava2 avatar Aug 26 '15 02:08 Nava2

Reported by @umple on 2013-07-08 15:16:00

  • Owner removed

Nava2 avatar Aug 26 '15 02:08 Nava2

See also #222 which could be done together with this.

TimLethbridge avatar Nov 25 '22 20:11 TimLethbridge

Further thoughts on colours

Purple All Umple Keywords

Blue (all declarations for consistency) state definition, which is a definition of a value

Green (all types for consistency) Names of classes used as types:

Dark/bright Pink destination states after -> (so we know that control is tranferred)

Light blue event names (they indirectly declare methods)

Strings are red numbers are dark green

TimLethbridge avatar Mar 30 '23 19:03 TimLethbridge