I have the following problem: The identation in my project doesn't work. I have the following structure:
model --> n Procedure -->1 Body -->n Lines
Example:
def test() {
.test
.test
.tralala
.test
}
I try to indent the lines inside the procedure by using the following code:
def dispatch void format(ProcedureStructure entity, extension IFormattableDocument document) {
entity.regionFor.keyword(")").prepend[noSpace]
entity.regionFor.keyword("(").prepend[noSpace]
val open = entity.regionFor.keyword("{")
val close = entity.regionFor.keyword("}")
interior(open, close)[indent]
format(entity.getBody(), document);
}
The first two lines work like expected, but identation doesn't work at all. Can you give me some hints how to solve that problem?
is it possible to indent the Line object ? I have tried also to use a keyword in order to format the lines, but indent still doesn't work:
line.regionFor.keyword(".").prepend[indent]
The methods are called, but I don't see any changein the editor. I'm using Xtext 2.9 from 22.05