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.
If I type "Coll", invoke completion and pick, say Collection, completion does automatically generate an import for me. But if I do similar a line later, with an intent to make my collection immutable, I would usually do following: 1. Type "Co"<Ctrl+K> to get "Collection". Maybe try completion but this time only in-scope types would get displayed (as Collection is already imported and matches). 2.Type the last letter and dot manually, so I have "Collections.|" and wait/invoke completion (all types are considered this time as nothing in-scope matches). 3. pick unmodifiableCollection I would expect that the completion would generate "import java.util.Collections" for me as it had to traverse that (unknown) type for the match, but only the picked method gets expanded and I have to fix the code later using hints.
Moreover, the completion won't work for the expression after this point, until I fix the imports.