0
classe formatter Mon Xtend étend AbstractFormatter2 et je voudrais au format ce code:Comment éviter newline pendant le formatage avec Xtend
Board my_board {
Pin {
Name = my_name;
Comment = "my_comment";
Id= "my_id";
}
}
à celui-ci:
Board my_board {
Pin {
Name = my_name; Comment = "my_comment"; Id= "my_id";
}
}
J'ai écrit ce qui suit Xtend code dans une fonction de format, mais le texte à formater reste le même.
val open = pin.regionFor.keyword('Name')
val close = pin.regionFor.keyword('Id')
interior(open, close)[newLines = 0]
Quelle est la bonne façon d'y parvenir, s'il vous plaît?