This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Current I see no way to create a Javadoc comment. I would have to use Comment.create(Style, int, int, int, String), but since I don't want to specify the int parameters I would have to use the non-public Query.NOPOS value. Perhaps a Comment.create(Style, String) constructor should be added.
moving opened issues from TM <= 6.1 to TM=Dev
public static Comment create(Style style, String s) { return new Comment(style, NOPOS, NOPOS, NOPOS, s); } Honzo, can I add it?
If it works, go ahead.
Overtake.
@jbecicka: is this issue still valid?
Added new method into Comment allowing creating comment of any type. Requesting api review. if there will be no negative response within 24hours the patch will be applied. PATCH: diff -r 329c29766434 java.source/src/org/netbeans/api/java/source/Comment.java --- a/java.source/src/org/netbeans/api/java/source/Comment.java Tue Mar 31 08:29:54 2009 +0200 +++ b/java.source/src/org/netbeans/api/java/source/Comment.java Tue Mar 31 11:13:01 2009 +0200 @@ -105,6 +105,17 @@ } /** + * Define a comment, using specified style. + * @param style the style of comment + * @param indent indentation of comment + * @param text textual content of comment. With or without proper escaping + * @return new comment + */ + public static Comment create(Style style, String text) { + return new Comment(style, NOPOS, NOPOS, NOPOS, text); + } + + /** * Define a comment, using source file positions. * @param style the style of comment * @param pos start position within source file
jet-main #1e3301e14f46