Community
Participate
Working Groups
As I'm using JDT for a PDE project, I was willing to use a "project-local" Messages class. When trying to autocomplete "Messages" to also get import added, my project-local class was in the middle of many other Messages classes coming from dependencies/classpath. In such case, JDT would rather put the project-local class first, since in most cases, it's the one user are willing to use.
Currently, Content Assist maintains a history and shows the most recently used type with a matching name on top. The others are sorted alphabetically by package name. We should consider adding a "closeness" criterion similar to the Open Resources dialog, see FilteredResourcesSelectionDialog#pathDistance(IContainer). For types, the closeness would be calculated based on package name segments.
(In reply to Markus Keller from comment #1) > Currently, Content Assist maintains a history and shows the most recently > used type with a matching name on top. The others are sorted alphabetically > by package name. Most used type at project level or at workspace level? IMO, only project level makes sense. The behaviour In my use-case, I don't believe the one that was shown first is more used in this project than the "local" one. If it's a project-scoped history, then the result I got seem to show that in my usage scenario, both were tie (and probably never completed uet). In that case, the "tie" ones could be sorted by closeness.