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.
In the following, all the inner class comments are lost in refactoring - javadoc comments - /* ... */ comments - // comments This is particularly onerous since some comments were added so that the refactoring could proceed, see Issue 144208 . package javaapplication1; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; import javax.swing.AbstractAction; public class Outer { static void refresh() { } /** * javadoc comment for Inner. */ static class Inner { void refresh() { //Outer.refresh(); } /** * javadoc for Inner.handler * @param e */ void handler(MouseEvent e) { new InnerInner(); } private void someInnerMethod() { // test comment System.err.println("in inner method"); } /** * javadoc comment for InnerInner */ private class InnerInner extends AbstractAction { /* coment with '*' */ @Override public void actionPerformed(ActionEvent e) { someInnerMethod(); } } } } Product Version: NetBeans IDE 6.5 Beta (Build 200808111757) Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\erra\.netbeans\6.5beta
This is serious bug -> P2
I will take a look what's wrong.
The refactoring uses GeneratorUtilities.importComments() (issue 100829) that seems to work properly. In debugger, I found that Trees that are copied to a new compilation unit has another identity thus the comment mapping fails in VeryPretty. I am trying to fix this in java/source module. Reassigning to java. BTW it seems to never work even in NB 6.1.
fixed as http://hg.netbeans.org/main/rev/a134ca8457bd The issue of lost standalone comments (e.g. //Outer.refresh();) still remains. It is tracked as issue 103623.
Integrated into 'main-golden', available in build *200808220201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/a134ca8457bd User: Jan Pokorsky <jpokorsky@netbeans.org> Log: #144209: fixing lost comments of copied Trees
*** Issue 147309 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *201101220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/51aa6472eeef User: Jan Lahoda <jlahoda@netbeans.org> Log: Adding test for #144209.