Community
Participate
Working Groups
Build 3.4M4 The following 2 scenarii do not trigger similar proposals: 1. Map is not imported public class X { void foo() { Map.<CODEASSIST HERE> } } --> Offers 'Entry' with 'java.util.Map' as qualifier 2. Map is imported import java.util.Map; public class X { void foo() { Map.<CODEASSIST HERE> } } --> Offers 'Map<K,V>.Entry<K,V>' with 'java.util' qualifier I find (2) inconsistent. (1) is more concise, and doesn't provide enclosing type as completion name (only as qualifier, which it really is). Also, in (2) the proposed named suggests arguments for Map, which is irrelevant, since a raw type got entered (completion is behind the dot). Note that it only inserts a raw type in the end.
On presence of parameter types in proposals: class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { Member <CODEASSIST HERE> } } I would expect following proposals: MemberStatic<U> - A Member<V> - A<T> currently I get: A<T>.MemberStatic<U> A<T>.Member<V>
Small variation, when forcing raw enclosing type: class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { A.Member<CODEASSIST HERE> } } I would expect following proposals: MemberStatic<U> - A Member - A currently I get: A<T>.MemberStatic<U> A<T>.Member<V>
Yet another variation: class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { A<T>.Member<CODEASSIST HERE> } } I would expect following proposals: Member<V> - A<T> (only 1 proposal, since static member cannot be reached once enclosing got parameterized) currently I get: A<T>.MemberStatic A<T>.Member (note that currently, member types are no longer parameterized !?!?)
Created attachment 95035 [details] Proposed fix - With this patch the following test case: public class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { A.Member<CODEASSIST HERE> } } will produce these proposals: Member - A MemberStatic<U> - A - The following test case: public class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { A<Object>.Member<CODEASSIST HERE> } } will produce this proposal: A<java.lang.Object>.Member<V> - The following test case: public class A<T> { static class MemberStatic<U> {} class Member<V> {} void foo() { Member <CODEASSIST HERE> } } will produce these proposals: A<T>.Member<V> MemberStatic<U> - A
Released for 3.4M7. Tests added CompletionTests_1_5#test0339() -> test0350()
Verified for 3.4M7 using I20080427-2000.