mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Comment about tree view samples
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user