|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPosition
org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentRange
public class CommentRange
Range in a comment region in comment region coordinates.
| Field Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
CommentRange(int position,
int count)
Creates a new comment range. |
|
| Method Summary | |
|---|---|
protected boolean |
hasAttribute(int attribute)
Is the attribute attribute true? |
protected boolean |
isClosingTag(char[] token,
char[] tag)
Does this comment range contain a closing HTML tag? |
protected boolean |
isOpeningTag(char[] token,
char[] tag)
Does this comment range contain an opening HTML tag? |
protected void |
markHtmlTag(char[][] tags,
char[] token,
int attribute,
boolean open,
boolean close)
Mark the comment range with the occurred HTML tags. |
protected void |
markPrefixTag(char[][] tags,
char prefix,
char[] token,
int attribute)
Mark the comment range with the occurred tags. |
protected int |
markTagRange(char[] token,
char[] tag,
int level,
int key,
boolean html)
Marks the comment range with the HTML range tag. |
void |
move(int delta)
Moves this comment range. |
protected void |
setAttribute(int attribute)
Set the attribute attribute to true. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CommentRange(int position,
int count)
position - offset of the rangecount - length of the range| Method Detail |
|---|
protected final boolean hasAttribute(int attribute)
attribute true?
attribute - the attribute to get
true iff this attribute is true,
false otherwise
protected final boolean isClosingTag(char[] token,
char[] tag)
token - token belonging to the comment rangetag - the HTML tag to check
true iff this comment range contains a closing
html tag, false otherwise
protected final boolean isOpeningTag(char[] token,
char[] tag)
token - token belonging to the comment rangetag - the HTML tag to check
true iff this comment range contains an
opening html tag, false otherwise
protected final void markHtmlTag(char[][] tags,
char[] token,
int attribute,
boolean open,
boolean close)
tags - the HTML tags to test for their occurrencetoken - token belonging to the comment rangeattribute - attribute to set if a HTML tag is presentopen - true iff opening tags should be marked,
false otherwiseclose - true iff closing tags should be marked,
false otherwise
protected final void markPrefixTag(char[][] tags,
char prefix,
char[] token,
int attribute)
tags - the tags to test for their occurrenceprefix - the prefix which is common to all the tags to testtoken - the token belonging to the comment rangeattribute - attribute to set if a tag is present
protected final int markTagRange(char[] token,
char[] tag,
int level,
int key,
boolean html)
token - the token belonging to the comment rangetag - the HTML tag which confines the HTML rangelevel - the nesting level of the current HTML rangekey - the key of the attribute to set if the comment range is in
the HTML rangehtml - true iff the HTML tags in this HTML range
should be marked too, false otherwise
public final void move(int delta)
delta - the delta to move the rangeprotected final void setAttribute(int attribute)
attribute to true.
attribute - the attribute to set.public final void trimBegin(int delta)
delta - amount to trim the rangepublic final void trimEnd(int delta)
delta - amount to trim the rangepublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||