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.
Product Version: NetBeans IDE Dev (Build 201109180600) Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\Gili\.netbeans\dev Cache directory: C:\Users\Gili\.netbeans\dev\var\cache When "organize imports" is invoked, it fails to take into consideration classes referenced by Javadoc @link tags. It removes these classes (thinking they are unused), thereby breaking the Javadoc.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/51e6e75512a1
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/51e6e75512a1 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #203184: Organize imports removes classes referenced by Javadoc - fixed.
This issue is back in dev build 201110050601.
Created attachment 113140 [details] Testcase Notice how "Organize Imports" removes java.sql.DatabaseMetaData that is referenced by the Javadoc.
I cannot reproduce the issue in the current dev build. Please note that fix has been integrated into main-golden on 2011-10-10. Could you please try some newer build? Thanks.
I am able to reproduce it: 1. Create new Java SE Project. 2. In JavaApplication1 after package declaration line paste "import javafx." and press Alt-Enter. 3. Organize imports action removes my javadoc completely. 4. Also it removes new lines between package and class declarations. Source: ===== package javaapplication1; import javafx. /** * * @author Manowar */ public class JavaApplication1 { ===== Result: ===== package javaapplication1; public class JavaApplication1 { =====
I am using a dev version: Product Version: NetBeans IDE Dev (Build 20111227-ccd05eef72af) Java: 1.6.0_27; Java HotSpot(TM) 64-Bit Server VM 20.2-b06 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Projects\netbeans\jet-main\nbbuild\testuserdir Cache directory: C:\Projects\netbeans\jet-main\nbbuild\testuserdir\var\cache
OrganizeImport hint should not appear in case of syntax error in import section. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/dd09d3a76393
Integrated into 'main-golden', will be available in build *201203240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/dd09d3a76393 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #203184: Organize imports removes classes referenced by Javadoc - fixed.