Class TextEditsBuilder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.formatter.TokenTraverser
org.aspectj.org.eclipse.jdt.internal.formatter.TextEditsBuilder
Creates the formatter's result TextEdit by scanning through the tokens and comparing them with the original source.
-
Field Summary
Fields inherited from class TokenTraverser
counter, value -
Constructor Summary
ConstructorsConstructorDescriptionTextEditsBuilder(String source, List<org.eclipse.jface.text.IRegion> regions, TokenManager tokenManager, DefaultCodeFormatterOptions options) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendIndentationString(StringBuilder target, int tabChar, int tabSize, int indent, int additionalSpaces) List<org.eclipse.text.edits.TextEdit> getEdits()voidprocessComment(Token commentToken) voidsetAlignChar(int alignChar) protected booleanMethods inherited from class TokenTraverser
getCurrent, getLineBreaksAfter, getLineBreaksBefore, getNext, getPrevious, isSpaceAfter, isSpaceBefore, structureChanged, traverseModifier and TypeMethodDescriptionprotected Tokenprotected intprotected intprotected TokengetNext()protected Tokenprotected booleanprotected booleanprotected voidMust be called every time tokens are added or removed from the list that is currently being traversed so that cached data can be refreshed.int
-
Constructor Details
-
TextEditsBuilder
public TextEditsBuilder(String source, List<org.eclipse.jface.text.IRegion> regions, TokenManager tokenManager, DefaultCodeFormatterOptions options)
-
-
Method Details
-
token
- Specified by:
tokenin classTokenTraverser
-
appendIndentationString
public static void appendIndentationString(StringBuilder target, int tabChar, int tabSize, int indent, int additionalSpaces) -
processComment
-
getEdits
-
setAlignChar
public void setAlignChar(int alignChar)
-