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.
Enter the following code. Use "Buffered" and press ctrl-space to get "BufferedReader", "Input" ctrl-space to get InputStreamReader. You will see a list of choices in code completion for both. Now delete the code and do the same thing again. This time code completion automatically completes Buffered as BufferedReader and shows no list of options; same thing for InputStreamReader. It should still show the list of classes. public static void main(String[] args) throws IOException { System.out.println("How many rabbits"); BufferedReader b = new BufferedReader (new InputStreamReader (System.in)); String s = b.readLine(); int ct = Integer.parseInt(s); int val = fib (ct); System.out.println("After " + ct + " generations there are " + val + " rabbits"); } private static final int fib (int n) { return n == 0 ? 0 : n == 1 ? 1 : fib (n - 2) + fib (n - 1); }
It is as designed. When you called CC for the first time, the prefix Buffered cannot be found in normal CC so the all-symbols was automaticaly used. Here you selected BufferedReader and it was automaticaly imported. When you invoked CC for the second time, the normal CC find one possible completion (since the import) and automaticaly inserted it (auto substitution can be switched off in the options). If you want the all-symbols CC in the second case you should use ctrl-alt-space.