Class CommentWrapExecutor
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.formatter.TokenTraverser
org.aspectj.org.eclipse.jdt.internal.formatter.linewrap.CommentWrapExecutor
-
Field Summary
Fields inherited from class TokenTraverser
counter, value -
Constructor Summary
ConstructorsConstructorDescriptionCommentWrapExecutor(TokenManager tokenManager, DefaultCodeFormatterOptions options) -
Method Summary
Modifier and TypeMethodDescriptionintprotected booleanvoidwrapLineComment(Token commentToken, int startPosition) intwrapMultiLineComment(Token commentToken, int startPosition, boolean simulate, boolean noWrap) Methods 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
-
CommentWrapExecutor
-
-
Method Details
-
wrapMultiLineComment
public int wrapMultiLineComment(Token commentToken, int startPosition, boolean simulate, boolean noWrap) - Parameters:
commentToken- token to wrapstartPosition- position in line of the beginning of the commentsimulate- iftrue, the properties of internal tokens will not really change. This mode is useful for checking how much space the comment takes.noWrap- iftrue, 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.- Returns:
- position in line at the end of comment
-
getLinesCount
public int getLinesCount() -
token
- Specified by:
tokenin classTokenTraverser
-
wrapLineComment
-