org.aspectj.org.eclipse.jdt.internal.formatter.comment
Class MultiCommentLine

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentLine
      extended by org.aspectj.org.eclipse.jdt.internal.formatter.comment.MultiCommentLine
All Implemented Interfaces:
IBorderAttributes, ICommentAttributes, IHtmlTagDelimiters, IJavaDocTagConstants
Direct Known Subclasses:
JavaDocLine

public class MultiCommentLine
extends CommentLine
implements ICommentAttributes, IHtmlTagDelimiters, IJavaDocTagConstants

Multi-line comment line in a comment region.

Since:
3.0

Field Summary
static java.lang.String MULTI_COMMENT_CONTENT_PREFIX
          Line prefix of multi-line comment content lines
static java.lang.String MULTI_COMMENT_END_PREFIX
          Line prefix of multi-line comment end lines
static java.lang.String MULTI_COMMENT_START_PREFIX
          Line prefix of multi-line comment content lines
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentLine
NON_FORMAT_START_PREFIX
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.ICommentAttributes
COMMENT_BLANKLINE, COMMENT_BREAK, COMMENT_CLOSE, COMMENT_CODE, COMMENT_FIRST_TOKEN, COMMENT_HTML, COMMENT_IMMUTABLE, COMMENT_NEWLINE, COMMENT_OPEN, COMMENT_PARAGRAPH, COMMENT_PARAMETER, COMMENT_ROOT, COMMENT_SEPARATOR, COMMENT_STARTS_WITH_RANGE_DELIMITER
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.IHtmlTagDelimiters
HTML_CLOSE_PREFIX, HTML_TAG_POSTFIX, HTML_TAG_PREFIX
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.IJavaDocTagConstants
COMMENT_ROOT_TAGS, COMMENT_TAG_PREFIX, JAVADOC_BREAK_TAGS, JAVADOC_CODE_TAGS, JAVADOC_IMMUTABLE_TAGS, JAVADOC_NEWLINE_TAGS, JAVADOC_PARAM_TAGS, JAVADOC_SEPARATOR_TAGS, JAVADOC_SINGLE_BREAK_TAG, JAVADOC_TAG_PREFIX, LINK_TAG_POSTFIX, LINK_TAG_PREFIX, LINK_TAG_PREFIX_STRING
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.IBorderAttributes
BORDER_LOWER, BORDER_UPPER
 
Constructor Summary
protected MultiCommentLine(CommentRegion region)
          Creates a new multi-line comment line.
 
Method Summary
protected  void adapt(CommentLine previous)
          Adapts the line attributes from the previous line in the comment region.
protected  void append(CommentRange range)
          Appends the specified comment range to this comment line.
protected  java.lang.String getContentPrefix()
          Returns the line prefix of content lines.
protected  java.lang.String getEndingPrefix()
          Returns the line prefix of end lines.
protected  java.lang.String getIndentationReference()
          Returns the reference indentation to use for this line.
protected  java.lang.String getStartingPrefix()
          Returns the line prefix of start lines.
protected  void scanLine(int line)
          Scans this comment line for comment range boundaries.
protected  void tokenizeLine(int line)
          Tokenizes this comment line into comment ranges
protected  IRegion trimLine(java.lang.String line, java.lang.String trimmable)
          Removes all leading and trailing occurrences from line.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentLine
formatLine, formatLowerBorder, formatUpperBorder, getFirst, getLast, getParent, getSize, hasAttribute, setAttribute, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MULTI_COMMENT_CONTENT_PREFIX

public static final java.lang.String MULTI_COMMENT_CONTENT_PREFIX
Line prefix of multi-line comment content lines

See Also:
Constant Field Values

MULTI_COMMENT_END_PREFIX

public static final java.lang.String MULTI_COMMENT_END_PREFIX
Line prefix of multi-line comment end lines

See Also:
Constant Field Values

MULTI_COMMENT_START_PREFIX

public static final java.lang.String MULTI_COMMENT_START_PREFIX
Line prefix of multi-line comment content lines

See Also:
Constant Field Values
Constructor Detail

MultiCommentLine

protected MultiCommentLine(CommentRegion region)
Creates a new multi-line comment line.

Parameters:
region - comment region to create the line for
Method Detail

adapt

protected void adapt(CommentLine previous)
Description copied from class: CommentLine
Adapts the line attributes from the previous line in the comment region.

Specified by:
adapt in class CommentLine
Parameters:
previous - the previous comment line in the comment region

append

protected void append(CommentRange range)
Description copied from class: CommentLine
Appends the specified comment range to this comment line.

Overrides:
append in class CommentLine
Parameters:
range - comment range to append to this line

getContentPrefix

protected java.lang.String getContentPrefix()
Description copied from class: CommentLine
Returns the line prefix of content lines.

Specified by:
getContentPrefix in class CommentLine
Returns:
line prefix of content lines

getEndingPrefix

protected java.lang.String getEndingPrefix()
Description copied from class: CommentLine
Returns the line prefix of end lines.

Specified by:
getEndingPrefix in class CommentLine
Returns:
line prefix of end lines

getIndentationReference

protected final java.lang.String getIndentationReference()
Returns the reference indentation to use for this line.

Overrides:
getIndentationReference in class CommentLine
Returns:
the reference indentation for this line

getStartingPrefix

protected java.lang.String getStartingPrefix()
Description copied from class: CommentLine
Returns the line prefix of start lines.

Specified by:
getStartingPrefix in class CommentLine
Returns:
line prefix of start lines

scanLine

protected void scanLine(int line)
Description copied from class: CommentLine
Scans this comment line for comment range boundaries.

Specified by:
scanLine in class CommentLine
Parameters:
line - the index of this line in the comment region

tokenizeLine

protected void tokenizeLine(int line)
Description copied from class: CommentLine
Tokenizes this comment line into comment ranges

Overrides:
tokenizeLine in class CommentLine
Parameters:
line - the index of this line in the comment region

trimLine

protected final IRegion trimLine(java.lang.String line,
                                 java.lang.String trimmable)
Removes all leading and trailing occurrences from line.

Parameters:
line - the string to remove the occurrences of trimmable
trimmable - the string to remove from line
Returns:
the region of the trimmed substring within line