Package net.sf.collabreview.core.markup

Examples of net.sf.collabreview.core.markup.InsertedByEditScriptMarkup


      if (covering == null) {
        mel = new ArrayList<MarkupElement>(3);
        if (repository.getTokenIndex().isTrivialToken(covered)) {
          mel.add(new TrivialLineMarkup(covered.getStartIndex(), covered.getEndIndex()));
        } else {
          mel.add(new InsertedByEditScriptMarkup(covered.getStartIndex(), covered.getEndIndex()));
        }
      } else {
        mel = covered.toOriginMarkupElements(covering);
        //logger.debug("- " + covered + " converted to " + mel);
        for (MarkupElement e : mel) {
View Full Code Here


  public void testSingleNoOriginNewString() {
    TokenOriginSearch tos = new TokenOriginSearch(repository);
    List<MarkupElement> result = tos.resolveGap(0, "xxx");
    assertNotNull(result);
    assertEquals(1, result.size());
    assertEquals(new InsertedByEditScriptMarkup(0, 3), result.get(0));
  }
View Full Code Here

  public void testSingleNoOrigin() {
    TokenOriginSearch tos = new TokenOriginSearch(repository);
    List<MarkupElement> result = tos.resolveGap(0, artifactContent[0]);
    assertNotNull(result);
    assertEquals(1, result.size());
    assertEquals(new InsertedByEditScriptMarkup(0, 5), result.get(0));
  }
View Full Code Here

    List<MarkupElement> expected = new ArrayList<MarkupElement>(Arrays.asList(
        new OriginMarkup(0, 4, ai[7], 0, 4, 1), // free
        new TrivialLineMarkup(4, 5),
        new OriginMarkup(5, 10, ai[7], 5, 10, 1), // world
        new TrivialLineMarkup(10, 11),
        new InsertedByEditScriptMarkup(11, 15), // xxx
        new TrivialLineMarkup(14, 15),
        new OriginMarkup(15, 17, ai[7], 16, 18, 1), // is
        new TrivialLineMarkup(17, 18),
        new OriginMarkup(18, 19, ai[6], 27, 28, 1)
    ));
View Full Code Here

    MarkupElement createForNewArea(Artifact artifact, int startOffset, int endOffset);
  }

  private static class DefaultMarkupGenerator implements NewMarkupGenerator {
    public MarkupElement createForNewArea(Artifact artifact, int startOffset, int endOffset) {
      return new InsertedByEditScriptMarkup(startOffset, endOffset);
    }
View Full Code Here

TOP

Related Classes of net.sf.collabreview.core.markup.InsertedByEditScriptMarkup

Copyright © 2018 www.massapicom. 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.