Spaces for indentation [message #1821459] |
Thu, 13 February 2020 07:15  |
Eclipse User |
|
|
|
Hi
The questions was asked several times before. However I can't find a working solution. Can you suggest please how to use spaces for indentation? Is it possible to use tabs/spaces depending on Eclipse settings?
[Updated on: Thu, 13 February 2020 07:18] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: Spaces for indentation [message #1822244 is a reply to message #1821502] |
Mon, 02 March 2020 07:27  |
Eclipse User |
|
|
|
In case someone winds up on this thread while doing a search on the subject, a practical solution is also documented in this other thread: https://www.eclipse.org/forums/index.php/t/1102362/
I had the same issue that I could not get the formatter to follow my preferences on the initial programmatic generation of my model. A subsequent format request would fix it, but the initial format job always used tabs. When used in command line mode, it was hopeless to get spaces because the user was not interacting and could not perform a interactive manual correction.
There must be a proper fix lurking somewhere, or a bug lurking somewhere, but the thread linked above has information on how to hard code the indentation to spaces which worked for my uses.
Also, FWIW, whitespace languages see multiple spaces and tabs as different block indentations, so it was a real headache for my DSL because the user starts getting errors and can't tell why unless they display whitespace and know exactly what's going on.
|
|
|
Powered by
FUDForum. Page generated in 0.07461 seconds