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.
I have method /** * comment * @return 1 */ int method() { // TODO: Process the button click action. Return value is a navigation // case name where null will return to the same page. return 1; } and I get int method() { return 1; } after TreeMaker.addClassMember
See testCopyMethodWithCommments() in /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java new revision: 1.12; previous revision: 1.11
The tree is printed at new place. If I'll try to preserve all the comments, I have to map them immediately when working copy is used. This will have huge negative impact to performance. We agreed such copying will be available explicitly, I'll provide a method for it.
The explicit copy support will be great.
Accurately, it does not copy the comments. (no wipe is made, tree is copied from different location to the new one.) I've experience the similar problem as a I had in #117607. I do not have a token sequence available for source tree (i.e. the place where tree was originally placed) and this means I cannot do anything. Will try to think about another hacky stuff, but perhaps will not be able to fix it to 6.0.
;-) Checking in src/org/netbeans/api/java/source/GeneratorUtilities.java; /cvs/java/source/src/org/netbeans/api/java/source/GeneratorUtilities.java,v <-- GeneratorUtilities.java new revision: 1.11; previous revision: 1.10 done
It is close the goal but still not working. I am fine with API but the impl fails. Test case: class A { /** * AAA javadoc */ public static final int AAA = 0; /** * am javadoc * @param a a param * @return vrat * @throws java.io.IOException hod */ public int am(int a) throws IOException { // am inner comment return 0; } // f comment int f; } I move all members to a new class and I get class A extends NewClass { /** * AAA javadoc */ } and class NewClass { /** * AAA javadoc */ public static final int AAA = 0; // f comment // f comment int f; public int am(int a) throws IOException { // am inner comment return 0; } }
Test stuff. /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java,v <-- CommentsTest.java new revision: 1.24; previous revision: 1.23 done
Now the comments aren't duplicated. Checking in org/netbeans/api/java/source/TranslateIdentifier.java; /cvs/java/source/src/org/netbeans/api/java/source/TranslateIdentifier.java,v <-- TranslateIdentifier.java new revision: 1.2; previous revision: 1.1 done
Checking in src/org/netbeans/api/java/source/TranslateIdentifier.java; /cvs/java/source/src/org/netbeans/api/java/source/TranslateIdentifier.java,v <-- TranslateIdentifier.java new revision: 1.3; previous revision: 1.2 done Checking in test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java,v <-- CommentsTest.java new revision: 1.25; previous revision: 1.24 done