spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
870 stars 204 forks source link

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

Open odrotbohm opened 1 month ago

odrotbohm commented 1 month ago

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
martinlippert commented 4 weeks ago

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.

martinlippert commented 1 week ago

Looked into this quite a bit, somewhat related to https://github.com/eclipse/lsp4e/issues/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.

martinlippert commented 1 week ago

@odrotbohm CI builds including this update are now available at https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html

odrotbohm commented 1 week ago

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.

martinlippert commented 2 days ago

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