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

fix: do not execute code action commands twice [IDE-506][HEAD-229] #632

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

bastiandoetsch
Copy link
Collaborator

@bastiandoetsch bastiandoetsch commented Aug 21, 2024

Description

Eclipse and VSCode have slightly different behaviours. To cater for Eclipse's behaviour (HEAD-229) we added execution of commands during resolution of code actions. This is not correct and only worked, because we returned an empty code action afterwards to Eclipse which overwrote the command earlier contained.

In VSCode, the command of the code action is not overwritten by the resolved code action, thus executeCommand was called both in resolution and normal command execution.

This implementation difference abides by protocol, but our returning changed fields after executing the command does not. The PR fixes this incorrect behaviour.

Checklist

  • Tests added and all succeed
  • Linted
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

Copy link
Contributor

@acke acke left a comment

Choose a reason for hiding this comment

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

LGTM!

@bastiandoetsch bastiandoetsch merged commit 1753682 into main Aug 22, 2024
18 checks passed
@bastiandoetsch bastiandoetsch deleted the fix/IDE-506_HEAD-229_fix-code-action-behaviour branch August 22, 2024 07:02
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.

2 participants