Skip to content

CodeActionProvider.providedKinds - #47702

Merged
Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
mjbvz:codeaction-provided-kinds
Apr 12, 2018
Merged

Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
mjbvz:codeaction-provided-kinds

Conversation

@mjbvz

Copy link
Copy Markdown
Contributor

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

@jrieken

Copy link
Copy Markdown
Contributor

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

Matt Bierner added 2 commits April 12, 2018 11:48
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
Matt Bierner (mjbvz) force-pushed the codeaction-provided-kinds branch from b1b0e66 to b7d523a Compare April 12, 2018 18:48
@mjbvz
Matt Bierner (mjbvz) merged commit 5ff2ccf into microsoft:master Apr 12, 2018
@DanTup

Danny Tuppeny (DanTup) commented Apr 24, 2018 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Matt Bierner (@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.

Danny Tuppeny (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
Copy Markdown
Contributor Author

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.

Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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).
Danny Tuppeny (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.

3 participants