Community
Participate
Working Groups
Against I20050509-2010. With a 1.5 JRE on the build path, open a java file, type the following at the top: import static ElementType and hit Ctrl+Space. The result is import static java.lang.annotation.ElementType; The semicolon will have to be deleted: the user is probably intending to add .* or a specific field to import.
I agree, 'import static java.lang.annotation.ElementType;' is a valid import but you wouldn't do a static import of a type.
Actually, it's a compile error: The static import java.lang.annotation.ElementType must be a field or member type
David - is that us or JDT/UI ?
that's us
*** Bug 94122 has been marked as a duplicate of this bug. ***
Fixed and tests added CompletionTest_1_5#test0209() -> test0213() if the import is static and the proposed type is top level type then a '.' is added instead of ';'. if you type 'import static ElementType<<complete here>>' then the result will be 'import static java.lang.annotation.ElementType.'
Verified on build I20050526-2000-win32.