forked from PowerShell/vscode-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExamples.ts
25 lines (21 loc) · 813 Bytes
/
Examples.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
import path = require("path");
import vscode = require("vscode");
export class ExamplesFeature implements vscode.Disposable {
private command: vscode.Disposable;
private examplesPath: string;
constructor() {
this.examplesPath = path.resolve(__dirname, "../../../examples");
this.command = vscode.commands.registerCommand("PowerShell.OpenExamplesFolder", () => {
vscode.commands.executeCommand(
"vscode.openFolder",
vscode.Uri.file(this.examplesPath),
true);
});
}
public dispose() {
this.command.dispose();
}
}