We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6431df3 + 82a70b7 commit 1626c3fCopy full SHA for 1626c3f
package.json
@@ -27,7 +27,8 @@
27
"main": "./out/main",
28
"activationEvents": [
29
"onLanguage:powershell",
30
- "onCommand:PowerShell.NewProjectFromTemplate"
+ "onCommand:PowerShell.NewProjectFromTemplate",
31
+ "onCommand:PowerShell.OpenExamplesFolder"
32
],
33
"dependencies": {
34
"vscode-languageclient": "1.3.1"
@@ -139,6 +140,11 @@
139
140
"command": "PowerShell.NewProjectFromTemplate",
141
"title": "Create New Project from Plaster Template",
142
"category": "PowerShell"
143
+ },
144
+ {
145
+ "command": "PowerShell.OpenExamplesFolder",
146
+ "title": "Open Examples Folder",
147
+ "category": "PowerShell"
148
}
149
150
"snippets": [
src/features/Examples.ts
@@ -0,0 +1,30 @@
1
+/*---------------------------------------------------------
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ *--------------------------------------------------------*/
4
+
5
+import vscode = require('vscode');
6
+import path = require('path');
7
+import { IFeature } from '../feature';
8
+import { LanguageClient } from 'vscode-languageclient';
9
10
+export class ExamplesFeature implements IFeature {
11
+ private command: vscode.Disposable;
12
+ private examplesPath: string;
13
14
+ constructor() {
15
+ this.examplesPath = path.resolve(__dirname, "../../examples");
16
+ this.command = vscode.commands.registerCommand('PowerShell.OpenExamplesFolder', () => {
17
+ vscode.commands.executeCommand(
18
+ "vscode.openFolder",
19
+ vscode.Uri.file(this.examplesPath),
20
+ true);
21
+ });
22
+ }
23
24
+ public setLanguageClient(languageclient: LanguageClient) {
25
26
+ public dispose() {
+ this.command.dispose();
+}
src/main.ts
@@ -10,6 +10,7 @@ import { IFeature } from './feature';
import { SessionManager } from './session';
import { PowerShellLanguageId } from './utils';
import { ConsoleFeature } from './features/Console';
+import { ExamplesFeature } from './features/Examples';
import { OpenInISEFeature } from './features/OpenInISE';
import { NewFileOrProjectFeature } from './features/NewFileOrProject';
import { ExpandAliasFeature } from './features/ExpandAlias';
@@ -88,6 +89,7 @@ export function activate(context: vscode.ExtensionContext): void {
88
89
// Create features
90
extensionFeatures = [
91
new ConsoleFeature(),
92
+ new ExamplesFeature(),
93
new OpenInISEFeature(),
94
new ExpandAliasFeature(),
95
new ShowHelpFeature(),
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments