Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate quick fixes #2023

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Duplicate quick fixes #2023

merged 1 commit into from
Mar 16, 2022

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Mar 14, 2022

Fixes redhat-developer/vscode-java#2339

Signed-off-by: Snjezana Peco snjezana.peco@redhat.com

@@ -160,7 +160,12 @@ public CodeActionHandler(PreferenceManager preferenceManager) {
codeActions.addAll(nonProjectFixProcessor.getCorrections(params, context, locations));
List<ChangeCorrectionProposal> quickfixProposals = this.quickFixProcessor.getCorrections(context, locations);
quickfixProposals.sort(comparator);
proposals.addAll(quickfixProposals);
quickfixProposals.forEach(quickfixProposal -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply use a linkedhashset?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I have used TreeSet.

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the commit message to something a bit more descriptive :

Avoid duplicate quick fixes when shown at line level

Once that's fixed, feel free to merge the PR.

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@snjeza snjeza merged commit 8650004 into eclipse-jdtls:master Mar 16, 2022
@rgrunber rgrunber added this to the End March 2022 milestone Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate quick fixes
3 participants