Package org.eclipse.egit.ui.internal.commit

Examples of org.eclipse.egit.ui.internal.commit.DiffStyleRangeFormatter.format()


    IDocument document = new Document();
    DiffStyleRangeFormatter diffFormatter = new DiffStyleRangeFormatter(
        document);
    diffFormatter.setContext(1);
    diffFormatter.setRepository(revision.getRepository());
    diffFormatter.format(interestingDiff, diff.getOldText(),
        diff.getNewText());

    diffText.setDocument(document);
    diffText.setFormatter(diffFormatter);
  }
View Full Code Here


  public void testRanges() throws Exception {
    IDocument document = new Document();
    DiffStyleRangeFormatter formatter = new DiffStyleRangeFormatter(
        document);
    formatter.setRepository(repository);
    formatter.format(commit.getTree(), commit.getParent(0).getTree());
    assertTrue(document.getLength() > 0);
    DiffStyleRange[] ranges = formatter.getRanges();
    assertNotNull(ranges);
    assertTrue(ranges.length > 0);
    for (DiffStyleRange range : ranges) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.