/** * @param out * the {@link java.io.OutputStream} where to write the textual * presentation * @param res * the merge result which should be presented * @param seqName * When a conflict is reported each conflicting range will get a * name. This name is following the "<<<<<<< * " or ">>>>>>> " conflict markers. The * names for the sequences are given in this list * @param charset * the character set used when writing conflict metadata */ MergeFormatterPass(OutputStream out, MergeResult<RawText> res, List<String> seqName, Charset charset) { this.out = new EolAwareOutputStream(out); this.res = res; this.seqName = seqName; this.charset = charset; this.threeWayMerge = (res.getSequences().size() == 3); }
/** * Begin a new line if not already in one. * * @exception IOException * if an I/O error occurs. */ void beginln() throws IOException { if (!bol) write('\n'); }
void formatMerge() throws IOException { boolean missingNewlineAtEnd = false; for (MergeChunk chunk : res) { RawText seq = res.getSequences().get(chunk.getSequenceIndex()); writeConflictMetadata(chunk); // the lines with conflict-metadata are written. Now write the chunk for (int i = chunk.getBegin(); i < chunk.getEnd(); i++) writeLine(seq, i); missingNewlineAtEnd = seq.isMissingNewlineAtEnd(); } // one possible leftover: if the merge result ended with a conflict we // have to close the last conflict here if (lastConflictingName != null) writeConflictEnd(); if (!missingNewlineAtEnd) out.beginln(); }
/** * Begin a new line if not already in one. * * @exception IOException * if an I/O error occurs. */ void beginln() throws IOException { if (!bol) write('\n'); }
void formatMerge() throws IOException { boolean missingNewlineAtEnd = false; for (MergeChunk chunk : res) { RawText seq = res.getSequences().get(chunk.getSequenceIndex()); writeConflictMetadata(chunk); // the lines with conflict-metadata are written. Now write the chunk for (int i = chunk.getBegin(); i < chunk.getEnd(); i++) writeLine(seq, i); missingNewlineAtEnd = seq.isMissingNewlineAtEnd(); } // one possible leftover: if the merge result ended with a conflict we // have to close the last conflict here if (lastConflictingName != null) writeConflictEnd(); if (!missingNewlineAtEnd) out.beginln(); }
/** * Begin a new line if not already in one. * * @exception IOException * if an I/O error occurs. */ void beginln() throws IOException { if (!bol) write('\n'); }
void formatMerge() throws IOException { boolean missingNewlineAtEnd = false; for (MergeChunk chunk : res) { RawText seq = res.getSequences().get(chunk.getSequenceIndex()); writeConflictMetadata(chunk); // the lines with conflict-metadata are written. Now write the chunk for (int i = chunk.getBegin(); i < chunk.getEnd(); i++) writeLine(seq, i); missingNewlineAtEnd = seq.isMissingNewlineAtEnd(); } // one possible leftover: if the merge result ended with a conflict we // have to close the last conflict here if (lastConflictingName != null) writeConflictEnd(); if (!missingNewlineAtEnd) out.beginln(); }
MergeFormatterPass(OutputStream out, MergeResult<RawText> res, List<String> seqName, String charsetName) { this.out = new EolAwareOutputStream(out); this.res = res; this.seqName = seqName; this.charsetName = charsetName; this.threeWayMerge = (res.getSequences().size() == 3); }
/** * @param out * the {@link java.io.OutputStream} where to write the textual * presentation * @param res * the merge result which should be presented * @param seqName * When a conflict is reported each conflicting range will get a * name. This name is following the "<<<<<<< * " or ">>>>>>> " conflict markers. The * names for the sequences are given in this list * @param charset * the character set used when writing conflict metadata */ MergeFormatterPass(OutputStream out, MergeResult<RawText> res, List<String> seqName, Charset charset) { this.out = new EolAwareOutputStream(out); this.res = res; this.seqName = seqName; this.charset = charset; this.threeWayMerge = (res.getSequences().size() == 3); }