Пример #1
0
 void ensureNewlines(MessageFile mf) {
   for (MessageFile.Message m : mf.messages.values()) {
     MessageFile.Line l = m.firstLine;
     while (l.text.endsWith("\\")) l = l.next;
     if (l.next != null && !l.next.text.isEmpty()) l.insertAfter("");
   }
 }
Пример #2
0
 void sort(MessageFile mf, boolean includePrecedingNewlines) {
   for (MessageFile.Message m : mf.messages.values()) {
     for (MessageFile.Line l : m.getLines(includePrecedingNewlines)) {
       l.remove();
       mf.lastLine.insertAfter(l);
     }
   }
 }