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

[vscode] Notebook CodeActionKind Support #13093

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
- [Previous Changelogs](https://github.com/eclipse-theia/theia/tree/master/doc/changelogs/)

## v1.44.0

- [task] prevent task widget title from being changed by task process [#13003](https://github.com/eclipse-theia/theia/pull/13003)
- [vscode] Added Notebook CodeActionKind [#13093](https://github.com/eclipse-theia/theia/pull/13093) - contributed on behalf of STMicroelectronics

## v1.43.0 - 10/26/2023

Expand Down
1 change: 1 addition & 0 deletions packages/plugin-ext/src/plugin/types-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,7 @@ export class CodeActionKind {
public static readonly Source = CodeActionKind.Empty.append('source');
public static readonly SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
public static readonly SourceFixAll = CodeActionKind.Source.append('fixAll');
public static readonly Notebook = CodeActionKind.Empty.append('notebook');

constructor(
public readonly value: string
Expand Down
18 changes: 18 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10001,6 +10001,24 @@ export module '@theia/plugin' {
*/
static readonly SourceFixAll: CodeActionKind;

/**
* Base kind for all code actions applying to the enitre notebook's scope. CodeActionKinds using
* this should always begin with `notebook.`
*
* This requires that new CodeActions be created for it and contributed via extensions.
* Pre-existing kinds can not just have the new `notebook.` prefix added to them, as the functionality
* is unique to the full-notebook scope.
*
* Notebook CodeActionKinds can be initialized as either of the following (both resulting in `notebook.source.xyz`):
* - `const newKind = CodeActionKind.Notebook.append(CodeActionKind.Source.append('xyz').value)`
* - `const newKind = CodeActionKind.Notebook.append('source.xyz')`
*
* Example Kinds/Actions:
* - `notebook.source.organizeImports` (might move all imports to a new top cell)
* - `notebook.source.normalizeVariableNames` (might rename all variables to a standardized casing format)
*/
static readonly Notebook: CodeActionKind;

private constructor(value: string);

/**
Expand Down
Loading