Skip to content

Commit

Permalink
Notebook CodeActionKind Support (#13093)
Browse files Browse the repository at this point in the history
Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
  • Loading branch information
rschnekenbu authored Nov 27, 2023
1 parent 6004188 commit 716aee5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
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

0 comments on commit 716aee5

Please sign in to comment.