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.
[release32 apr 20] Import Management Tool works very poorly with inner classes, and is also confused by same-package classes. For example, I added org.openide.nodes to its list of standard packages in settings. After running the wizard on a heavily node-oriented source file with an inner class, it imported org.openide.nodes.* (fine) but also replaced occurrences of e.g. Node.Property or Node.Handle with Property or Handle (not fine, should have been left as is). Also it glob-imported the package the source file was in, which was unexpected. Also it generated imports of the outer class for the inner class and of the inner class for the outer class, both of which are unnecessary.
Target milestone -> 3.3
Assigning to the author ;-)
Target milestone -> 3.3.1.
is it even fixable now, or will we have to wait for the new parser ?
Jesse, there has been done some improvements in Import Management Tool to better handle inner classes. At least it should produce code, which can be compiled. :-) Can you, please try it again? If there are still some problems (I guess they are), please provide the source code for testing. Thanks.
I can't promise to update the report with an evaluation of the current behavior any time soon - not enough time, it can get complicated to set up the full scenario, and I haven't actually used the Import Tool for real since I first tried it (and found that it did not work well enough on my sources to be useful).
Set target milestone to TBD
Is there anything here that can be release noted for 3.4?
What is related to this bug, is the following line: this.putValue(Action.NAME,"ActionName"); the Import Management Tool will not recognize that Action needs to be imported. Even worse, it will remove an import to Action because it thinks it's not necessary.
Thomas, please, provide some example for this problem. Thanks.
And Thomas when adding comments to an Issuezilla report, you should generally add yourself as a CC, otherwise you will never see requests for more details like the one Tomas Hurka just made...
Proposed release note: When using the import management tool on inner classes, the name of the outer class is stripped from the reference to the inner class.
*** Issue 28418 has been marked as a duplicate of this issue. ***
Closing, Import Management Tools was replaced by Fix Import functionality.