Java Code Examples for org.eclipse.xtend2.lib.StringConcatenation.append()

The following are Jave code examples for showing how to use append() of the org.eclipse.xtend2.lib.StringConcatenation class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 7 votes
public CharSequence compilarTexto(final Postre p) {
  StringConcatenation _builder = new StringConcatenation();
  {
    boolean _isHelado = p.isHelado();
    if (_isHelado) {
      _builder.append("Tipo de producto: Helado");
      _builder.newLineIfNotEmpty();
    } else {
      _builder.append("Tipo de producto: Postre no helado");
      _builder.newLineIfNotEmpty();
    }
  }
  _builder.append("Distribuidor: ");
  Distribuidor _distribuidor = p.getDistribuidor();
  _builder.append(_distribuidor);
  _builder.newLineIfNotEmpty();
  _builder.append("Listado de ingredientes: ");
  String _ingredientes = this.ingredientes(p.getIngredientes());
  _builder.append(_ingredientes);
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 2
Project: org.xtext.dsl.restaurante   File: RestauranteNewProjectWizardInitialContents.java   View Source Code Vote up 6 votes
public void generateInitialContents(final IFileSystemAccess2 fsa) {
  String _primaryFileExtension = this.fileExtensionProvider.getPrimaryFileExtension();
  String _plus = ("src/model/Model." + _primaryFileExtension);
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Restaurantes \"Hola\" fecha 30-10-2016");
  _builder.newLine();
  _builder.newLine();
  _builder.append("Ingredientes {");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("Ingrediente: COD1 \'moluscos\' infoURL: http://moluscos.com alergenico");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  fsa.generateFile(_plus, _builder);
}
 
Example 3
Project: xtext-extras   File: CompilerTests2.java   View Source Code Vote up 6 votes
@Test
public void testBasicForLoop_0() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("{");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("for (var i = 0; i < 10; i = i + 1) {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("for (int i = 0; (i < 10); i = (i + 1)) {");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.compilesTo(_builder, _builder_1);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 4
Project: xtext-core   File: OverriddenValueInspectorTest.java   View Source Code Vote up 6 votes
@Test
public void testUnassignedRule_01() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("grammar org.foo with org.eclipse.xtext.common.Terminals");
  _builder.newLine();
  _builder.append("generate metamodel \'foo.sample\'");
  _builder.newLine();
  _builder.append("First : Second name+=ID;");
  _builder.newLine();
  _builder.append("Second: name+=ID;");
  _builder.newLine();
  String grammarAsString = _builder.toString();
  final Grammar grammar = this.getGrammar(grammarAsString);
  AbstractRule _findRuleForName = GrammarUtil.findRuleForName(grammar, "First");
  final ParserRule rule = ((ParserRule) _findRuleForName);
  this.validateRule(rule);
  Assert.assertTrue(this.warnings.toString(), this.warnings.isEmpty());
}
 
Example 5
Project: xtext-extras   File: CompilerTests2.java   View Source Code Vote up 6 votes
@Test
public void testForLoop_03() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("for(i: 1..2) { i.toString }");
  _builder.newLine();
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("org.eclipse.xtext.xbase.lib.IntegerRange _upTo = new org.eclipse.xtext.xbase.lib.IntegerRange(1, 2);");
  _builder_1.newLine();
  _builder_1.append("for (final Integer i : _upTo) {");
  _builder_1.newLine();
  _builder_1.append("  ");
  _builder_1.append("i.toString();");
  _builder_1.newLine();
  _builder_1.append("}");
  _builder_1.newLine();
  this.compilesTo(_builder, _builder_1);
}
 
Example 6
Project: xtext-extras   File: NewLanguageFeaturesCompilerTest.java   View Source Code Vote up 6 votes
@Test
public void testBlockHasNoSuperfluousBraces_03() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("{ var (int)=>void fun = [ int i | new Object() new Object() ] }");
  _builder.newLine();
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("final org.eclipse.xtext.xbase.lib.Procedures.Procedure1<Integer> _function = (Integer i) -> {");
  _builder_1.newLine();
  _builder_1.append("  ");
  _builder_1.append("new Object();");
  _builder_1.newLine();
  _builder_1.append("  ");
  _builder_1.append("new Object();");
  _builder_1.newLine();
  _builder_1.append("};");
  _builder_1.newLine();
  _builder_1.append("org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super Integer> fun = _function;");
  _builder_1.newLine();
  this.compilesTo(_builder, _builder_1, JavaVersion.JAVA8);
}
 
Example 7
Project: Xtext_Xtend_HTML_Generator   File: MyDslParsingTest.java   View Source Code Vote up 5 votes
@Test
public void loadModel() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("Hello Xtext!");
    _builder.newLine();
    final Mensamodel result = this.parseHelper.parse(_builder);
    Assert.assertNotNull(result);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 8
Project: org.xtext.dsl.restaurante   File: GeneradorWeb.java   View Source Code Vote up 5 votes
public CharSequence compilarIngredientes(final List<Ingrediente> ingredientes) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("var code = \'<table class=\"tingredientes\">\\");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("<tr class=\"tingredientes_cabecera\">\\");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<td></td>\\");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<td>Ingrediente</td>\\");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<td>Al�rgeno</td>\\");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("</tr>\\");
  _builder.newLine();
  {
    for(final Ingrediente i : ingredientes) {
      _builder.append("\t");
      CharSequence _compilarTexto = this.compilarTexto(i);
      _builder.append(_compilarTexto, "\t");
      _builder.newLineIfNotEmpty();
    }
  }
  _builder.append("</table>\';");
  _builder.newLine();
  return _builder;
}
 
Example 9
Project: org.xtext.dsl.restaurante   File: GeneradorWeb.java   View Source Code Vote up 5 votes
public CharSequence compilarProductos(final List<Producto> productos) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("var code = \'");
  {
    for(final Producto p : productos) {
      CharSequence _compilarTexto = this.compilarTexto(p);
      _builder.append(_compilarTexto);
    }
  }
  _builder.append("\';");
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 10
Project: org.xtext.dsl.restaurante   File: GeneradorWeb.java   View Source Code Vote up 5 votes
public CharSequence compilarMenus(final List<Menu> menus) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("var code = \'");
  {
    for(final Menu m : menus) {
      CharSequence _compilarTexto = this.compilarTexto(m);
      _builder.append(_compilarTexto);
    }
  }
  _builder.append("\';");
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 11
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 5 votes
public CharSequence compilarTexto(final Ingrediente i) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Ingrediente: ");
  String _nombre = i.getNombre();
  _builder.append(_nombre);
  _builder.append(" c�digo ");
  String _name = i.getName();
  _builder.append(_name);
  _builder.append(" ");
  {
    boolean _isAlergenico = i.isAlergenico();
    if (_isAlergenico) {
      _builder.append("(alerg�nico)");
    }
  }
  _builder.newLineIfNotEmpty();
  {
    String _infoURL = i.getInfoURL();
    boolean _tripleNotEquals = (_infoURL != null);
    if (_tripleNotEquals) {
      _builder.append("\t");
      _builder.append("Se puede consultar m�s informaci�n en ");
      String _infoURL_1 = i.getInfoURL();
      _builder.append(_infoURL_1, "\t");
      _builder.newLineIfNotEmpty();
    }
  }
  {
    String _foto = i.getFoto();
    boolean _tripleNotEquals_1 = (_foto != null);
    if (_tripleNotEquals_1) {
      _builder.append("\t");
      _builder.append("Se ha proporcionado una foto para el ingrediente en la ruta imagenes/");
      String _foto_1 = i.getFoto();
      _builder.append(_foto_1, "\t");
      _builder.newLineIfNotEmpty();
    }
  }
  return _builder;
}
 
Example 12
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 5 votes
public CharSequence compilarTexto(final Restaurante r) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Restaurantes ==> ");
  String _nombre = r.getNombre();
  _builder.append(_nombre);
  _builder.newLineIfNotEmpty();
  _builder.append("Fecha de edici�n ==> ");
  String _fecha = r.getFecha();
  _builder.append(_fecha);
  _builder.newLineIfNotEmpty();
  _builder.newLine();
  _builder.append("Informaci�n sobre los productos");
  _builder.newLine();
  _builder.append("-------------------------------");
  _builder.newLine();
  {
    EList<Producto> _productos = r.getProductos();
    for(final Producto p : _productos) {
      CharSequence _compilarTexto = this.compilarTexto(p);
      _builder.append(_compilarTexto);
      _builder.newLineIfNotEmpty();
    }
  }
  _builder.newLine();
  _builder.append("Informaci�n sobre los men�s");
  _builder.newLine();
  _builder.append("---------------------------");
  _builder.newLine();
  {
    EList<Menu> _menus = r.getMenus();
    for(final Menu m : _menus) {
      CharSequence _compilarTexto_1 = this.compilarTexto(m);
      _builder.append(_compilarTexto_1);
      _builder.newLineIfNotEmpty();
    }
  }
  return _builder;
}
 
Example 13
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 5 votes
public CharSequence informacionNutricional(final Nutricional n) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Por cada ");
  String _cantidad = n.getCantidad();
  _builder.append(_cantidad);
  String _unidad = n.getUnidad();
  _builder.append(_unidad);
  _builder.append(" de producto se proporciona:");
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  String _energia = n.getEnergia();
  _builder.append(_energia, "\t");
  _builder.append("Kcal de energ�a, ");
  String _grasas = n.getGrasas();
  _builder.append(_grasas, "\t");
  _builder.append("g de grasa, ");
  String _hidratos = n.getHidratos();
  _builder.append(_hidratos, "\t");
  _builder.append("g de hidratos de carbono ");
  String _proteinas = n.getProteinas();
  _builder.append(_proteinas, "\t");
  _builder.append("g de proteinas ");
  String _sal = n.getSal();
  _builder.append(_sal, "\t");
  _builder.append("g de sal");
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 14
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 5 votes
public CharSequence compilarTexto(final BebidaFria p) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Tipo de producto: Bebida fr�a");
  _builder.newLine();
  _builder.append("Distribuidor: ");
  Distribuidor _distribuidor = p.getDistribuidor();
  _builder.append(_distribuidor);
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 15
Project: xtext-extras   File: XbaseFormatterTest.java   View Source Code Vote up 5 votes
@Test
public void formatSwitchSL1() {
  final Procedure1<FormatterTestRequest> _function = (FormatterTestRequest it) -> {
    final Procedure1<MapBasedPreferenceValues> _function_1 = (MapBasedPreferenceValues it_1) -> {
      it_1.<Boolean>put(XbaseFormatterPreferenceKeys.bracesInNewLine, Boolean.valueOf(true));
    };
    it.preferences(_function_1);
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("switch \'x\' { case \'x\': println(\'x\') case \'y\': println(\'y\') }");
    _builder.newLine();
    it.setToBeFormatted(_builder);
  };
  this._xbaseFormatterTester.assertFormattedExpression(_function);
}
 
Example 16
Project: xtext-extras   File: XbaseFormatterTest.java   View Source Code Vote up 5 votes
@Test
public void formatConstructorCallNoParenthesis() {
  final Procedure1<FormatterTestRequest> _function = (FormatterTestRequest it) -> {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("val v1 = new ArrayList");
    _builder.newLine();
    _builder.append("val v2 = new ArrayList");
    _builder.newLine();
    it.setToBeFormatted(_builder);
  };
  this._xbaseFormatterTester.assertFormattedExpression(_function);
}
 
Example 17
Project: xtext-extras   File: XbaseFormatterTest.java   View Source Code Vote up 5 votes
@Test
public void formatMemberFeatureCallBuilder1() {
  final Procedure1<FormatterTestRequest> _function = (FormatterTestRequest it) -> {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("newArrayList(\"x\").map()[]");
    _builder.newLine();
    it.setExpectation(_builder);
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("newArrayList(\"x\")  .  map  (  )  [  ]");
    _builder_1.newLine();
    it.setToBeFormatted(_builder_1);
  };
  this._xbaseFormatterTester.assertFormattedExpression(_function);
}
 
Example 18
Project: xtext-extras   File: CompilerTests2.java   View Source Code Vote up 5 votes
@Test
public void testBug367144_1() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("foo::bar::SubOfClassWithStatics::MY_STATIC_METHOD");
  _builder.newLine();
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("String _MY_STATIC_METHOD = foo.bar.SubOfClassWithStatics.MY_STATIC_METHOD();");
  _builder_1.newLine();
  _builder_1.append("return _MY_STATIC_METHOD;");
  _builder_1.newLine();
  this.compilesTo(_builder, _builder_1);
}
 
Example 19
Project: xtext-extras   File: ExpressionScopeTest.java   View Source Code Vote up 5 votes
@Test
public void testGetExpressionScope_01() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("{ var x = 1 }");
    XExpression _expression = this.expression(_builder, false);
    final XBlockExpression block = ((XBlockExpression) _expression);
    final IExpressionScope expressionScope = this._iBatchTypeResolver.resolveTypes(block).getExpressionScope(block, IExpressionScope.Anchor.AFTER);
    this.containsNot(expressionScope, "x");
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 20
Project: xtext-extras   File: ExpressionScopeTest.java   View Source Code Vote up 5 votes
@Test
public void testMemberOnIt_01() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("{ var it = \"\" }");
    XExpression _expression = this.expression(_builder, false);
    final XExpression varDecl = IterableExtensions.<XExpression>head(((XBlockExpression) _expression).getExpressions());
    final IExpressionScope expressionScope = this._iBatchTypeResolver.resolveTypes(varDecl).getExpressionScope(varDecl, IExpressionScope.Anchor.AFTER);
    this.contains(expressionScope, "charAt");
    this.contains(expressionScope, "it");
    this.contains(expressionScope, "operator_lessThan");
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 21
Project: xtext-extras   File: XbaseValidationTest.java   View Source Code Vote up 5 votes
@Test
public void testInvalidReturnThrowBug406762_1() {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("{");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("val b = true");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("return if (b) throw new RuntimeException() else throw new RuntimeException()");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  this.assertInvalidReturnExpression(_builder, XbasePackage.Literals.XIF_EXPRESSION);
}
 
Example 22
Project: xtext-core   File: AntlrGrammarComparatorTestHelper.java   View Source Code Vote up 5 votes
@Override
public void handleInvalidReferenceGrammarFile(final AntlrGrammarComparator.ErrorContext context) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Noticed an unmatched character sequence in \'expected\' in/before line ");
  int _lineNumber = context.getReferenceGrammar().getLineNumber();
  _builder.append(_lineNumber);
  _builder.append(".");
  _builder.newLineIfNotEmpty();
  AntlrGrammarComparatorTestHelper.fail(_builder.toString());
}
 
Example 23
Project: xtext-core   File: Xtext2EcoreTransformerTest.java   View Source Code Vote up 5 votes
@Test
public void testFeaturesAndInheritanceOfMandatoryAlternativeRuleCalls() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("grammar test with org.eclipse.xtext.common.Terminals generate test \'http://test\' RuleA: (RuleB|RuleC featureC1=ID) featureA=ID; RuleB: featureB=ID; RuleC: featureC2=ID;");
  final String grammar = _builder.toString();
  EPackage ePackage = this.getEPackageFromGrammar(grammar);
  Assert.assertEquals(3, ePackage.getEClassifiers().size());
  EClassifier _type = this.<EClassifier>type(ePackage, "RuleA");
  EClass ruleA = ((EClass) _type);
  Assert.assertNotNull(ruleA);
  EClassifier _type_1 = this.<EClassifier>type(ePackage, "RuleB");
  EClass ruleB = ((EClass) _type_1);
  Assert.assertNotNull(ruleB);
  EClassifier _type_2 = this.<EClassifier>type(ePackage, "RuleC");
  EClass ruleC = ((EClass) _type_2);
  Assert.assertNotNull(ruleC);
  Assert.assertTrue(ruleA.getESuperTypes().isEmpty());
  Assert.assertEquals(1, ruleB.getESuperTypes().size());
  Assert.assertEquals(ruleA, IterableExtensions.<EClass>head(ruleB.getESuperTypes()));
  Assert.assertEquals(1, ruleC.getESuperTypes().size());
  Assert.assertEquals(ruleA, IterableExtensions.<EClass>head(ruleC.getESuperTypes()));
  Assert.assertEquals(1, ruleA.getEAttributes().size());
  this.assertAttributeConfiguration(ruleA, 0, "featureA", "EString");
  Assert.assertEquals(1, ruleB.getEAttributes().size());
  this.assertAttributeConfiguration(ruleB, 0, "featureB", "EString");
  Assert.assertEquals(2, ruleC.getEAttributes().size());
  this.assertAttributeConfiguration(ruleC, 0, "featureC1", "EString");
  this.assertAttributeConfiguration(ruleC, 1, "featureC2", 
    "EString");
}
 
Example 24
Project: xtext-core   File: PartialSerializerTest.java   View Source Code Vote up 5 votes
@Test
public void testOptionalValueRemove() {
  final IChangeSerializer.IModification<OptionalValue> _function = (OptionalValue it) -> {
    it.setName(null);
  };
  ITextRegionAccess _recordDiff = this.<OptionalValue>recordDiff(OptionalValue.class, "#3 foo", _function);
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("0 0   H");
  _builder.newLine();
  _builder.append("      ");
  _builder.append("B OptionalValue        Model");
  _builder.newLine();
  _builder.append("0 2    S \"#3\"                 Model:\'#3\'");
  _builder.newLine();
  _builder.append("      ");
  _builder.append("E OptionalValue        Model");
  _builder.newLine();
  _builder.append("2 1 1 H \" \"                  Whitespace:TerminalRule\'WS\'");
  _builder.newLine();
  _builder.append("------------ diff 1 ------------");
  _builder.newLine();
  _builder.append("2 1  H \" \"                  Whitespace:TerminalRule\'WS\'");
  _builder.newLine();
  _builder.append("3 3  S \"foo\"                OptionalValue:name=ID");
  _builder.newLine();
  _builder.append("6 0  H");
  _builder.newLine();
  this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
}
 
Example 25
Project: xtext-core   File: Xtext2EcoreTransformerTest.java   View Source Code Vote up 5 votes
@Test
public void testOverrideEnumRule_01() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("grammar test with org.eclipse.xtext.enumrules.EnumRulesTestLanguage");
  _builder.newLine();
  _builder.append("import \'classpath:/org/eclipse/xtext/enumrules/enums.ecore\'");
  _builder.newLine();
  _builder.append("terminal fragment ExistingEnum: \'a\'..\'z\'+;");
  _builder.newLine();
  final String grammarAsString = _builder.toString();
  this.getResourceFromStringAndExpect(grammarAsString, 1);
}
 
Example 26
Project: xtext-extras   File: CompilerTests2.java   View Source Code Vote up 5 votes
@Test
public void testForLoop_13() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("for(double d: null as int[]) { d.toString }");
  _builder.newLine();
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("for (final double d : ((int[]) null)) {");
  _builder_1.newLine();
  _builder_1.append("  ");
  _builder_1.append("Double.valueOf(d).toString();");
  _builder_1.newLine();
  _builder_1.append("}");
  _builder_1.newLine();
  this.compilesTo(_builder, _builder_1);
}
 
Example 27
Project: bromium   File: BromiumParsingTest.java   View Source Code Vote up 4 votes
@Test
public void scopingOfExposedParameters() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("name \'Example name\'");
    _builder.newLine();
    _builder.append("version \'8.2.5\'");
    _builder.newLine();
    _builder.append("actions {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id typeIntoUsernameField");
    _builder.newLine();
    _builder.append("    ");
    _builder.append("syntax \'Type \' content \'into username field\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("type text content in element with css selector \'#login\' ");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do not expect http request");
    _builder.newLine();
    _builder.append("\t");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id clickOnLoginButton");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("syntax \'Click on login button\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("click on element with css selector content");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do not expect http request");
    _builder.newLine();
    _builder.append("\t");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    final Model result = this.parseHelper.parse(_builder);
    final List<Issue> issues = this.validator.validate(result.eResource(), CheckMode.ALL, CancelIndicator.NullImpl);
    Assert.assertFalse(issues.isEmpty());
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 28
Project: bromium   File: BromiumParsingTest.java   View Source Code Vote up 4 votes
@Test
public void loadModel() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("name \'Demo app\'");
    _builder.newLine();
    _builder.append("version \'0.1.0\'");
    _builder.newLine();
    _builder.append("actions {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id loadLoginPage");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("syntax \'Load login page\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("load page \'/login\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do expect http request");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id typeUsername");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("syntax \'Type username\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("type text \"admin\" in element with css selector \"#user\"");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do not expect http request");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id typePassword");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("syntax \'Type password\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("type text \"admin\" in element with css selector \"#pass\"");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do not expect http request");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("id clickLoginButton");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("syntax \'Click login button\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("click on element with css selector \"#login\"");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("do expect http request");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    final Model result = this.parseHelper.parse(_builder);
    Assert.assertNotNull(result);
    Assert.assertTrue(result.eResource().getErrors().isEmpty());
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 29
Project: org.xtext.dsl.restaurante   File: GeneradorWeb.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final Menu m) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("<div class=\"caja_menu\"><div class=\"caja\">\\");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("<img src=\"imagenes/");
  String _foto = m.getFoto();
  _builder.append(_foto, "\t");
  _builder.append("\" alt=\"");
  String _nombre = m.getNombre();
  _builder.append(_nombre, "\t");
  _builder.append(" (");
  String _name = m.getName();
  _builder.append(_name, "\t");
  _builder.append(")\" title=\"");
  String _nombre_1 = m.getNombre();
  _builder.append(_nombre_1, "\t");
  _builder.append(" (");
  String _name_1 = m.getName();
  _builder.append(_name_1, "\t");
  _builder.append(")\" />\\");
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("<h2>");
  String _nombre_2 = m.getNombre();
  _builder.append(_nombre_2, "\t");
  _builder.append("</h2>\\");
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("<div class=\"caja_descripcion\">");
  String _descripcion = m.getDescripcion();
  _builder.append(_descripcion, "\t");
  _builder.append("</div>\\");
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("<div class=\"caja_tamanio\">");
  String _tamanioMenu = this.tamanioMenu(m.getTamanio());
  _builder.append(_tamanioMenu, "\t");
  _builder.append("</div>\\");
  _builder.newLineIfNotEmpty();
  {
    ProductoY _productos = m.getProductos();
    boolean _tripleNotEquals = (_productos != null);
    if (_tripleNotEquals) {
      _builder.append("\t");
      _builder.append("<h3>Productos incluidos:</h3>\\");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("<div class=\"caja_productos_incluidos\">\\");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("\t");
      _builder.append("<ul>\\");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("\t");
      StringBuilder _productosDelMenuY = this.productosDelMenuY(m.getProductos());
      _builder.append(_productosDelMenuY, "\t\t");
      _builder.append("\\");
      _builder.newLineIfNotEmpty();
      _builder.append("\t");
      _builder.append("\t");
      _builder.append("</ul>\\");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("</div>\\");
      _builder.newLine();
    }
  }
  _builder.append("</div></div>\\");
  _builder.newLine();
  return _builder;
}
 
Example 30
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final Producto p) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Producto: ");
  String _nombre = p.getNombre();
  _builder.append(_nombre);
  _builder.append(" c�digo ");
  String _name = p.getName();
  _builder.append(_name);
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  {
    String _descripcion = p.getDescripcion();
    boolean _tripleNotEquals = (_descripcion != null);
    if (_tripleNotEquals) {
      String _descripcion_1 = p.getDescripcion();
      _builder.append(_descripcion_1, "\t");
    }
  }
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("Se ha proporcionado una foto para el ingrediente en la ruta imagenes/");
  String _foto = p.getFoto();
  _builder.append(_foto, "\t");
  _builder.newLineIfNotEmpty();
  {
    Nutricional _nutricional = p.getNutricional();
    boolean _tripleNotEquals_1 = (_nutricional != null);
    if (_tripleNotEquals_1) {
      _builder.append("\t");
      CharSequence _informacionNutricional = this.informacionNutricional(p.getNutricional());
      _builder.append(_informacionNutricional, "\t");
      _builder.newLineIfNotEmpty();
    }
  }
  _builder.append("\t");
  {
    boolean _equals = p.eClass().getName().equals("Principal");
    if (_equals) {
      CharSequence _compilarTexto = this.compilarTexto(((Principal) p));
      _builder.append(_compilarTexto, "\t");
      _builder.newLineIfNotEmpty();
      _builder.append("\t");
      _builder.append("\t");
    } else {
      boolean _equals_1 = p.eClass().getName().equals("Complemento");
      if (_equals_1) {
        CharSequence _compilarTexto_1 = this.compilarTexto(((Complemento) p));
        _builder.append(_compilarTexto_1, "\t");
        _builder.newLineIfNotEmpty();
        _builder.append("\t");
        _builder.append("\t");
      } else {
        boolean _equals_2 = p.eClass().getName().equals("BebidaFria");
        if (_equals_2) {
          CharSequence _compilarTexto_2 = this.compilarTexto(((BebidaFria) p));
          _builder.append(_compilarTexto_2, "\t");
          _builder.newLineIfNotEmpty();
          _builder.append("\t");
          _builder.append("\t");
        } else {
          boolean _equals_3 = p.eClass().getName().equals("BebidaCaliente");
          if (_equals_3) {
            CharSequence _compilarTexto_3 = this.compilarTexto(((BebidaCaliente) p));
            _builder.append(_compilarTexto_3, "\t");
            _builder.newLineIfNotEmpty();
            _builder.append("\t");
            _builder.append("\t");
          } else {
            boolean _equals_4 = p.eClass().getName().equals("Postre");
            if (_equals_4) {
              CharSequence _compilarTexto_4 = this.compilarTexto(((Postre) p));
              _builder.append(_compilarTexto_4, "\t");
              _builder.newLineIfNotEmpty();
            }
          }
        }
      }
    }
  }
  return _builder;
}
 
Example 31
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final Principal p) {
  StringConcatenation _builder = new StringConcatenation();
  {
    boolean _isEnsalada = p.isEnsalada();
    if (_isEnsalada) {
      _builder.append("Tipo de producto: Ensalada");
      _builder.newLineIfNotEmpty();
    } else {
      _builder.append("Tipo de producto: Plato principal");
      _builder.newLineIfNotEmpty();
    }
  }
  {
    SalsaRecomendada _salsa = p.getSalsa();
    boolean _equals = Objects.equal(_salsa, SalsaRecomendada.NINGUNA);
    if (_equals) {
    } else {
      SalsaRecomendada _salsa_1 = p.getSalsa();
      boolean _equals_1 = Objects.equal(_salsa_1, SalsaRecomendada.CESAR);
      if (_equals_1) {
        _builder.append("Para este plato se recomienda salsa C�sar");
        _builder.newLine();
      } else {
        SalsaRecomendada _salsa_2 = p.getSalsa();
        boolean _equals_2 = Objects.equal(_salsa_2, SalsaRecomendada.ACEITE_YVINAGRE);
        if (_equals_2) {
          _builder.append("Para este plato se recomienda salsa de aceite y vinagre");
          _builder.newLine();
        } else {
          SalsaRecomendada _salsa_3 = p.getSalsa();
          boolean _equals_3 = Objects.equal(_salsa_3, SalsaRecomendada.MODENA);
          if (_equals_3) {
            _builder.append("Para este plato se recomienda salsa de M�dena");
            _builder.newLine();
          } else {
            SalsaRecomendada _salsa_4 = p.getSalsa();
            boolean _equals_4 = Objects.equal(_salsa_4, SalsaRecomendada.MOSTAZA);
            if (_equals_4) {
              _builder.append("Para este plato se recomienda salsa de mostaza");
              _builder.newLine();
            }
          }
        }
      }
    }
  }
  _builder.append("Listado de ingredientes: ");
  String _ingredientes = this.ingredientes(p.getIngredientes());
  _builder.append(_ingredientes);
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 32
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final Complemento p) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Tipo de producto: Complemento");
  _builder.newLine();
  return _builder;
}
 
Example 33
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final BebidaCaliente p) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Tipo de producto: Bebida caliente");
  _builder.newLine();
  return _builder;
}
 
Example 34
Project: org.xtext.dsl.restaurante   File: GeneradorTexto.java   View Source Code Vote up 4 votes
public CharSequence compilarTexto(final Menu m) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("Menu: ");
  String _nombre = m.getNombre();
  _builder.append(_nombre);
  _builder.append(" c�digo ");
  String _name = m.getName();
  _builder.append(_name);
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("Descripci�n ");
  String _descripcion = m.getDescripcion();
  _builder.append(_descripcion, "\t");
  _builder.newLineIfNotEmpty();
  {
    TamanioMenu _tamanio = m.getTamanio();
    boolean _equals = Objects.equal(_tamanio, TamanioMenu.NORMAL);
    if (_equals) {
      _builder.append("\t");
      _builder.append("Disponible en tama�o normal");
      _builder.newLine();
    } else {
      TamanioMenu _tamanio_1 = m.getTamanio();
      boolean _equals_1 = Objects.equal(_tamanio_1, TamanioMenu.GRANDE);
      if (_equals_1) {
        _builder.append("\t");
        _builder.append("Disponible en tama�o grande");
        _builder.newLine();
      } else {
        TamanioMenu _tamanio_2 = m.getTamanio();
        boolean _equals_2 = Objects.equal(_tamanio_2, TamanioMenu.NORMAL_YGRANDE);
        if (_equals_2) {
          _builder.append("\t");
          _builder.append("Disponible en tama�o normal y grande");
          _builder.newLine();
        }
      }
    }
  }
  _builder.append("\t");
  _builder.append("Foto ");
  String _foto = m.getFoto();
  _builder.append(_foto, "\t");
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  StringBuilder _productosDelMenuY = this.productosDelMenuY(m.getProductos());
  _builder.append(_productosDelMenuY, "\t");
  _builder.newLineIfNotEmpty();
  return _builder;
}
 
Example 35
Project: SurveyDSL   File: JQueryGenerator.java   View Source Code Vote up 4 votes
public CharSequence processPage(final Page p) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("{");
  _builder.newLine();
  _builder.append("\t");
  {
    String _title = p.getTitle();
    boolean _notEquals = (!Objects.equal(_title, null));
    if (_notEquals) {
      _builder.append("title: \"");
      String _title_1 = p.getTitle();
      _builder.append(_title_1, "\t");
      _builder.append("\",");
    }
  }
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  {
    String _visibleIf = p.getVisibleIf();
    boolean _notEquals_1 = (!Objects.equal(_visibleIf, null));
    if (_notEquals_1) {
      _builder.append("visibleIf: \",");
      String _visibleIf_1 = p.getVisibleIf();
      _builder.append(_visibleIf_1, "\t");
      _builder.append("\"");
    }
  }
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t");
  this.initializeQuestions(p);
  _builder.newLineIfNotEmpty();
  _builder.append("\t");
  _builder.append("questions: [");
  _builder.newLine();
  {
    boolean _hasElements = false;
    for(final Question q : this.questions) {
      if (!_hasElements) {
        _hasElements = true;
      } else {
        _builder.appendImmediate(",", "\t");
      }
      _builder.append("\t");
      CharSequence _processQuestion = this.processQuestion(q);
      _builder.append(_processQuestion, "\t");
      _builder.newLineIfNotEmpty();
    }
  }
  _builder.append("\t\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("]");
  _builder.newLine();
  _builder.append("}");
  _builder.newLine();
  return _builder;
}
 
Example 36
Project: SurveyDSL   File: HTMLGenerator.java   View Source Code Vote up 4 votes
public CharSequence generate(final Survey s, final String fileName) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("<html>");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("<head>");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<script src=\"resources/jquery-3.2.1.js\"></script>");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"resources/survey.css\">");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"resources/bootstrap.css\">");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<script src=\"resources/bootstrap.js\"></script>");
  _builder.newLine();
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<script src=\"resources/survey.jquery.js\"></script>");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<script src=\"");
  _builder.append(fileName, "\t\t");
  _builder.append(".js\"></script>");
  _builder.newLineIfNotEmpty();
  _builder.append("\t\t");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("<head>");
  _builder.newLine();
  _builder.newLine();
  _builder.append("\t");
  _builder.append("<body>\t");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("<div class=\"container\">");
  _builder.newLine();
  _builder.append("\t");
  _builder.newLine();
  _builder.append("\t\t\t");
  _builder.append("<div id=\"surveyElement\"></div>");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("</div>");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("</body>");
  _builder.newLine();
  _builder.append("</html>");
  _builder.newLine();
  return _builder;
}
 
Example 37
Project: xtext-extras   File: CompilerTests2.java   View Source Code Vote up 4 votes
@Test
public void testEmptySwitch_9() {
  try {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("{");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("switch Object x : Thread.State.NEW {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("default: {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("Object _switchResult = null;");
    _builder_1.newLine();
    _builder_1.append("final Object x = Thread.State.NEW;");
    _builder_1.newLine();
    _builder_1.append("boolean _matched = false;");
    _builder_1.newLine();
    _builder_1.append("if (!_matched) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("_switchResult = null;");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("return _switchResult;");
    _builder_1.newLine();
    this.compilesTo(_builder, _builder_1);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
Example 38
Project: xtext-core   File: GrammarFlatteningTest.java   View Source Code Vote up 4 votes
@Test
public void test_05() throws Exception {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("grammar com.foo.bar with org.eclipse.xtext.common.Terminals");
  _builder.newLine();
  _builder.append("generate myPack \'http://myURI\'");
  _builder.newLine();
  _builder.append("Rule<A>: name=ID (<A>child=Rule<A>|<!A>child=Rule<true>+)?;");
  _builder.newLine();
  Grammar flattened = this.getModel(_builder.toString());
  String serialized = this.getSerializer().serialize(flattened);
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("grammar com.foo.bar hidden(RULE_WS, RULE_ML_COMMENT, RULE_SL_COMMENT)");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("ruleRule:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("name=RULE_ID child=norm1_Rule*;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("norm1_Rule:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("name=RULE_ID child=norm1_Rule?;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_ID:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\"^\"? (\"a\"..\"z\" | \"A\"..\"Z\" | \"_\") (\"a\"..\"z\" | \"A\"..\"Z\" | \"_\" | \"0\"..\"9\")*;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_INT:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\"0\"..\"9\"+;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_STRING:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\"\\\"\" (\"\\\\\" . | !(\"\\\\\" | \"\\\"\"))* \"\\\"\" | \"\\\'\" (\"\\\\\" . | !(\"\\\\\" | \"\\\'\"))* \"\\\'\";");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_ML_COMMENT:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\"/*\"->\"*/\";");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_SL_COMMENT:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\"//\" !(\"\\n\" | \"\\r\")* (\"\\r\"? \"\\n\")?;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_WS:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append("\" \" | \"\\t\" | \"\\r\" | \"\\n\"+;");
  _builder_1.newLine();
  _builder_1.newLine();
  _builder_1.append("terminal RULE_ANY_OTHER:");
  _builder_1.newLine();
  _builder_1.append("\t");
  _builder_1.append(".;");
  Assert.assertEquals(_builder_1.toString(), serialized);
}
 
Example 39
Project: xtext-core   File: PsiAntlrGrammarGenerator.java   View Source Code Vote up 4 votes
@Override
protected String _assignmentEbnf(final CrossReference it, final Assignment assignment, final AntlrOptions options, final boolean supportActions) {
  String _xifexpression = null;
  if (supportActions) {
    StringConcatenation _builder = new StringConcatenation();
    {
      boolean _isBacktrack = options.isBacktrack();
      if (_isBacktrack) {
        _builder.append("{");
        _builder.newLine();
        _builder.append("\t");
        _builder.append("/* */");
        _builder.newLine();
        _builder.append("}");
        _builder.newLine();
      }
    }
    _builder.append("{");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("if (!$current) {");
    _builder.newLine();
    _builder.append("\t\t");
    CharSequence _associateWithSemanticElement = this.associateWithSemanticElement();
    _builder.append(_associateWithSemanticElement, "\t\t");
    _builder.newLineIfNotEmpty();
    _builder.append("\t\t");
    _builder.append("$current = true;");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    String __assignmentEbnf = super._assignmentEbnf(it, assignment, options, supportActions);
    _builder.append(__assignmentEbnf);
    _xifexpression = _builder.toString();
  } else {
    _xifexpression = super._assignmentEbnf(it, assignment, options, supportActions);
  }
  return _xifexpression;
}
 
Example 40
Project: xtext-core   File: IndentationAwareCompletionPrefixProviderTest.java   View Source Code Vote up 4 votes
@Test
@Override
public void testLastCompleteNode_7_0() {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("a");
  _builder.newLine();
  _builder.append("b");
  _builder.newLine();
  _builder.append("c");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("d");
  _builder.newLine();
  _builder.append("\t\t");
  _builder.append("e");
  _builder.newLine();
  _builder.append("\t");
  _builder.append("g");
  _builder.newLine();
  _builder.append("<|>");
  _builder.newLine();
  StringConcatenation _builder_1 = new StringConcatenation();
  _builder_1.append("[ID:a]");
  _builder_1.newLine();
  _builder_1.append("[ID:b]");
  _builder_1.newLine();
  _builder_1.append("[ID:c]");
  _builder_1.newLine();
  _builder_1.append("[INDENT:]");
  _builder_1.newLine();
  _builder_1.append("[ID:d]");
  _builder_1.newLine();
  _builder_1.append("[INDENT:]");
  _builder_1.newLine();
  _builder_1.append("[ID:e]");
  _builder_1.newLine();
  _builder_1.append("[DEDENT:]");
  _builder_1.newLine();
  _builder_1.append("[ID:g]");
  _builder_1.newLine();
  _builder_1.append("[DEDENT:]");
  _builder_1.newLine();
  this.assertLastCompleteNode(_builder, _builder_1.toString());
}