|
|
Re: Autoformat: The comment preceding an element is not indented correctly. [message #1699491 is a reply to message #1258736] |
Wed, 24 June 2015 14:59 |
ayman salah Messages: 131 Registered: June 2015 |
Senior Member |
|
|
Did you get it to work this way? If not, did you find a solution? I am trying to implement it and it is giving me a null exception when trying to
return new MyTokenStream(out, indent, getConfig(), createMatcher(), getHiddenTokenHelper(), preserveWhitespaces);
Quote:Hi,
I found strange behavior of auto-formatting for comments.
Comments preceding an element follow the indentation rules of the parent element:
Expected behaviour is to have the same indents as the commented element:
This behaviour can be seen in the editor for Xtext grammar itself and generated editors.
This issue was discussed in another project. We solved this issue by using a modification of their formatter stream which overrides writeHidden() and writeSemantic() methods.
It works, but is there is a better solution?
Thanks,
Tanya
|
|
|
Powered by
FUDForum. Page generated in 0.02775 seconds