Examples of appendBreak()


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

    for(IDomNode n : node.getChildren()) {
      if(n.getGrammarElement() == caseRuleCall) {
        if(!firstCaseSeen) {
          // finish measurement of the position the case will appear at
          //
          continuedFlow.appendBreak();
          continuedFlow.getIndentation();
          availableWidth = currentMaxWidth - (continuedFlow.getIndentation() + 1) *
              continuedFlow.getIndentSize();
        }
        // used to measure output of formatted case values
View Full Code Here

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

      if(n.getGrammarElement() instanceof RuleCall &&
          ((RuleCall) n.getGrammarElement()).getRule() == selectorEntryRule) {
        if(!firstSelectoEntrySeen) {
          // finish measurement of the position the selectorEntry will appear at
          //
          continuedFlow.appendBreak();
          continuedFlow.getIndentation();
          availableWidth = currentMaxWidth - (continuedFlow.getIndentation() + 1) *
              continuedFlow.getIndentSize();
        }
        // used to measure output of formatted selector entry values
View Full Code Here

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

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

    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

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

            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.