Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How does autocomplete proposals sort by relevance work?
How does autocomplete proposals sort by relevance work? [message #1854096] Mon, 01 August 2022 10:30 Go to next message
a a is currently offline a aFriend
Messages: 1
Registered: August 2022
Junior Member
When we go to Preferences > Java > Editor > Content Assist under Sorting and Filtering section we can choose if our proposals are sorted by relevance or alphabetically.

But how does sorting by relevance actually work?

Does this work as:
Some kind of internal list of hardocded priority values for each package?
Something that is determined by inspecting our codebase and then assigns priority values based on which packages we use most often?
Some kind of list that we can change somewhere else in preferences (this would be most desirable for me)?

Whats currently causing me minor productivity issues is the fact that org.springframework packages are not really at the top despite the fact that I use them most often.
Now ofcourse I could go Java > Appearance > Type Filters and disable most of other packages so i get spring ones at the top. But I really don't want to do that since could still use some of those packages, just not as often as the spring ones.

Basically I want that every time I trigger content assist I get java.util first followed by org.springframework packages and then everything else. Is this possible?
Re: How does autocomplete proposals sort by relevance work? [message #1854119 is a reply to message #1854096] Tue, 02 August 2022 06:52 Go to previous message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
When you select "relevance", proposals are assigned relevance based on the context. There are several factors that are used in computing the relevance, for e.g., proposal is of exact expected type, fits in the completion context, such as resolved, static, qualified, of the same case etc.
IIRC, relevance can't configured.
Previous Topic:How to create a jar with module-info in eclipse
Next Topic:Compilation Participant problem creation
Goto Forum:
  


Current Time: Thu Mar 28 16:45:28 GMT 2024

Powered by FUDForum. Page generated in 0.02882 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top