File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 128
128
"command" : " PowerShell.SelectPSSARules" ,
129
129
"title" : " Select PSScriptAnalyzer Rules" ,
130
130
"category" : " PowerShell"
131
+ },
132
+ {
133
+ "command" : " PowerShell.ShowSessionOutput" ,
134
+ "title" : " Show Session Output" ,
135
+ "category" : " PowerShell"
131
136
}
132
137
],
133
138
"snippets" : [
Original file line number Diff line number Diff line change @@ -144,12 +144,12 @@ function onInputEntered(responseText: string): ShowInputPromptResponseBody {
144
144
}
145
145
146
146
export class ConsoleFeature implements IFeature {
147
- private command : vscode . Disposable ;
147
+ private commands : vscode . Disposable [ ] ;
148
148
private languageClient : LanguageClient ;
149
149
private consoleChannel : vscode . OutputChannel ;
150
150
151
151
constructor ( ) {
152
- this . command =
152
+ this . commands = [
153
153
vscode . commands . registerCommand ( 'PowerShell.RunSelection' , ( ) => {
154
154
if ( this . languageClient === undefined ) {
155
155
// TODO: Log error message
@@ -175,7 +175,13 @@ export class ConsoleFeature implements IFeature {
175
175
176
176
// Show the output window if it isn't already visible
177
177
this . consoleChannel . show ( vscode . ViewColumn . Three ) ;
178
- } ) ;
178
+ } ) ,
179
+
180
+ vscode . commands . registerCommand ( 'PowerShell.ShowSessionOutput' , ( ) => {
181
+ // Show the output window if it isn't already visible
182
+ this . consoleChannel . show ( vscode . ViewColumn . Three ) ;
183
+ } )
184
+ ] ;
179
185
180
186
this . consoleChannel = vscode . window . createOutputChannel ( "PowerShell Output" ) ;
181
187
}
@@ -197,7 +203,7 @@ export class ConsoleFeature implements IFeature {
197
203
}
198
204
199
205
public dispose ( ) {
200
- this . command . dispose ( ) ;
206
+ this . commands . forEach ( command => command . dispose ( ) ) ;
201
207
this . consoleChannel . dispose ( ) ;
202
208
}
203
209
}
You can’t perform that action at this time.
0 commit comments