Package com.puppetlabs.xtext.textflow

Examples of com.puppetlabs.xtext.textflow.TextFlow.appendBreak()


  public void test_TextFlow_PendingMeasures() {
    TextFlow flow = this.getInjector().getInstance(TextFlow.class);
    flow.appendText("1234");
    assertEquals(4, flow.getWidthOfLastLine());
    assertEquals(1, flow.getHeight());
    flow.appendBreak();
    assertEquals(4, flow.getWidthOfLastLine());
    assertEquals(1, flow.getHeight());
    flow.changeIndentation(1);
    flow.appendBreak();
    flow.appendText("3");
View Full Code Here


    assertEquals(1, flow.getHeight());
    flow.appendBreak();
    assertEquals(4, flow.getWidthOfLastLine());
    assertEquals(1, flow.getHeight());
    flow.changeIndentation(1);
    flow.appendBreak();
    flow.appendText("3");
    flow.appendText("45");
    assertEquals(5, flow.getWidthOfLastLine());
  }
View Full Code Here

            commentText, hashContainer.create(posOnLine), new CommentFormattingOptions(
              commentConfigurationProvider.get().getFormatterAdvice(CommentType.SingleLine),
              Integer.MAX_VALUE, 0, 1), formattingContextFactory.create(state, FormattingOption.Format));

          if(!endsWithBreak)
            result.appendBreak();
          String replacement = CharSequences.trimLeft(result.getText()).toString();

          acceptor.accept(
            issue, "Change to # style comment",
            "Changes comment to # style (any trailing logic on last line is moved to separate line", null,
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.