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

CodeActionProvider.providedKinds #47702

Merged
merged 2 commits into from
Apr 12, 2018

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Apr 11, 2018

Adds a new optinal providedKinds property on CodeActionProvider. This is a list of CodeActionKinds that the provider may return. The list will be used for deciding when to show the refactor and source action context menus. It is not used for filtering the returned code actions

Possibly helps address #45383

@mjbvz mjbvz self-assigned this Apr 11, 2018
@mjbvz mjbvz requested a review from jrieken April 11, 2018 23:46
@jrieken
Copy link
Member

jrieken commented Apr 12, 2018

We pass this information along the register-call because that makes it clear that those cannot change. Making it a property, apart from being different to other places, makes this harder to watch

Adds a new optinal `providedKinds` property on `CodeActionProvider`. This is a list of `CodeActionKinds` that the provider may return. The list is used for deciding when to show the `refactor` and `source action` context menus. It is not used for filtering the returned code actions

Possibly helps address microsoft#45383
@mjbvz mjbvz force-pushed the codeaction-provided-kinds branch from b1b0e66 to b7d523a Compare April 12, 2018 18:48
@mjbvz mjbvz merged commit 5ff2ccf into microsoft:master Apr 12, 2018
@DanTup
Copy link
Contributor

DanTup commented Apr 24, 2018

There's no milestone on this but the changes are in vscode.d.ts - I presume this plans to ship in 1.23?

Edit: Looks like #47621 is tagged April :)

@DanTup
Copy link
Contributor

DanTup commented Apr 24, 2018

@mjbvz Is it possible to change the label that appears for "Organize Imports"? It doesn't seem to use the name form the Code action (in the palette). For ex in Dart we call it "Organize Directives" and I guess C# calls it Organize Usings.

DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 24, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 24, 2018

The command itself is called organize imports for consistency across languages. However the code action entry in the source context menu will show whatever name you put on on the code action.

DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 25, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 25, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 26, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 26, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 26, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 26, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Apr 30, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request May 2, 2018
Implements microsoft/vscode#47702 so that we get refactors on context menu.

Fixes #835.
Fixes #531 (ish).
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants