public class DocumentSourceAppender extends java.lang.Object implements ISourceAppender
Modifier and Type | Class and Description |
---|---|
static class |
DocumentSourceAppender.Factory<T extends DocumentSourceAppender> |
Constructor and Description |
---|
DocumentSourceAppender(IXtextDocument document,
RewritableImportSection importSection,
WhitespaceHelper whitespaceHelper,
java.lang.String indentString,
java.lang.String lineSeparator,
int baseIndentationLevel,
boolean isJava) |
public DocumentSourceAppender(IXtextDocument document, RewritableImportSection importSection, WhitespaceHelper whitespaceHelper, java.lang.String indentString, java.lang.String lineSeparator, int baseIndentationLevel, boolean isJava)
protected LightweightTypeReferenceSerializer createLightweightTypeReferenceSerializer()
public int getBaseIndentLevel()
protected int getCurrentIndentLevel()
protected java.lang.CharSequence getIndentationString()
protected java.lang.String getLineSeparator()
public boolean isJava()
isJava
in interface ISourceAppender
public IXtextDocument getDocument()
public RewritableImportSection getImportSection()
public ISourceAppender append(JvmType type)
append
in interface ISourceAppender
public void appendType(JvmType type, java.lang.StringBuilder builder)
protected JvmDeclaredType getImportedType(JvmType type)
protected char getInnerTypeSeparator()
public ISourceAppender append(LightweightTypeReference typeRef)
append
in interface ISourceAppender
public void append(java.lang.CharSequence content, int indentationDelta)
protected java.lang.String indentString(int indentLevel)
public ISourceAppender append(java.lang.CharSequence string)
append
in interface ISourceAppender
public ISourceAppender newLine()
newLine
in interface ISourceAppender
public ISourceAppender increaseIndentation()
increaseIndentation
in interface ISourceAppender
public ISourceAppender decreaseIndentation()
decreaseIndentation
in interface ISourceAppender
public int length()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCode()
public ReplaceRegion getChange()
public ReplaceRegion getChange(int offset, int length)
public int getTotalOffset()
public int getTotalLength()