Package com.google.collide.dto.DocOpComponent

Examples of com.google.collide.dto.DocOpComponent.Retain


      case INSERT:
        visitor.insert(((Insert) component).getText());
        break;

      case RETAIN:
        Retain retain = (Retain) component;
        visitor.retain(retain.getCount(), retain.hasTrailingNewline());
        break;

      case RETAIN_LINE:
        visitor.retainLine(((RetainLine) component).getLineCount());
        break;
View Full Code Here


      case INSERT:
        String insertText = ((Insert) component).getText();
        return "I(" + toStringForComponentText(insertText, verbose) + ")";

      case RETAIN:
        Retain retain = (Retain) component;
        return "R(" + (retain.hasTrailingNewline() ? (retain.getCount() - 1) + "\\n" : ""
            + retain.getCount()) + ")";

      case RETAIN_LINE:
        return "RL(" + ((RetainLine) component).getLineCount() + ")";

      default:
View Full Code Here

  public static void assertRetain(int expectedRetainCount, boolean expectedHasTrailingNewline,
      DocOp op, int index) {
    DocOpComponent component = op.getComponents().get(index);
    assertEquals(RETAIN, component.getType());
    Retain retain = (Retain) component;
    assertEquals(expectedRetainCount, retain.getCount());
    assertEquals(expectedHasTrailingNewline, retain.hasTrailingNewline());
  }
View Full Code Here

TOP

Related Classes of com.google.collide.dto.DocOpComponent.Retain

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.