#2192-support-for-auto-completion-synonyms - #2204
Conversation
Coverage Report for CI Build 30532321896Coverage decreased (-0.001%) to 72.592%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions150 previously-covered lines in 8 files lost coverage.
Coverage Stats💛 - Coveralls |
|
Good job!
I also verified the behavior manually using the local dev build:
The implementation also follows the design proposed in the issue. The code looks good to me. |
hohwille
left a comment
There was a problem hiding this comment.
@samuelkos17 thanks for your PR and solving this auto-completion feature. Great job 👍
I left some comments for improvement. Please have a look.
When addressed, we can merge this.
…actored the collector creation to CompleteCommandlet
I totally agree that's a much more elegant implementation so I've implemented it. |
There was a problem hiding this comment.
@samuelkos17 thanks for your rework. 👍
In the DoD the CHANGELOG is not checked since it is still missing. Can you add this?
BTW: Instead of changing all JUnits it is better to add a convenience method/constructor avoiding all such changes (e.g. adding the new HashSet<>() everywhere). Please bear in mind that changes like this can also easily cause merge conflicts for you or others when you change such "API". If you keep a convenience method/constructor this can be avoided and the number of files that need to be touched get reduced.
See https://github.com/devonfw/IDEasy/blob/main/documentation/contributing/coding-conventions.adoc#refactorings
|
@hohwille I've updated the CHANGELOG.adoc. Thanks for the hint on updating the JUnit-tests, I will make sure to change them that way the next time. Do you want me to change them for this PR? |
This PR fixes #2192
Implemented changes:
AutoCompletionRegistry:List<String>toList<CompletionEntry>so candidates can be grouped with their synonyms.CompletionEntry:CompletionCandidateCollector:current completion cycle.
CompletionCandidateCollectorDefault:CompletionCandidateCollectorAdapter:AbstractIdeContext:sets it on the collector before matching properties.
ToolCommandlet:CompleteTest:Testing instructions
run-ideasy-locally.adocand run with the following cli-arguments:complete -b ""-- the output should neither contain -b nor --batchcomplete --batch ""-- the output should neither contain -b nor --batchcomplete ""-- the output should contain both -b and --batchmvn clean testand make sure that all tests pass.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal