File tree Expand file tree Collapse file tree
src/vs/workbench/parts/output/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
2020import { Registry } from 'vs/platform/registry/common/platform' ;
2121import { groupBy } from 'vs/base/common/arrays' ;
2222import { ICommandService } from 'vs/platform/commands/common/commands' ;
23+ import { URI } from 'vs/base/common/uri' ;
2324
2425export class ToggleOutputAction extends TogglePanelAction {
2526
@@ -179,16 +180,16 @@ export class OpenLogOutputFile extends Action {
179180 }
180181
181182 private update ( ) : void {
182- this . enabled = this . isLogChannel ( ) ;
183+ this . enabled = ! ! this . getLogFile ( ) ;
183184 }
184185
185186 public run ( ) : TPromise < any > {
186- return this . commandService . executeCommand ( COMMAND_OPEN_LOG_VIEWER , this . isLogChannel ( ) ) ;
187+ return this . commandService . executeCommand ( COMMAND_OPEN_LOG_VIEWER , this . getLogFile ( ) ) ;
187188 }
188189
189- private isLogChannel ( ) : boolean {
190+ private getLogFile ( ) : URI {
190191 const channel = this . outputService . getActiveChannel ( ) ;
191192 const descriptor = channel ? this . outputService . getChannelDescriptors ( ) . filter ( c => c . id === channel . id ) [ 0 ] : null ;
192- return descriptor && descriptor . log ;
193+ return descriptor && descriptor . log ? descriptor . file : null ;
193194 }
194195}
You can’t perform that action at this time.
0 commit comments