Community
Participate
Working Groups
R3.2 Provide code assist for declarations that are already used later in the code: int f<code assist> System.out.print(foo);
As discussed at the JDT Summit.
Collect potential identifiers in the completion scanner.
We could want to only collect identifiers not following a dot or other characters never prefixing a single name ref.
Created attachment 52315 [details] Proposed fix
Released for 3.3 M3. Test added CompletionTests#testCompletionVariableName16() -> testCompletionVariableName32() Potential identifiers are collected from the end of the local variable to the end of the enclosing block. Identifiers following a dot are ignored. Identifiers followed by a ( or { are ignored. Identifier starting with an uppercase are ignored because most of the type it would be a type reference and not an unresolved name. Identifiers that would add name conflicts with another variable or field are ignored. The source are only scanned and parsed with standard recovery (no statements recovery) to avoid to do too costly operation as binding resolution and statements recovery.
Created attachment 52522 [details] Addionnal fix The released fix performances aren't good enough. This patch improve performance and limit to 100 the number of parsed lines.
Addionnal fix released.
Verified for 3.3 M3 using warm-up build I20061030-0800