-
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.
feat: replace code lenses for partial execution with code actions VSC…
- Loading branch information
1 parent
c9cdb63
commit 125c595
Showing
9 changed files
with
157 additions
and
407 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
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.
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
Oops, something went wrong.