Indent after first line [message #1732738] |
Thu, 19 May 2016 11:48 |
Maged Elaasar Messages: 23 Registered: September 2013 |
Junior Member |
|
|
I am using Xtext 2.9 formatter2 API.
I am trying to figure out how to cause the formatter to produce indentation like in the following example:
In other words, I would like to insert new lines before "from" and "to" and indent them.
My current code looks like this:
def dispatch format(Relationship relationship, extension IFormattableDocument document) {
relationship.prepend[newLines = 2]
relationship.regionFor.keyword("from").prepend[newLine]
relationship.regionFor.keyword("to").prepend[newLine]
}
which adds the new lines but not the indentation. How do I modify it, to add the indentation? Thanks in advance.
[Updated on: Thu, 19 May 2016 12:16] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03831 seconds