Community
Participate
Working Groups
from bug 188876 package proposals are always fully qualified and could be unqualified. If the following class is existing package p1.p2.p3; public class Foo {} 1) the completion of import p1| // complete at | propose the completion strings 'p1.*;' 'p1.p2.*;' 'p1.p2.p3.*;' 2) the completion of import p1.p2| // complete at | propose the completion strings 'p1.p2.*;' 'p1.p2.p3.*;' we could propose instead the completion strings 'p2.*;' 'p2.p3.*;' 3) the completion of void foo() { p1| // complete at | } propose the completion strings 'p1' 'p1.p2' 'p1.p2.p3' 4) the completion of void foo() { p1.p2| // complete at | } propose the completion strings 'p1.p2' 'p1.p2.p3' we could propose instead the completion strings 'p2' 'p2.p3' The completion of package has some specificity - package and subpackage are proposed - jdt/text use completion string as label in the proposals list. jdt/text could use instead CompletionProposal#getDeclaringSignature() outside an import statement but inside an import statement only the completion string contains the on demand character '*'. So if we want to propose unqualified package (eg 'p2.p3;*;') - jdt/text should display unqualified package as label 'p2.p3.*;' or - jdt/core should add API to identify on demand imports to allow jdt/text to build the fully qualifed label
The completion string 'p1.p2.*; is not applied in the following test case import p1. p2 | // complete at Propose an unqualified completion string could solve this bug.
daniel - do you think display unqualified package in the list of proposals would be good ?
No I don't like that as we render the package icon and hence the name behind it should be the full package name. I also discussed it with Martin and he feels the same about this.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
We don't want to add this.