/**
  * @see org.eclipse.jgit.diff.DiffFormatter#writeLine(char, org.eclipse.jgit.diff.RawText, int)
  */
 protected void writeLine(char prefix, RawText text, int cur) throws IOException {
   if (prefix == ' ') {
     super.writeLine(prefix, text, cur);
     stream.flushLine();
   } else {
     Type type = prefix == '+' ? Type.ADD : Type.REMOVE;
     int start = stream.offset;
     super.writeLine(prefix, text, cur);
     stream.flushLine();
     addRange(type, start, stream.offset);
   }
 }
Exemple #2
0
 /**
  * Output a removed line
  *
  * @param text RawText for accessing raw data
  * @param line the line number within text
  * @throws IOException
  */
 protected void writeRemovedLine(final RawText text, final int line) throws IOException {
   writeLine('-', text, line);
 }
Exemple #3
0
 /**
  * Output a line of context (unmodified line).
  *
  * @param text RawText for accessing raw data
  * @param line the line number within text
  * @throws IOException
  */
 protected void writeContextLine(final RawText text, final int line) throws IOException {
   writeLine(' ', text, line);
 }