-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VSCODE-247: Replace code lenses with code actions (#318)
* feat: replace code lenses for partial execution with code actions VSCODE-247 * test: add code action tests * build: patch node gyp on windows * build: equal windows * build: revert * test: add integration test for partial playground execution * test: move timeout to suite * build: patch node gyp on windows with powershell * test: use command from code action
- Loading branch information
1 parent
e63a769
commit d0015f2
Showing
13 changed files
with
215 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as vscode from 'vscode'; | ||
import EXTENSION_COMMANDS from '../commands'; | ||
import PlaygroundController from './playgroundController'; | ||
|
||
export default class CodeActionProvider implements vscode.CodeActionProvider { | ||
_playgroundController: PlaygroundController; | ||
|
||
static readonly providedCodeActionKinds = [vscode.CodeActionKind.QuickFix]; | ||
|
||
constructor(playgroundController: PlaygroundController) { | ||
this._playgroundController = playgroundController; | ||
} | ||
|
||
provideCodeActions(): vscode.CodeAction[] | undefined { | ||
if (!this._playgroundController._selectedText) { | ||
return; | ||
} | ||
|
||
const commandAction = new vscode.CodeAction('Run selected playground blocks', vscode.CodeActionKind.Empty); | ||
|
||
commandAction.command = { | ||
command: EXTENSION_COMMANDS.MDB_RUN_SELECTED_PLAYGROUND_BLOCKS, | ||
title: 'Run selected playground blocks', | ||
tooltip: 'Run selected playground blocks' | ||
}; | ||
|
||
return [commandAction]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.