Comment about tree view samples

This commit is contained in:
Sandeep Somavarapu
2018-06-26 14:36:55 +02:00
parent fd41102370
commit bbca22205d
2 changed files with 7 additions and 4 deletions

View File

@ -7,8 +7,11 @@ import { JsonOutlineProvider } from './jsonOutline'
import { FtpExplorer } from './ftpExplorer.textDocumentContentProvider'
export function activate(context: vscode.ExtensionContext) {
const rootPath = vscode.workspace.rootPath;
// Complete Tree View Sample
new FtpExplorer(context);
// Following are just data provider samples
const rootPath = vscode.workspace.rootPath;
const nodeDependenciesProvider = new DepNodeProvider(rootPath);
const jsonOutlineProvider = new JsonOutlineProvider(context);
@ -24,5 +27,4 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('jsonOutline.renameNode', offset => jsonOutlineProvider.rename(offset));
vscode.commands.registerCommand('extension.openJsonSelection', range => jsonOutlineProvider.select(range));
new FtpExplorer(context);
}

View File

@ -174,11 +174,12 @@ export class FtpExplorer {
vscode.window.showTextDocument(resource);
}
private reveal(): void {
private reveal(): Thenable<void> {
const node = this.getNode();
if (node) {
this.ftpViewer.reveal(node);
return this.ftpViewer.reveal(node);
}
return null;
}
private getNode(): FtpNode {