public class CommentWrapExecutor extends TokenTraverser
counter, value| Constructor and Description |
|---|
CommentWrapExecutor(TokenManager tokenManager,
DefaultCodeFormatterOptions options) |
| Modifier and Type | Method and Description |
|---|---|
int |
getLinesCount() |
protected boolean |
token(Token token,
int index) |
void |
wrapLineComment(Token commentToken,
int startPosition) |
int |
wrapMultiLineComment(Token commentToken,
int startPosition,
boolean simulate,
boolean noWrap) |
getCurrent, getLineBreaksAfter, getLineBreaksBefore, getNext, getPrevious, isSpaceAfter, isSpaceBefore, structureChanged, traversepublic CommentWrapExecutor(TokenManager tokenManager, DefaultCodeFormatterOptions options)
public int wrapMultiLineComment(Token commentToken, int startPosition, boolean simulate, boolean noWrap)
commentToken - token to wrapstartPosition - position in line of the beginning of the commentsimulate - if true, the properties of internal tokens will not really change. This
mode is useful for checking how much space the comment takes.noWrap - if true, it means that wrapping is disabled for this comment (for example because there's
a NON-NLS tag after it). This method is still useful for checking comment length in that case.public int getLinesCount()
protected boolean token(Token token, int index)
token in class TokenTraverserpublic void wrapLineComment(Token commentToken, int startPosition)