redhat-developer / redhat-developer/quarkus-ls
Calculate the "most" similar value (shortest Levenshtein distance) when genering one similar text suggestion code action.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 50
- Forks
- 18
- Avg merge
- 22h 11m
- Merged PRs (30d)
- 3
Description
Some similar text suggestions only suggest one possible value. For instance, when you are using https://github.com/redhat-developer/quarkus-ls/pull/713, with the following class and Qute template:
public class Asdf {
public String fooBar12() { ... }
public String fooBar2() { ... }
public String fooBar3() { ... }
public String fooBar4() { ... }
}
{@org.acme.Asdf asdf}
{asdf.foo|Bar()}
The CodeAction to fix the referenced method at the | in the template suggests fooBar12. However, fooBar2, fooBar3, and fooBar4 all have lower Levenschtein distances from fooBar than fooBar12. IMO, it would make sense to take this into account, and suggest fooBar3 instead of fooBar12.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the similar-text suggestion CodeAction for Qute template references in quarkus-ls and trace how candidate values are selected and compared. Use the fooBar example from the issue to verify that the suggestion with the shortest Levenshtein distance is selected, including when several methods are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100