Class GeneratorNodeExtensions
- java.lang.Object
-
- org.eclipse.xtext.generator.trace.node.GeneratorNodeExtensions
-
- Direct Known Subclasses:
TracingSugar
public class GeneratorNodeExtensions extends java.lang.ObjectA builder API to create generator node trees
-
-
Constructor Summary
Constructors Constructor Description GeneratorNodeExtensions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeGeneratorNodeappend(CompositeGeneratorNode parent, java.lang.Object object)Creates a text node containing the toString() representation of the given object and appends it to the given parent node.CompositeGeneratorNodeappendNewLine(CompositeGeneratorNode parent)Appends a line separator node to the given parent.CompositeGeneratorNodeappendNewLine(CompositeGeneratorNode parent, java.lang.String lineSeparator)Appends a line separator node to the given parent.CompositeGeneratorNodeappendNewLineIfNotEmpty(CompositeGeneratorNode parent)Appends a line separator node that will only be effective if the current line contains non-whitespace text.CompositeGeneratorNodeappendTemplate(CompositeGeneratorNode parent, org.eclipse.xtend2.lib.StringConcatenationClient templateString)Creates a template node for the given templateString and appends it to the given parent node.CompositeGeneratorNodeindent(CompositeGeneratorNode parent)CompositeGeneratorNodeindent(CompositeGeneratorNode parent, java.lang.String indentString)Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for subsequent lines.CompositeGeneratorNodetrace(ILocationData data)CompositeGeneratorNodetrace(ILocationData data, boolean useForDebugging)CompositeGeneratorNodetrace(CompositeGeneratorNode parent, ILocationData data)CompositeGeneratorNodetrace(CompositeGeneratorNode parent, ILocationData data, boolean useForDebugging)
-
-
-
Method Detail
-
trace
public CompositeGeneratorNode trace(ILocationData data)
- Returns:
- a root trace node for the given location
-
trace
public CompositeGeneratorNode trace(ILocationData data, boolean useForDebugging)
- Returns:
- a root trace node for the given location
-
trace
public CompositeGeneratorNode trace(CompositeGeneratorNode parent, ILocationData data)
- Returns:
- a trace node for the given location, appended as a child on the given parent
-
trace
public CompositeGeneratorNode trace(CompositeGeneratorNode parent, ILocationData data, boolean useForDebugging)
- Returns:
- a trace node for the given location, appended as a child on the given parent
-
indent
public CompositeGeneratorNode indent(CompositeGeneratorNode parent)
- Returns:
- an indentation node, using the default indentation string, appended as a child on the given parent
-
indent
public CompositeGeneratorNode indent(CompositeGeneratorNode parent, java.lang.String indentString)
Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for subsequent lines.- Returns:
- an indentation node, using the given indentString, appended as a child on the given parent
-
appendNewLine
public CompositeGeneratorNode appendNewLine(CompositeGeneratorNode parent)
Appends a line separator node to the given parent.- Returns:
- the given parent node
-
appendNewLine
public CompositeGeneratorNode appendNewLine(CompositeGeneratorNode parent, java.lang.String lineSeparator)
Appends a line separator node to the given parent.- Returns:
- the given parent node
-
appendNewLineIfNotEmpty
public CompositeGeneratorNode appendNewLineIfNotEmpty(CompositeGeneratorNode parent)
Appends a line separator node that will only be effective if the current line contains non-whitespace text.- Returns:
- the given parent node
-
append
public CompositeGeneratorNode append(CompositeGeneratorNode parent, java.lang.Object object)
Creates a text node containing the toString() representation of the given object and appends it to the given parent node.- Returns:
- the given parent node
-
appendTemplate
public CompositeGeneratorNode appendTemplate(CompositeGeneratorNode parent, org.eclipse.xtend2.lib.StringConcatenationClient templateString)
Creates a template node for the given templateString and appends it to the given parent node. Templates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.- Returns:
- the given parent node
-
-