37 |
protected static Tag[] paramTagEmptyArr = new ParamTagImpl[0]; |
protected static Tag[] paramTagEmptyArr = new ParamTagImpl[0]; |
38 |
protected static Tag[] throwsTagEmptyArr = new ThrowsTagImpl[0]; |
protected static Tag[] throwsTagEmptyArr = new ThrowsTagImpl[0]; |
39 |
protected SourcePosition position; |
protected SourcePosition position; |
40 |
|
private String boilerplateComment; |
41 |
|
|
42 |
// Return the text of the comment for this doc item. |
// Return the text of the comment for this doc item. |
43 |
public String commentText() { |
public String commentText() { |
171 |
length - endOffset, |
length - endOffset, |
172 |
getContextClass(), |
getContextClass(), |
173 |
getContextMember(), |
getContextMember(), |
174 |
null); |
null, |
175 |
|
boilerplateComment); |
176 |
|
|
177 |
rawDocOffset=Main.getRootDoc().writeRawComment(rawDocumentation); |
rawDocOffset=Main.getRootDoc().writeRawComment(rawDocumentation); |
178 |
rawDocumentation=null; |
rawDocumentation=null; |
227 |
if (text[startIndex] == '.' |
if (text[startIndex] == '.' |
228 |
&& (startIndex+1 == endIndex |
&& (startIndex+1 == endIndex |
229 |
|| Character.isWhitespace(text[startIndex+1]) |
|| Character.isWhitespace(text[startIndex+1]) |
230 |
|| isHTMLBreakTag(text, startIndex+1, endIndex))) |
|| isHTMLBreakTag(text, startIndex+1, endIndex) |
231 |
|
)) { |
232 |
return startIndex; |
return startIndex; |
233 |
|
} |
234 |
|
|
235 |
startIndex++; |
startIndex++; |
236 |
} |
} |
243 |
*/ |
*/ |
244 |
private static boolean isHTMLBreakTag(char[] text, int start, int end) |
private static boolean isHTMLBreakTag(char[] text, int start, int end) |
245 |
{ |
{ |
246 |
return |
String[] breakTags = { |
247 |
(text[start] == '<' |
"p>", "/p>", "h1>", "h2>", "h3>", "h4>", "h5>", "h6>", "hr>", |
248 |
&& |
"pre>", "/pre>" |
249 |
( |
}; |
250 |
( |
|
251 |
start+2 < end |
if (text[start] == '<') { |
252 |
&& (text[start+1] == 'p' || text[start+1] == 'P') |
|
253 |
&& (text[start+2] == '>' || Character.isWhitespace(text[start+2])) |
outer: |
254 |
) |
for (int i=0; i<breakTags.length; ++i) { |
255 |
|| |
String tag = breakTags[i]; |
256 |
( |
int len = tag.length(); |
257 |
start+3 < end |
if (start + len < end) { |
258 |
&& (text[start+1] == 'b' || text[start+1] == 'B') |
for (int j=0; j<len; ++j) { |
259 |
&& (text[start+2] == 'r' || text[start+2] == 'R') |
char c = tag.charAt(j); |
260 |
&& (text[start+3] == '>' || Character.isWhitespace(text[start+3])) |
if (Character.toLowerCase(text[start + 1 + j]) != c) { |
261 |
) |
continue outer; |
262 |
) |
} |
263 |
); |
} |
264 |
|
return true; |
265 |
|
} |
266 |
|
} |
267 |
|
} |
268 |
|
return false; |
269 |
} |
} |
270 |
|
|
271 |
public static Map parseCommentTags(char[] comment, int startIndex, int endIndex, |
public static Map parseCommentTags(char[] comment, int startIndex, int endIndex, |
272 |
ClassDocImpl contextClass, MemberDocImpl contextMember, |
ClassDocImpl contextClass, MemberDocImpl contextMember, |
273 |
AbstractTagImpl contextTag) { |
AbstractTagImpl contextTag, String boilerplateComment) { |
274 |
|
|
275 |
int rawDocStart=skipHtmlWhitespace(comment, startIndex); |
int rawDocStart=skipHtmlWhitespace(comment, startIndex); |
276 |
|
|
575 |
} |
} |
576 |
} |
} |
577 |
|
|
578 |
|
if (null == contextMember && null != boilerplateComment) { |
579 |
|
addTag(tags, "@boilerplate", boilerplateComment, false, contextClass, null, null, false); |
580 |
|
} |
581 |
|
|
582 |
Map rc=new HashMap(); |
Map rc=new HashMap(); |
583 |
|
|
584 |
for (Iterator it=tags.keySet().iterator(); it.hasNext(); ) { |
for (Iterator it=tags.keySet().iterator(); it.hasNext(); ) { |
626 |
} |
} |
627 |
} |
} |
628 |
|
|
629 |
private static AbstractTagImpl addTag(Map tags, String name, |
protected static AbstractTagImpl addTag(Map tags, String name, |
630 |
String value, boolean isFirstSentence, |
String value, boolean isFirstSentence, |
631 |
ClassDocImpl contextClass, |
ClassDocImpl contextClass, |
632 |
MemberDocImpl contextMember, |
MemberDocImpl contextMember, |
633 |
AbstractTagImpl contextTag, |
AbstractTagImpl contextTag, |
634 |
boolean isInline) { |
boolean isInline) { |
635 |
|
|
636 |
AbstractTagImpl tag; |
AbstractTagImpl tag; |
637 |
|
|
933 |
{ |
{ |
934 |
return tagMap.isEmpty(); |
return tagMap.isEmpty(); |
935 |
} |
} |
936 |
|
|
937 |
|
void setBoilerplateComment(String boilerplateComment) |
938 |
|
{ |
939 |
|
this.boilerplateComment = boilerplateComment; |
940 |
|
} |
941 |
} |
} |
942 |
|
|