Editor message encoding:

  • The editor message encodes the 'got' string (\n's), but not the 'expected'.
  • The editor message is html in Eclipse, so multiple spaces show up as a single space

For example

The result of transformation 'Syntax -> 1) Abstract Syntax Tree -> Pretty Print (Format Code)' did not match the expected result.
Expected: module test model entity Foo { i : Int? a : Int = i <+ 0 } entity bar { } entity baz { } relation bar.baz Baz.bar
Got: "module test\n\nmodel\n\n entity Foo {\n i : Int?\n a : Int = i <+ 0\n }\n\n entity bar {\n }\n\n entity baz {\n }\n\n relation bar.baz Baz.bar\n"

Possible solutions:

  • Encode spaces with &nbsp; and show \n as well
  • Don't encode at all, but put in a <pre> block (not sure if this will work in Eclipse hover messages).

P.S. do not &nbsp; encode if the errors are on command line rather than in Eclipse

Submitted by Daco Harkes on 25 October 2016 at 22:38

On 19 November 2016 at 13:54 Gabriƫl Konat removed tag @gohla

Log in to post comments