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 org.aspectj.org.eclipse.jdt.internal.formatter.TokenTraverser
counter, value
-
Constructor Summary
ConstructorDescriptionCommentWrapExecutor(TokenManager tokenManager, DefaultCodeFormatterOptions options)
-
Method Summary
Modifier and TypeMethodDescriptionint
protected boolean
void
wrapLineComment(Token commentToken, int startPosition)
int
wrapMultiLineComment(Token commentToken, int startPosition, boolean simulate, boolean noWrap)
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.formatter.TokenTraverser
getCurrent, getLineBreaksAfter, getLineBreaksBefore, getNext, getPrevious, isSpaceAfter, isSpaceBefore, structureChanged, traverse
-
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:
token
in classTokenTraverser
-
wrapLineComment
-