@codingame/monaco-vscode-output-service-override 22.1.9 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -9
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +64 -47
- package/vscode/src/vs/workbench/contrib/output/browser/outputServices.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/output/browser/outputServices.js +14 -11
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +22 -22
- package/vscode/src/vs/workbench/contrib/output/common/outputLinkComputer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/output/common/outputLinkComputer.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-output-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - output service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-log-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-16b9b017-9377-5198-9904-c344b3b2ad14-common": "23.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "23.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-523730aa-81e6-55d7-9916-87ad537fe087-common": "23.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-ab07af84-42e8-5a0f-8aef-b83fb90ede21-common": "23.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-api": "23.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-log-service-override": "23.0.0"
|
|
26
26
|
},
|
|
27
27
|
"main": "index.js",
|
|
28
28
|
"module": "index.js",
|
|
@@ -40,6 +40,7 @@ import { ViewAction } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29
|
|
|
40
40
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
41
41
|
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
42
42
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
43
|
+
import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
43
44
|
|
|
44
45
|
const IMPORTED_LOG_ID_PREFIX = 'importedLog.';
|
|
45
46
|
ModesRegistry.registerLanguage({
|
|
@@ -52,10 +53,10 @@ ModesRegistry.registerLanguage({
|
|
|
52
53
|
extensions: [],
|
|
53
54
|
mimetypes: [LOG_MIME]
|
|
54
55
|
});
|
|
55
|
-
const outputViewIcon = registerIcon('output-view-icon', Codicon.output, ( localize(
|
|
56
|
+
const outputViewIcon = registerIcon('output-view-icon', Codicon.output, ( localize(9602, 'View icon of the output view.')));
|
|
56
57
|
const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
57
58
|
id: OUTPUT_VIEW_ID,
|
|
58
|
-
title: ( localize2(
|
|
59
|
+
title: ( localize2(9603, "Output")),
|
|
59
60
|
icon: outputViewIcon,
|
|
60
61
|
order: 1,
|
|
61
62
|
ctorDescriptor: ( new SyncDescriptor(
|
|
@@ -67,14 +68,14 @@ const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registe
|
|
|
67
68
|
}, ViewContainerLocation.Panel, { doNotRegisterOpenCommand: true });
|
|
68
69
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
69
70
|
id: OUTPUT_VIEW_ID,
|
|
70
|
-
name: ( localize2(
|
|
71
|
+
name: ( localize2(9603, "Output")),
|
|
71
72
|
containerIcon: outputViewIcon,
|
|
72
73
|
canMoveView: true,
|
|
73
74
|
canToggleVisibility: true,
|
|
74
75
|
ctorDescriptor: ( new SyncDescriptor(OutputViewPane)),
|
|
75
76
|
openCommandActionDescriptor: {
|
|
76
77
|
id: 'workbench.action.output.toggleOutput',
|
|
77
|
-
mnemonicTitle: ( localize(
|
|
78
|
+
mnemonicTitle: ( localize(9604, "&&Output")),
|
|
78
79
|
keybindings: {
|
|
79
80
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyU,
|
|
80
81
|
linux: {
|
|
@@ -114,7 +115,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
114
115
|
constructor() {
|
|
115
116
|
super({
|
|
116
117
|
id: `workbench.output.action.switchBetweenOutputs`,
|
|
117
|
-
title: ( localize(
|
|
118
|
+
title: ( localize(9605, "Switch Output")),
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
async run(accessor, channelId) {
|
|
@@ -126,7 +127,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
126
127
|
const switchOutputMenu = ( new MenuId('workbench.output.menu.switchOutput'));
|
|
127
128
|
this._register(MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
128
129
|
submenu: switchOutputMenu,
|
|
129
|
-
title: ( localize(
|
|
130
|
+
title: ( localize(9606, "Switch Output")),
|
|
130
131
|
group: 'navigation',
|
|
131
132
|
when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
|
|
132
133
|
order: 1,
|
|
@@ -174,8 +175,8 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
174
175
|
constructor() {
|
|
175
176
|
super({
|
|
176
177
|
id: 'workbench.action.output.addCompoundLog',
|
|
177
|
-
title: ( localize2(
|
|
178
|
-
category: ( localize2(
|
|
178
|
+
title: ( localize2(9607, "Add Compound Log...")),
|
|
179
|
+
category: ( localize2(9603, "Output")),
|
|
179
180
|
f1: true,
|
|
180
181
|
menu: [{
|
|
181
182
|
id: MenuId.ViewTitle,
|
|
@@ -203,12 +204,12 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
203
204
|
entries.push(log);
|
|
204
205
|
}
|
|
205
206
|
if (extensionLogs.length && logs.length) {
|
|
206
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
207
|
+
entries.push({ type: 'separator', label: ( localize(9608, "Extension Logs")) });
|
|
207
208
|
}
|
|
208
209
|
for (const log of extensionLogs.sort((a, b) => a.label.localeCompare(b.label))) {
|
|
209
210
|
entries.push(log);
|
|
210
211
|
}
|
|
211
|
-
const result = await quickInputService.pick(entries, { placeHolder: ( localize(
|
|
212
|
+
const result = await quickInputService.pick(entries, { placeHolder: ( localize(9609, "Select Log")), canPickMany: true });
|
|
212
213
|
if (result?.length) {
|
|
213
214
|
outputService.showChannel(outputService.registerCompoundLogChannel(result));
|
|
214
215
|
}
|
|
@@ -220,8 +221,8 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
220
221
|
constructor() {
|
|
221
222
|
super({
|
|
222
223
|
id: 'workbench.action.output.remove',
|
|
223
|
-
title: ( localize2(
|
|
224
|
-
category: ( localize2(
|
|
224
|
+
title: ( localize2(9610, "Remove Output...")),
|
|
225
|
+
category: ( localize2(9603, "Output")),
|
|
225
226
|
f1: true
|
|
226
227
|
});
|
|
227
228
|
}
|
|
@@ -231,10 +232,10 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
231
232
|
const notificationService = accessor.get(INotificationService);
|
|
232
233
|
const entries = outputService.getChannelDescriptors().filter(channel => channel.user);
|
|
233
234
|
if (entries.length === 0) {
|
|
234
|
-
notificationService.info(( localize(
|
|
235
|
+
notificationService.info(( localize(9611, "No custom outputs to remove.")));
|
|
235
236
|
return;
|
|
236
237
|
}
|
|
237
|
-
const result = await quickInputService.pick(entries, { placeHolder: ( localize(
|
|
238
|
+
const result = await quickInputService.pick(entries, { placeHolder: ( localize(9609, "Select Log")), canPickMany: true });
|
|
238
239
|
if (!result?.length) {
|
|
239
240
|
return;
|
|
240
241
|
}
|
|
@@ -250,8 +251,8 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
250
251
|
constructor() {
|
|
251
252
|
super({
|
|
252
253
|
id: 'workbench.action.showOutputChannels',
|
|
253
|
-
title: ( localize2(
|
|
254
|
-
category: ( localize2(
|
|
254
|
+
title: ( localize2(9612, "Show Output Channels...")),
|
|
255
|
+
category: ( localize2(9603, "Output")),
|
|
255
256
|
f1: true
|
|
256
257
|
});
|
|
257
258
|
}
|
|
@@ -277,7 +278,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
277
278
|
for (const { id, label } of coreChannels) {
|
|
278
279
|
entries.push({ id, label });
|
|
279
280
|
}
|
|
280
|
-
const entry = await quickInputService.pick(entries, { placeHolder: ( localize(
|
|
281
|
+
const entry = await quickInputService.pick(entries, { placeHolder: ( localize(9613, "Select Output Channel")) });
|
|
281
282
|
if (entry) {
|
|
282
283
|
return outputService.showChannel(entry.id);
|
|
283
284
|
}
|
|
@@ -289,7 +290,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
289
290
|
constructor() {
|
|
290
291
|
super({
|
|
291
292
|
id: `workbench.output.action.clearOutput`,
|
|
292
|
-
title: ( localize2(
|
|
293
|
+
title: ( localize2(9614, "Clear Output")),
|
|
293
294
|
category: Categories.View,
|
|
294
295
|
menu: [{
|
|
295
296
|
id: MenuId.ViewTitle,
|
|
@@ -321,8 +322,8 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
321
322
|
constructor() {
|
|
322
323
|
super({
|
|
323
324
|
id: `workbench.output.action.toggleAutoScroll`,
|
|
324
|
-
title: ( localize2(
|
|
325
|
-
tooltip: ( localize(
|
|
325
|
+
title: ( localize2(9615, "Toggle Auto Scrolling")),
|
|
326
|
+
tooltip: ( localize(9616, "Turn Auto Scrolling Off")),
|
|
326
327
|
menu: {
|
|
327
328
|
id: MenuId.ViewTitle,
|
|
328
329
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)))),
|
|
@@ -333,7 +334,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
333
334
|
toggled: {
|
|
334
335
|
condition: CONTEXT_OUTPUT_SCROLL_LOCK,
|
|
335
336
|
icon: Codicon.unlock,
|
|
336
|
-
tooltip: ( localize(
|
|
337
|
+
tooltip: ( localize(9617, "Turn Auto Scrolling On"))
|
|
337
338
|
}
|
|
338
339
|
});
|
|
339
340
|
}
|
|
@@ -349,7 +350,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
349
350
|
constructor() {
|
|
350
351
|
super({
|
|
351
352
|
id: `workbench.action.openActiveLogOutputFile`,
|
|
352
|
-
title: ( localize2(
|
|
353
|
+
title: ( localize2(9618, "Open Output in Editor")),
|
|
353
354
|
menu: [{
|
|
354
355
|
id: MenuId.ViewTitle,
|
|
355
356
|
when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
|
|
@@ -371,7 +372,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
371
372
|
constructor() {
|
|
372
373
|
super({
|
|
373
374
|
id: `workbench.action.openActiveLogOutputFileInNewWindow`,
|
|
374
|
-
title: ( localize2(
|
|
375
|
+
title: ( localize2(9619, "Open Output in New Window")),
|
|
375
376
|
menu: [{
|
|
376
377
|
id: MenuId.ViewTitle,
|
|
377
378
|
when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
|
|
@@ -392,7 +393,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
392
393
|
constructor() {
|
|
393
394
|
super({
|
|
394
395
|
id: `workbench.action.saveActiveLogOutputAs`,
|
|
395
|
-
title: ( localize2(
|
|
396
|
+
title: ( localize2(9620, "Save Output As...")),
|
|
396
397
|
menu: [{
|
|
397
398
|
id: MenuId.ViewTitle,
|
|
398
399
|
when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
|
|
@@ -407,7 +408,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
407
408
|
if (channel) {
|
|
408
409
|
const descriptor = outputService.getChannelDescriptors().find(c => c.id === channel.id);
|
|
409
410
|
if (descriptor) {
|
|
410
|
-
await outputService.saveOutputAs(descriptor);
|
|
411
|
+
await outputService.saveOutputAs(undefined, descriptor);
|
|
411
412
|
}
|
|
412
413
|
}
|
|
413
414
|
}
|
|
@@ -428,7 +429,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
428
429
|
const logLevelMenu = ( new MenuId('workbench.output.menu.logLevel'));
|
|
429
430
|
this._register(MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
430
431
|
submenu: logLevelMenu,
|
|
431
|
-
title: ( localize(
|
|
432
|
+
title: ( localize(9621, "Set Log Level...")),
|
|
432
433
|
group: 'navigation',
|
|
433
434
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)), CONTEXT_ACTIVE_OUTPUT_LEVEL_SETTABLE)),
|
|
434
435
|
icon: Codicon.gear,
|
|
@@ -471,7 +472,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
471
472
|
constructor() {
|
|
472
473
|
super({
|
|
473
474
|
id: `workbench.action.output.activeOutputLogLevelDefault`,
|
|
474
|
-
title: ( localize(
|
|
475
|
+
title: ( localize(9622, "Set As Default")),
|
|
475
476
|
menu: {
|
|
476
477
|
id: logLevelMenu,
|
|
477
478
|
order,
|
|
@@ -500,7 +501,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
500
501
|
constructor() {
|
|
501
502
|
super({
|
|
502
503
|
id: 'workbench.action.showLogs',
|
|
503
|
-
title: ( localize2(
|
|
504
|
+
title: ( localize2(9623, "Show Logs...")),
|
|
504
505
|
category: Categories.Developer,
|
|
505
506
|
menu: {
|
|
506
507
|
id: MenuId.CommandPalette,
|
|
@@ -526,12 +527,12 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
526
527
|
entries.push({ id, label });
|
|
527
528
|
}
|
|
528
529
|
if (extensionLogs.length && logs.length) {
|
|
529
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
530
|
+
entries.push({ type: 'separator', label: ( localize(9608, "Extension Logs")) });
|
|
530
531
|
}
|
|
531
532
|
for (const { id, label } of extensionLogs) {
|
|
532
533
|
entries.push({ id, label });
|
|
533
534
|
}
|
|
534
|
-
const entry = await quickInputService.pick(entries, { placeHolder: ( localize(
|
|
535
|
+
const entry = await quickInputService.pick(entries, { placeHolder: ( localize(9609, "Select Log")) });
|
|
535
536
|
if (entry) {
|
|
536
537
|
return outputService.showChannel(entry.id);
|
|
537
538
|
}
|
|
@@ -543,7 +544,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
543
544
|
constructor() {
|
|
544
545
|
super({
|
|
545
546
|
id: 'workbench.action.openLogFile',
|
|
546
|
-
title: ( localize2(
|
|
547
|
+
title: ( localize2(9624, "Open Log...")),
|
|
547
548
|
category: Categories.Developer,
|
|
548
549
|
menu: {
|
|
549
550
|
id: MenuId.CommandPalette,
|
|
@@ -554,7 +555,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
554
555
|
name: 'logFile',
|
|
555
556
|
schema: {
|
|
556
557
|
markdownDescription: ( localize(
|
|
557
|
-
|
|
558
|
+
9625,
|
|
558
559
|
"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"
|
|
559
560
|
)),
|
|
560
561
|
type: 'string'
|
|
@@ -591,7 +592,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
591
592
|
entries.push({ type: 'separator' });
|
|
592
593
|
entries.push(...coreChannels.sort((a, b) => a.label.localeCompare(b.label)));
|
|
593
594
|
}
|
|
594
|
-
entry = await quickInputService.pick(entries, { placeHolder: ( localize(
|
|
595
|
+
entry = await quickInputService.pick(entries, { placeHolder: ( localize(9626, "Select Log File")) });
|
|
595
596
|
}
|
|
596
597
|
if (entry?.id) {
|
|
597
598
|
const channel = outputService.getChannel(entry.id);
|
|
@@ -617,7 +618,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
617
618
|
title: LogLevelToLocalizedString(logLevel).value,
|
|
618
619
|
metadata: {
|
|
619
620
|
description: ( localize2(
|
|
620
|
-
|
|
621
|
+
9627,
|
|
621
622
|
"Show or hide {0} messages in the output",
|
|
622
623
|
LogLevelToString(logLevel)
|
|
623
624
|
))
|
|
@@ -667,7 +668,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
667
668
|
constructor() {
|
|
668
669
|
super({
|
|
669
670
|
id: `workbench.actions.${OUTPUT_VIEW_ID}.clearFilterText`,
|
|
670
|
-
title: ( localize(
|
|
671
|
+
title: ( localize(9628, "Clear filters text")),
|
|
671
672
|
keybinding: {
|
|
672
673
|
when: OUTPUT_FILTER_FOCUS_CONTEXT,
|
|
673
674
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -686,7 +687,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
686
687
|
constructor() {
|
|
687
688
|
super({
|
|
688
689
|
id: `workbench.action.exportLogs`,
|
|
689
|
-
title: ( localize2(
|
|
690
|
+
title: ( localize2(9629, "Export Logs...")),
|
|
690
691
|
f1: true,
|
|
691
692
|
category: Categories.Developer,
|
|
692
693
|
menu: [{
|
|
@@ -697,7 +698,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
697
698
|
}],
|
|
698
699
|
});
|
|
699
700
|
}
|
|
700
|
-
async run(accessor) {
|
|
701
|
+
async run(accessor, arg) {
|
|
701
702
|
const outputService = accessor.get(IOutputService);
|
|
702
703
|
const quickInputService = accessor.get(IQuickInputService);
|
|
703
704
|
const extensionLogs = [], logs = [], userLogs = [];
|
|
@@ -719,20 +720,36 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
719
720
|
entries.push(log);
|
|
720
721
|
}
|
|
721
722
|
if (extensionLogs.length && logs.length) {
|
|
722
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
723
|
+
entries.push({ type: 'separator', label: ( localize(9608, "Extension Logs")) });
|
|
723
724
|
}
|
|
724
725
|
for (const log of extensionLogs.sort((a, b) => a.label.localeCompare(b.label))) {
|
|
725
726
|
entries.push(log);
|
|
726
727
|
}
|
|
727
728
|
if (userLogs.length && (extensionLogs.length || logs.length)) {
|
|
728
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
729
|
+
entries.push({ type: 'separator', label: ( localize(9630, "User Logs")) });
|
|
729
730
|
}
|
|
730
731
|
for (const log of userLogs.sort((a, b) => a.label.localeCompare(b.label))) {
|
|
731
732
|
entries.push(log);
|
|
732
733
|
}
|
|
733
|
-
|
|
734
|
-
if (
|
|
735
|
-
|
|
734
|
+
let selectedOutputChannels;
|
|
735
|
+
if (arg?.outputChannelIds) {
|
|
736
|
+
const requestedIdsNormalized = ( arg.outputChannelIds.map(id => id.trim().toLowerCase()));
|
|
737
|
+
const candidates = entries.filter((e) => {
|
|
738
|
+
const isSeparator = hasKey(e, { type: true }) && e.type === 'separator';
|
|
739
|
+
return !isSeparator;
|
|
740
|
+
});
|
|
741
|
+
if (requestedIdsNormalized.includes('*')) {
|
|
742
|
+
selectedOutputChannels = candidates;
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
selectedOutputChannels = candidates.filter(candidate => requestedIdsNormalized.includes(candidate.id.toLowerCase()));
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
selectedOutputChannels = await quickInputService.pick(entries, { placeHolder: ( localize(9609, "Select Log")), canPickMany: true });
|
|
750
|
+
}
|
|
751
|
+
if (selectedOutputChannels?.length) {
|
|
752
|
+
await outputService.saveOutputAs(arg?.outputPath, ...selectedOutputChannels);
|
|
736
753
|
}
|
|
737
754
|
}
|
|
738
755
|
}));
|
|
@@ -742,7 +759,7 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
742
759
|
constructor() {
|
|
743
760
|
super({
|
|
744
761
|
id: `workbench.action.importLog`,
|
|
745
|
-
title: ( localize2(
|
|
762
|
+
title: ( localize2(9631, "Import Log...")),
|
|
746
763
|
f1: true,
|
|
747
764
|
category: Categories.Developer,
|
|
748
765
|
menu: [{
|
|
@@ -757,12 +774,12 @@ let OutputContribution = class OutputContribution extends Disposable {
|
|
|
757
774
|
const outputService = accessor.get(IOutputService);
|
|
758
775
|
const fileDialogService = accessor.get(IFileDialogService);
|
|
759
776
|
const result = await fileDialogService.showOpenDialog({
|
|
760
|
-
title: ( localize(
|
|
777
|
+
title: ( localize(9632, "Import Log File")),
|
|
761
778
|
canSelectFiles: true,
|
|
762
779
|
canSelectFolders: false,
|
|
763
780
|
canSelectMany: true,
|
|
764
781
|
filters: [{
|
|
765
|
-
name: ( localize(
|
|
782
|
+
name: ( localize(9633, "Log Files")),
|
|
766
783
|
extensions: ['log']
|
|
767
784
|
}]
|
|
768
785
|
});
|
|
@@ -792,13 +809,13 @@ OutputContribution = ( __decorate([
|
|
|
792
809
|
( Registry.as(Extensions$3.Configuration)).registerConfiguration({
|
|
793
810
|
id: 'output',
|
|
794
811
|
order: 30,
|
|
795
|
-
title: ( localize(
|
|
812
|
+
title: ( localize(9603, "Output")),
|
|
796
813
|
type: 'object',
|
|
797
814
|
properties: {
|
|
798
815
|
'output.smartScroll.enabled': {
|
|
799
816
|
type: 'boolean',
|
|
800
817
|
description: ( localize(
|
|
801
|
-
|
|
818
|
+
9634,
|
|
802
819
|
"Enable/disable the ability of smart scrolling in the output view. Smart scrolling allows you to lock scrolling automatically when you click in the output view and unlocks when you click in the last line."
|
|
803
820
|
)),
|
|
804
821
|
default: true,
|
|
@@ -114,7 +114,7 @@ export declare class OutputService extends Disposable implements IOutputService,
|
|
|
114
114
|
getLogLevel(channel: IOutputChannelDescriptor): LogLevel | undefined;
|
|
115
115
|
setLogLevel(channel: IOutputChannelDescriptor, logLevel: LogLevel): void;
|
|
116
116
|
registerCompoundLogChannel(descriptors: IOutputChannelDescriptor[]): string;
|
|
117
|
-
saveOutputAs(...channels: IOutputChannelDescriptor[]): Promise<void>;
|
|
117
|
+
saveOutputAs(outputPath?: URI, ...channels: IOutputChannelDescriptor[]): Promise<void>;
|
|
118
118
|
private onDidRegisterChannel;
|
|
119
119
|
private onDidUpdateChannelSources;
|
|
120
120
|
private onDidRemoveChannel;
|
|
@@ -318,7 +318,7 @@ let OutputService = class OutputService extends Disposable {
|
|
|
318
318
|
}
|
|
319
319
|
return id;
|
|
320
320
|
}
|
|
321
|
-
async saveOutputAs(...channels) {
|
|
321
|
+
async saveOutputAs(outputPath, ...channels) {
|
|
322
322
|
let channel;
|
|
323
323
|
if (channels.length > 1) {
|
|
324
324
|
const compoundChannelId = this.registerCompoundLogChannel(channels);
|
|
@@ -331,16 +331,19 @@ let OutputService = class OutputService extends Disposable {
|
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
333
|
try {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
334
|
+
let uri = outputPath;
|
|
335
|
+
if (!uri) {
|
|
336
|
+
const name = channels.length > 1 ? 'output' : channels[0].label;
|
|
337
|
+
uri = await this.fileDialogService.showSaveDialog({
|
|
338
|
+
title: ( localize(9635, "Save Output As")),
|
|
339
|
+
availableFileSystems: [Schemas.file],
|
|
340
|
+
defaultUri: joinPath(await this.fileDialogService.defaultFilePath(), `${name}.log`),
|
|
341
|
+
filters: [{
|
|
342
|
+
name,
|
|
343
|
+
extensions: ['log']
|
|
344
|
+
}]
|
|
345
|
+
});
|
|
346
|
+
}
|
|
344
347
|
if (!uri) {
|
|
345
348
|
return;
|
|
346
349
|
}
|
|
@@ -18,11 +18,11 @@ import { IViewPaneOptions, FilterViewPane } from "@codingame/monaco-vscode-501b0
|
|
|
18
18
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
19
19
|
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
20
20
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
21
|
-
import { TextResourceEditorInput } from "@codingame/monaco-vscode-
|
|
21
|
+
import { TextResourceEditorInput } from "@codingame/monaco-vscode-16b9b017-9377-5198-9904-c344b3b2ad14-common/vscode/vs/workbench/common/editor/textResourceEditorInput";
|
|
22
22
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
23
23
|
import { ITextEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
|
|
24
24
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
25
|
-
import { IEditorConfiguration } from "@codingame/monaco-vscode-
|
|
25
|
+
import { IEditorConfiguration } from "@codingame/monaco-vscode-a6a3e03d-2b1a-5e17-b904-ed5d40c14550-common/vscode/vs/workbench/browser/parts/editor/textEditor";
|
|
26
26
|
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
27
27
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
28
28
|
import { ICodeEditorWidgetOptions } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget";
|
|
@@ -22,7 +22,7 @@ import { FilterViewPane } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a
|
|
|
22
22
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
23
23
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
24
24
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
25
|
-
import { TextResourceEditorInput } from '@codingame/monaco-vscode-
|
|
25
|
+
import { TextResourceEditorInput } from '@codingame/monaco-vscode-16b9b017-9377-5198-9904-c344b3b2ad14-common/vscode/vs/workbench/common/editor/textResourceEditorInput';
|
|
26
26
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
27
27
|
import { Dimension } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
28
28
|
import { createCancelablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
@@ -52,9 +52,9 @@ let OutputViewPane = class OutputViewPane extends FilterViewPane {
|
|
|
52
52
|
super({
|
|
53
53
|
...options,
|
|
54
54
|
filterOptions: {
|
|
55
|
-
placeholder: ( localize(
|
|
55
|
+
placeholder: ( localize(9636, "Filter")),
|
|
56
56
|
focusContextKey: OUTPUT_FILTER_FOCUS_CONTEXT.key,
|
|
57
|
-
text: viewState
|
|
57
|
+
text: viewState.filter || '',
|
|
58
58
|
history: []
|
|
59
59
|
}
|
|
60
60
|
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
|
|
@@ -63,13 +63,13 @@ let OutputViewPane = class OutputViewPane extends FilterViewPane {
|
|
|
63
63
|
this.memento = memento;
|
|
64
64
|
this.panelState = viewState;
|
|
65
65
|
const filters = outputService.filters;
|
|
66
|
-
filters.text = this.panelState
|
|
67
|
-
filters.trace = this.panelState
|
|
68
|
-
filters.debug = this.panelState
|
|
69
|
-
filters.info = this.panelState
|
|
70
|
-
filters.warning = this.panelState
|
|
71
|
-
filters.error = this.panelState
|
|
72
|
-
filters.categories = this.panelState
|
|
66
|
+
filters.text = this.panelState.filter || '';
|
|
67
|
+
filters.trace = this.panelState.showTrace ?? true;
|
|
68
|
+
filters.debug = this.panelState.showDebug ?? true;
|
|
69
|
+
filters.info = this.panelState.showInfo ?? true;
|
|
70
|
+
filters.warning = this.panelState.showWarning ?? true;
|
|
71
|
+
filters.error = this.panelState.showError ?? true;
|
|
72
|
+
filters.categories = this.panelState.categories ?? '';
|
|
73
73
|
this.scrollLockContextKey = CONTEXT_OUTPUT_SCROLL_LOCK.bindTo(this.contextKeyService);
|
|
74
74
|
const editorInstantiationService = this._register(instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService]))));
|
|
75
75
|
this.editor = this._register(editorInstantiationService.createInstance(OutputEditor));
|
|
@@ -138,7 +138,7 @@ let OutputViewPane = class OutputViewPane extends FilterViewPane {
|
|
|
138
138
|
const input = this.createInput(channel);
|
|
139
139
|
if (!this.editor.input || !input.matches(this.editor.input)) {
|
|
140
140
|
this.editorPromise?.cancel();
|
|
141
|
-
this.editorPromise = createCancelablePromise(token => this.editor.setInput(
|
|
141
|
+
this.editorPromise = createCancelablePromise(token => this.editor.setInput(input, { preserveFocus: true }, Object.create(null), token));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
checkMoreFilters() {
|
|
@@ -151,17 +151,17 @@ let OutputViewPane = class OutputViewPane extends FilterViewPane {
|
|
|
151
151
|
this.editorPromise = null;
|
|
152
152
|
}
|
|
153
153
|
createInput(channel) {
|
|
154
|
-
return this.instantiationService.createInstance(TextResourceEditorInput, channel.uri, ( localize(
|
|
154
|
+
return this.instantiationService.createInstance(TextResourceEditorInput, channel.uri, ( localize(9637, "{0} - Output", channel.label)), ( localize(9638, "Output channel for '{0}'", channel.label)), undefined, undefined);
|
|
155
155
|
}
|
|
156
156
|
saveState() {
|
|
157
157
|
const filters = this.outputService.filters;
|
|
158
|
-
this.panelState
|
|
159
|
-
this.panelState
|
|
160
|
-
this.panelState
|
|
161
|
-
this.panelState
|
|
162
|
-
this.panelState
|
|
163
|
-
this.panelState
|
|
164
|
-
this.panelState
|
|
158
|
+
this.panelState.filter = filters.text;
|
|
159
|
+
this.panelState.showTrace = filters.trace;
|
|
160
|
+
this.panelState.showDebug = filters.debug;
|
|
161
|
+
this.panelState.showInfo = filters.info;
|
|
162
|
+
this.panelState.showWarning = filters.warning;
|
|
163
|
+
this.panelState.showError = filters.error;
|
|
164
|
+
this.panelState.categories = filters.categories;
|
|
165
165
|
this.memento.saveMemento();
|
|
166
166
|
super.saveState();
|
|
167
167
|
}
|
|
@@ -189,7 +189,7 @@ let OutputEditor = class OutputEditor extends AbstractTextResourceEditor {
|
|
|
189
189
|
return OUTPUT_VIEW_ID;
|
|
190
190
|
}
|
|
191
191
|
getTitle() {
|
|
192
|
-
return localize(
|
|
192
|
+
return localize(9639, "Output");
|
|
193
193
|
}
|
|
194
194
|
getConfigurationOverrides(configuration) {
|
|
195
195
|
const options = super.getConfigurationOverrides(configuration);
|
|
@@ -216,14 +216,14 @@ let OutputEditor = class OutputEditor extends AbstractTextResourceEditor {
|
|
|
216
216
|
if (outputConfig['editor.minimap.enabled']) {
|
|
217
217
|
options.minimap = { enabled: true };
|
|
218
218
|
}
|
|
219
|
-
if ('editor.wordWrap'
|
|
219
|
+
if (outputConfig['editor.wordWrap']) {
|
|
220
220
|
options.wordWrap = outputConfig['editor.wordWrap'];
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
return options;
|
|
224
224
|
}
|
|
225
225
|
getAriaLabel() {
|
|
226
|
-
return this.input ? this.input.getAriaLabel() : ( localize(
|
|
226
|
+
return this.input ? this.input.getAriaLabel() : ( localize(9640, "Output panel"));
|
|
227
227
|
}
|
|
228
228
|
computeAriaLabel() {
|
|
229
229
|
return this.input ? computeEditorAriaLabel(this.input, undefined, undefined, this.editorGroupService.count) : this.getAriaLabel();
|
|
@@ -5,7 +5,7 @@ export interface IResourceCreator {
|
|
|
5
5
|
toResource: (folderRelativePath: string) => URI | null;
|
|
6
6
|
}
|
|
7
7
|
export declare class OutputLinkComputer implements IWebWorkerServerRequestHandler {
|
|
8
|
-
_requestHandlerBrand:
|
|
8
|
+
_requestHandlerBrand: void;
|
|
9
9
|
private readonly workerTextModelSyncServer;
|
|
10
10
|
private patterns;
|
|
11
11
|
constructor(workerServer: IWebWorkerServer);
|
|
@@ -10,6 +10,7 @@ import { WorkerTextModelSyncServer } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
10
10
|
|
|
11
11
|
class OutputLinkComputer {
|
|
12
12
|
constructor(workerServer) {
|
|
13
|
+
this._requestHandlerBrand = undefined;
|
|
13
14
|
this.workerTextModelSyncServer = ( new WorkerTextModelSyncServer());
|
|
14
15
|
this.patterns = ( new Map());
|
|
15
16
|
this.workerTextModelSyncServer.bindToServer(workerServer);
|