Skip to content

Commit 7b8eedb

Browse files
committed
Use id over label
1 parent 9094e49 commit 7b8eedb

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/vs/workbench/contrib/output/browser/output.contribution.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,10 @@ class OutputContribution extends Disposable implements IWorkbenchContribution {
371371
description: {
372372
description: 'workbench.action.openLogFile',
373373
args: [{
374-
name: 'args',
374+
name: 'logFile',
375375
schema: {
376-
type: 'object',
377-
properties: {
378-
logFile: {
379-
description: nls.localize('logFile', "The name of the log file to open, for example \"Extension Host\""),
380-
type: 'string'
381-
}
382-
}
376+
markdownDescription: nls.localize('logFile', "The id of the log file to open, for example `\"window\"`. Currently the best way to get this is to get the ID by checking the `workbench.action.output.show.<id>` commands"),
377+
type: 'string'
383378
}
384379
}]
385380
},
@@ -394,10 +389,10 @@ class OutputContribution extends Disposable implements IWorkbenchContribution {
394389
const entries: IOutputChannelQuickPickItem[] = outputService.getChannelDescriptors().filter(c => c.file && c.log)
395390
.map(channel => (<IOutputChannelQuickPickItem>{ id: channel.id, label: channel.label, channel }));
396391

397-
const argName = args && typeof args === 'object' && 'logFile' in args && typeof args.logFile === 'string' ? args.logFile : undefined;
392+
const argName = args && typeof args === 'string' ? args : undefined;
398393
let entry: IOutputChannelQuickPickItem | undefined;
399394
if (argName) {
400-
entry = entries.find(e => e.label === argName);
395+
entry = entries.find(e => e.id === argName);
401396
}
402397
if (!entry) {
403398
entry = await quickInputService.pick(entries, { placeHolder: nls.localize('selectlogFile', "Select Log File") });

0 commit comments

Comments
 (0)