use of org.eclipse.xtext.generator.trace.node.NewLineNode in project xtext-core by eclipse.
the class GeneratorNodeExtensions method appendNewLine.
/**
* Appends a line separator node to the given parent.
*
* @return the given parent node
*/
public CompositeGeneratorNode appendNewLine(final CompositeGeneratorNode parent) {
List<IGeneratorNode> _children = parent.getChildren();
String _lineDelimiter = this.wsConfig.getLineDelimiter();
NewLineNode _newLineNode = new NewLineNode(_lineDelimiter, false);
_children.add(_newLineNode);
return parent;
}
use of org.eclipse.xtext.generator.trace.node.NewLineNode in project xtext-core by eclipse.
the class GeneratorNodeExtensions method appendNewLineIfNotEmpty.
/**
* Appends a line separator node that will only be effective if the current line contains non-whitespace text.
*
* @return the given parent node
*/
public CompositeGeneratorNode appendNewLineIfNotEmpty(final CompositeGeneratorNode parent) {
List<IGeneratorNode> _children = parent.getChildren();
String _lineDelimiter = this.wsConfig.getLineDelimiter();
NewLineNode _newLineNode = new NewLineNode(_lineDelimiter, true);
_children.add(_newLineNode);
return parent;
}
use of org.eclipse.xtext.generator.trace.node.NewLineNode in project xtext-core by eclipse.
the class GeneratorNodeExtensions method appendNewLine.
/**
* Appends a line separator node to the given parent.
*
* @return the given parent node
*/
public CompositeGeneratorNode appendNewLine(final CompositeGeneratorNode parent, final String lineSeparator) {
List<IGeneratorNode> _children = parent.getChildren();
NewLineNode _newLineNode = new NewLineNode(lineSeparator, false);
_children.add(_newLineNode);
return parent;
}
Aggregations