diff options
author | Ville Penttinen <[email protected]> | 2019-03-03 19:54:51 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-03-03 20:02:19 +0000 |
commit | 1b4e0ec1c868c7f2a0eef1e59bfa382db85a6900 (patch) | |
tree | 33b83144045989c7541746467d0b0855dce8bd01 /editors/code/src/commands | |
parent | c2d3203d0c708dc2ccb7c0d017ae876180c0e5a8 (diff) |
Rename syntaxtree text provider to SyntaxTreeContentProvider
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/syntaxTree.ts | 4 |
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 | ||
6 | export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); | 6 | export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); |
7 | 7 | ||
8 | export class TextDocumentContentProvider | 8 | export 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` |
57 | export function createHandle(provider: TextDocumentContentProvider) { | 57 | export 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); |