Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 518140

Summary: `package` completion should return current inferred package only (or at least put it first)
Product: [Eclipse Project] JDT Reporter: Fred Bricon <fbricon>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug

Description Fred Bricon CLA 2017-06-12 12:34:15 EDT
If you have a java file under the org/whatever directory, completing package o| returns a extensive list of all available packages in the classpath, starting with the letter `o`. Ideally only `org.whatever` should be returned, or at least, it should have the highest relevance.


I'm filing it under JDT Core instead of UI, because this impacts the eclipse.jdt.ls project, and ultimately, the vscode-java extension. See [1].

[1] https://github.com/redhat-developer/vscode-java/issues/234.
Comment 1 Stephan Herrmann CLA 2017-06-12 17:26:33 EDT
Hi Fred,

(In reply to Fred Bricon from comment #0)
> If you have a java file under the org/whatever directory, completing package
> o| returns a extensive list of all available packages in the classpath,
> starting with the letter `o`. Ideally only `org.whatever` should be
> returned,

If indeed you speak about the package declaration at the top of a compilation unit, right: if the file is on the build path then we already know the full package name, no additional proposals needed.
 
 
> I'm filing it under JDT Core instead of UI, because this impacts the
> eclipse.jdt.ls project, and ultimately, the vscode-java extension. See [1].
> 
> [1] https://github.com/redhat-developer/vscode-java/issues/234.

The JDT/Core team probably has no cycles to implement this before September (Java 9 GA), so plenty of time to propose a fix ;p
Comment 2 Eclipse Genie CLA 2020-04-08 20:22:09 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.