private void reformat(Context context, int indent) {
Document doc = context.document();
TokenHierarchy th = TokenHierarchy.get(doc);
TokenSequence ts = th.tokenSequence();
ts.moveStart();
int newIndent = 0;
boolean nextIndent = false;
TreeMap<Integer, Integer> newIdentMap = new TreeMap<Integer, Integer>(new ReverseOrderInteger());
do {
Token token = ts.token();