Community
Participate
Working Groups
Build ID: I20070921-0919 (3.4M2) Steps To Reproduce: Enter the following code anywhere in a Java method: int x = 0; int y = (x >> (1)); Place the cursor anywhere after the 2nd line and the end of the method, then invoke Ctrl+Spacebar and note that the Content Assist dialog comes up empty. Do the same after placing the cursor on or before the 1st line, and note that Content Assist works as expected. Significant (+) and insignificant (-) factors: + Using a variable in the position of "x" in the 2nd line. (Compared to replacing with a number constant, e.g. "2".) + Choosing <<, +, -, or any other tested operators. + Removing any pair(s) of parenthesis. - The data types used (byte/short/int/etc.) - Choosing between the >> and >>> operators. More information: Also occurs with I20070625-1500 (3.3.0). Java code compiles without errors or warnings. Nothing is generated in the Eclipse Error Log. A more realistic code example (based on what I was writing when I found the problem): long code; byte off; byte len; ... byte result = (byte)(code >> (Long.SIZE - off - len));
Created attachment 96223 [details] Proposed fix
Released for 3.4M7. Test added GenericsCompletionParserTest#test0217_Method() The problem was caused by a identifier followed by '>>' followed by '(' near the completion location. In this case the CompletionParser tried to build a generic constructor (new x<empty<empty>>(1)).
Thanks! F.Y.I., the symptoms and conditions on bug 75650 are rather similar to this. When I get a chance, I'll try to verify whether it was still an issue as of 3.4M6 and/or if it is also fixed in the current build. Do you have a build # that this fix should be present in?
This fix will present in the next integration build (>I20080415-1646).
Verified for 3.4M7 using I20080427-2000.