org.eclipse.jdt.internal.formatter.comment
Class CommentRange

java.lang.Object
  extended by org.eclipse.jface.text.Position
      extended by org.eclipse.jdt.internal.formatter.comment.CommentRange
All Implemented Interfaces:
ICommentAttributes, IHtmlTagDelimiters

public class CommentRange
extends org.eclipse.jface.text.Position
implements ICommentAttributes, IHtmlTagDelimiters

Range in a comment region in comment region coordinates.

Since:
3.0

Field Summary
 
Fields inherited from class org.eclipse.jface.text.Position
isDeleted, length, offset
 
Fields inherited from interface 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.eclipse.jdt.internal.formatter.comment.IHtmlTagDelimiters
HTML_CLOSE_PREFIX, HTML_TAG_POSTFIX, HTML_TAG_PREFIX
 
Constructor Summary
CommentRange(int position, int count)
          Creates a new comment range.
 
Method Summary
 void move(int delta)
          Moves this comment range.
 java.lang.String toString()
           
 void trimBegin(int delta)
          Trims this comment range at the beginning.
 void trimEnd(int delta)
          Trims this comment range at the end.
 
Methods inherited from class org.eclipse.jface.text.Position
delete, equals, getLength, getOffset, hashCode, includes, isDeleted, overlapsWith, setLength, setOffset, undelete
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommentRange

public CommentRange(int position,
                    int count)
Creates a new comment range.

Parameters:
position - offset of the range
count - length of the range
Method Detail

move

public final void move(int delta)
Moves this comment range.

Parameters:
delta - the delta to move the range

trimBegin

public final void trimBegin(int delta)
Trims this comment range at the beginning.

Parameters:
delta - amount to trim the range

trimEnd

public final void trimEnd(int delta)
Trims this comment range at the end.

Parameters:
delta - amount to trim the range

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object