Skip to content

Order precise matches over fuzzy ones in application property suggestions #1342

Closed

Description

@odrotbohm

When I type spring.task. in an application properties file, I would like to see the properties starting with the full match first. Currently, fuzzy matches are presented first if they sort higher than the full match.

These are the first results I get suggested:
Screenshot 2024-09-03 at 10 17 09

Here are the precise matches further down:
Screenshot 2024-09-03 at 10 17 21

Activity

  1. added this to the 4.26.0.RELEASE milestone on Sep 5, 2024
  2. self-assigned this
    on Sep 5, 2024
  3. martinlippert commented on Sep 5, 2024

    @martinlippert
    Member

    Definitely something we need to improve, totally agree. Aiming at working on this for the 4.26.0 release, which is scheduled for late October or early November.

  4. added a commit that references this issue on Sep 25, 2024
  5. martinlippert commented on Sep 25, 2024

    @martinlippert
    Member

    Looked into this quite a bit, somewhat related to eclipse-lsp4e/lsp4e#842. I added a workaround for this my marking the completion result list as incomplete, which then triggers a new computation of completions - and as a side effect, a new sorting of the results.

    Would be interesting to see what you think of this @odrotbohm, once we have a CI build ready for testing.

    I am especially interested in your opinion about a "feature" that is implemented here, which removes the spring prefix from the completions as soon as the completion list exclusively contains proposals that start with that prefix. The idea was - back then - to not waste real estate by repeating the prefix in every proposal and therefore also make the proposals slightly shorter when showing up in the completion popup. But it feels questionable to me, I personally would prefer to have the spring prefix being included in the proposals. But take a look (once the new CI build is out) and let us know what you think @odrotbohm.

    Will update the issue here once the CI build is around that includes this and testing can start.

  6. odrotbohm commented on Sep 26, 2024

    @odrotbohm
    MemberAuthor

    I've added the update site, get updates presented but the install fails with a few of these:

    java.lang.NoSuchMethodError: 'java.lang.String org.bouncycastle.util.encoders.Hex.toHexString(byte[])'
    	at org.eclipse.equinox.p2.repository.spi.PGPPublicKeyService.toHexFingerprint(PGPPublicKeyService.java:173)
    	at org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPPublicKeyStore.addKey(PGPPublicKeyStore.java:34)
    	at org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier.close(PGPSignatureVerifier.java:240)
    	at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep.close(ProcessingStep.java:97)
    	at org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier.close(SignatureVerifier.java:116)
    	at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep.close(ProcessingStep.java:97)
    	at org.eclipse.equinox.internal.p2.artifact.processors.checksum.MessageDigestProcessingStep.close(MessageDigestProcessingStep.java:58)
    	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.reportStatus(SimpleArtifactRepository.java:1317)
    	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:647)
    	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:846)
    	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:357)
    	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:327)
    	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:248)
    	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:164)
    	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:828)
    	at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:62)
    	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    

    and a few follow up errors complaining about downloads having failed.

  7. martinlippert commented on Oct 1, 2024

    @martinlippert
    Member

    @odrotbohm Can you try again? Probably a network glitch or a problem of updating the repository while downloading from it...

  8. added a commit that references this issue on Oct 14, 2024
  9. martinlippert commented on Oct 15, 2024

    @martinlippert
    Member

    Two things are done here now:

    • proposals are re-computed on every keystroke to get improved sorting of proposals
    • disabled the auto-removal of common prefixes in proposals and added a preference to enable this again (if someone prefers that behavior)

    With that, I think we can close this item. Changes will ship as part of the upcoming release.

  10. odrotbohm commented on Oct 15, 2024

    @odrotbohm
    MemberAuthor

    This looks much better now, thanks! 🙇

  11. martinlippert commented on Oct 16, 2024

    @martinlippert
    Member

    This looks much better now, thanks! 🙇

    Great to hear and thanks a lot for giving it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetheme: code completiontheme: property-editing-supporttype: enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions