To customize auto formating in my xText Project I edited my subclass of AbstractDeclarativeFormatter. That works like a charm but the elements are in a completely different order than in my xText grammar file. How can I configure my desired order of elements for auto formating?
EDIT: I just noticed the order only changes when I call the auto formatter from the command line with
Builder builder = SaveOptions.newBuilder();
builder.format();
SaveOptions s = builder.getOptions();
ByteArrayOutputStream output = new ByteArrayOutputStream();
try {
rootOfXtextAst.eResource()
.save(output, s.toOptionsMap());
String text = output.toString();
return text;
} catch (IOException e) {
[...]
}