aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-03-03 19:54:51 +0000
committerVille Penttinen <[email protected]>2019-03-03 20:02:19 +0000
commit1b4e0ec1c868c7f2a0eef1e59bfa382db85a6900 (patch)
tree33b83144045989c7541746467d0b0855dce8bd01 /editors/code/src/commands
parentc2d3203d0c708dc2ccb7c0d017ae876180c0e5a8 (diff)
Rename syntaxtree text provider to SyntaxTreeContentProvider
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/syntaxTree.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts
index 7200ae823..2f50fe14b 100644
--- a/editors/code/src/commands/syntaxTree.ts
+++ b/editors/code/src/commands/syntaxTree.ts
@@ -5,7 +5,7 @@ import { Server } from '../server';
5 5
6export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); 6export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree');
7 7
8export class TextDocumentContentProvider 8export class SyntaxTreeContentProvider
9 implements vscode.TextDocumentContentProvider { 9 implements vscode.TextDocumentContentProvider {
10 public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 10 public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
11 public syntaxTree: string = 'Not available'; 11 public syntaxTree: string = 'Not available';
@@ -54,7 +54,7 @@ type SyntaxTreeResult = string;
54// Opens the virtual file that will show the syntax tree 54// Opens the virtual file that will show the syntax tree
55// 55//
56// The contents of the file come from the `TextDocumentContentProvider` 56// The contents of the file come from the `TextDocumentContentProvider`
57export function createHandle(provider: TextDocumentContentProvider) { 57export function createHandle(provider: SyntaxTreeContentProvider) {
58 return async () => { 58 return async () => {
59 const editor = vscode.window.activeTextEditor; 59 const editor = vscode.window.activeTextEditor;
60 const rangeEnabled = !!(editor && !editor.selection.isEmpty); 60 const rangeEnabled = !!(editor && !editor.selection.isEmpty);