|
|||||||||
| 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.CommentRegion
org.aspectj.org.eclipse.jdt.internal.formatter.comment.MultiCommentRegion
public class MultiCommentRegion
Multi-comment region in a source code document.
| Field Summary |
|---|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentRegion |
|---|
COMMENT_RANGE_DELIMITER, fClear, preferences, scribe |
| 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.IHtmlTagDelimiters |
|---|
HTML_CLOSE_PREFIX, HTML_TAG_POSTFIX, HTML_TAG_PREFIX |
| Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.IBorderAttributes |
|---|
BORDER_LOWER, BORDER_UPPER |
| 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 |
| Constructor Summary | |
|---|---|
MultiCommentRegion(IDocument document,
Position position,
CodeFormatterVisitor formatter)
Creates a new multi-comment region. |
|
| Method Summary | |
|---|---|
protected boolean |
canAppend(CommentLine line,
CommentRange previous,
CommentRange next,
int index,
int count)
Can the comment range be appended to the comment line? |
protected CommentLine |
createLine()
Creates a new line for this region. |
protected java.lang.String |
getDelimiter(CommentLine predecessor,
CommentLine successor,
CommentRange previous,
CommentRange next,
java.lang.String indentation)
Returns the line delimiter used in this comment line break. |
protected java.lang.String |
getDelimiter(CommentRange previous,
CommentRange next)
Returns the range delimiter for this comment range break. |
protected boolean |
isIndentDescriptions()
Should root tag parameter descriptions be indented after the tag? |
protected boolean |
isIndentRoots()
Should root tag parameter descriptions be indented? |
protected void |
markHtmlRanges()
Marks the comment ranges confined by HTML ranges. |
protected void |
markHtmlTag(CommentRange range,
char[] token)
Marks the comment range with its HTML tag attributes. |
protected void |
markJavadocTag(CommentRange range,
char[] token)
Marks the comment range with its javadoc tag attributes. |
protected void |
markRegion()
Marks the comment ranges in this comment region. |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentRegion |
|---|
append, canFormat, format, formatRegion, getDelimiter, getDocument, getRanges, getSize, getText, hasBorder, isAlphaNumeric, isClearLines, isNonAlphaNumeric, isSingleLine, logEdit, setBorder, stringToIndent, stringToLength, tokenizeRegion, wrapRegion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiCommentRegion(IDocument document,
Position position,
CodeFormatterVisitor formatter)
document - the document which contains the comment regionposition - the position of this comment region in the documentformatter - the given formatter| Method Detail |
|---|
protected boolean canAppend(CommentLine line,
CommentRange previous,
CommentRange next,
int index,
int count)
CommentRegion
canAppend in class CommentRegionline - comment line where to append the comment rangeprevious - comment range which is the predecessor of the current
comment rangenext - comment range to test whether it can be appended to the
comment lineindex - amount of space in the comment line used by already
inserted comment rangescount - the maximal width of text in this comment region
measured in average character widths
true iff the comment range can be added to the
line, false otherwise
protected java.lang.String getDelimiter(CommentLine predecessor,
CommentLine successor,
CommentRange previous,
CommentRange next,
java.lang.String indentation)
CommentRegion
getDelimiter in class CommentRegionpredecessor - the predecessor comment line after the line breaksuccessor - the successor comment line before the line breakprevious - the comment range after the line breaknext - the comment range before the line breakindentation - indentation of the formatted line break
protected java.lang.String getDelimiter(CommentRange previous,
CommentRange next)
CommentRegion
getDelimiter in class CommentRegionprevious - the previous comment range to the right of the range
delimiternext - the next comment range to the left of the range delimiter
protected final boolean isIndentDescriptions()
true iff the descriptions should be indented
after, false otherwise.protected final boolean isIndentRoots()
true iff the root tags should be indented,
false otherwise.protected void markHtmlRanges()
protected void markHtmlTag(CommentRange range,
char[] token)
range - the comment range to marktoken - token associated with the comment range
protected void markJavadocTag(CommentRange range,
char[] token)
range - the comment range to marktoken - token associated with the comment rangeprotected void markRegion()
CommentRegion
markRegion in class CommentRegionprotected CommentLine createLine()
CommentRegion
createLine in class CommentRegion
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||