@codingame/monaco-vscode-output-service-override 3.2.3 → 4.1.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/output.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
2
- import { OutputService } from './vscode/src/vs/workbench/contrib/output/browser/outputServices.js';
2
+ import { OutputService } from 'vscode/vscode/vs/workbench/contrib/output/browser/outputServices';
3
3
  import { IOutputService } from 'vscode/vscode/vs/workbench/services/output/common/output';
4
4
  import { IOutputChannelModelService, OutputChannelModelService } from 'vscode/vscode/vs/workbench/contrib/output/common/outputChannelModelService';
5
5
  import getServiceOverride$1 from '@codingame/monaco-vscode-log-service-override';
6
- import './vscode/src/vs/workbench/contrib/output/browser/output.contribution.js';
6
+ import 'vscode/vscode/vs/workbench/contrib/output/browser/output.contribution';
7
7
 
8
8
  function getServiceOverride(logLevel) {
9
9
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-output-service-override",
3
- "version": "3.2.3",
3
+ "version": "4.1.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,8 +18,8 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@3.2.3",
22
- "@codingame/monaco-vscode-log-service-override": "3.2.3"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@4.1.0",
22
+ "@codingame/monaco-vscode-log-service-override": "4.1.0"
23
23
  },
24
24
  "exports": {
25
25
  ".": {
@@ -55,7 +55,7 @@ class OutputLinkComputer {
55
55
  workspaceFolderVariants.push(toSlashes(workspaceFolderPath));
56
56
  }
57
57
  for (const workspaceFolderVariant of workspaceFolderVariants) {
58
- const validPathCharacterPattern = '[^\\s\\(\\):<>"]';
58
+ const validPathCharacterPattern = '[^\\s\\(\\):<>\'"]';
59
59
  const validPathCharacterOrSpacePattern = `(?:${validPathCharacterPattern}| ${validPathCharacterPattern})`;
60
60
  const pathPattern = `${validPathCharacterOrSpacePattern}+\\.${validPathCharacterPattern}+`;
61
61
  const strictPathPattern = `${validPathCharacterPattern}+`;
@@ -1,3 +0,0 @@
1
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=( Object.keys(r.attributes)),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
2
-
3
- export { n as default };
@@ -1,11 +0,0 @@
1
- function __decorate(decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- }
7
- function __param(paramIndex, decorator) {
8
- return function (target, key) { decorator(target, key, paramIndex); }
9
- }
10
-
11
- export { __decorate, __param };
@@ -1,534 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
3
- import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
4
- import { ModesRegistry } from 'vscode/vscode/vs/editor/common/languages/modesRegistry';
5
- import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
6
- import { registerAction2, Action2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
7
- import { OUTPUT_MODE_ID, OUTPUT_MIME, LOG_MODE_ID, LOG_MIME, OUTPUT_VIEW_ID, IOutputService, Extensions as Extensions$3, CONTEXT_IN_OUTPUT, CONTEXT_OUTPUT_SCROLL_LOCK, CONTEXT_ACTIVE_FILE_OUTPUT, ACTIVE_OUTPUT_CHANNEL_CONTEXT } from 'vscode/vscode/vs/workbench/services/output/common/output';
8
- import { OutputViewPane } from './outputView.js';
9
- import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
10
- import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
11
- import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
12
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
13
- import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
14
- import { Extensions as Extensions$2 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
15
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
16
- import { AUX_WINDOW_GROUP, IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
17
- import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
18
- import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
19
- import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
20
- import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
21
- import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
22
- import { Disposable, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
23
- import { IFilesConfigurationService } from 'vscode/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService';
24
- import { IAccessibilitySignalService, AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
25
-
26
- ModesRegistry.registerLanguage({
27
- id: OUTPUT_MODE_ID,
28
- extensions: [],
29
- mimetypes: [OUTPUT_MIME]
30
- });
31
- ModesRegistry.registerLanguage({
32
- id: LOG_MODE_ID,
33
- extensions: [],
34
- mimetypes: [LOG_MIME]
35
- });
36
- const outputViewIcon = registerIcon('output-view-icon', Codicon.output, ( localizeWithPath(
37
- 'vs/workbench/contrib/output/browser/output.contribution',
38
- 'outputViewIcon',
39
- 'View icon of the output view.'
40
- )));
41
- const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
42
- id: OUTPUT_VIEW_ID,
43
- title: ( localize2WithPath(
44
- 'vs/workbench/contrib/output/browser/output.contribution',
45
- 'output',
46
- "Output"
47
- )),
48
- icon: outputViewIcon,
49
- order: 1,
50
- ctorDescriptor: ( new SyncDescriptor(
51
- ViewPaneContainer,
52
- [OUTPUT_VIEW_ID, { mergeViewWithContainerWhenSingleView: true }]
53
- )),
54
- storageId: OUTPUT_VIEW_ID,
55
- hideIfEmpty: true,
56
- }, 1 , { doNotRegisterOpenCommand: true });
57
- ( Registry.as(Extensions.ViewsRegistry)).registerViews([{
58
- id: OUTPUT_VIEW_ID,
59
- name: ( localize2WithPath(
60
- 'vs/workbench/contrib/output/browser/output.contribution',
61
- 'output',
62
- "Output"
63
- )),
64
- containerIcon: outputViewIcon,
65
- canMoveView: true,
66
- canToggleVisibility: false,
67
- ctorDescriptor: ( new SyncDescriptor(OutputViewPane)),
68
- openCommandActionDescriptor: {
69
- id: 'workbench.action.output.toggleOutput',
70
- mnemonicTitle: ( localizeWithPath(
71
- 'vs/workbench/contrib/output/browser/output.contribution',
72
- { key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] },
73
- "&&Output"
74
- )),
75
- keybindings: {
76
- primary: 2048 | 1024 | 51 ,
77
- linux: {
78
- primary: KeyChord(2048 | 41 , 2048 | 38 )
79
- }
80
- },
81
- order: 1,
82
- }
83
- }], VIEW_CONTAINER);
84
- let OutputContribution = class OutputContribution extends Disposable {
85
- constructor(outputService, editorService, fileConfigurationService) {
86
- super();
87
- this.outputService = outputService;
88
- this.editorService = editorService;
89
- this.fileConfigurationService = fileConfigurationService;
90
- this.registerActions();
91
- }
92
- registerActions() {
93
- this.registerSwitchOutputAction();
94
- this.registerShowOutputChannelsAction();
95
- this.registerClearOutputAction();
96
- this.registerToggleAutoScrollAction();
97
- this.registerOpenActiveOutputFileAction();
98
- this.registerOpenActiveOutputFileInAuxWindowAction();
99
- this.registerShowLogsAction();
100
- this.registerOpenLogFileAction();
101
- }
102
- registerSwitchOutputAction() {
103
- this._register(registerAction2(class extends Action2 {
104
- constructor() {
105
- super({
106
- id: `workbench.output.action.switchBetweenOutputs`,
107
- title: ( localizeWithPath(
108
- 'vs/workbench/contrib/output/browser/output.contribution',
109
- 'switchBetweenOutputs.label',
110
- "Switch Output"
111
- )),
112
- });
113
- }
114
- async run(accessor, channelId) {
115
- if (channelId) {
116
- accessor.get(IOutputService).showChannel(channelId, true);
117
- }
118
- }
119
- }));
120
- const switchOutputMenu = ( new MenuId('workbench.output.menu.switchOutput'));
121
- this._register(MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
122
- submenu: switchOutputMenu,
123
- title: ( localizeWithPath(
124
- 'vs/workbench/contrib/output/browser/output.contribution',
125
- 'switchToOutput.label',
126
- "Switch Output"
127
- )),
128
- group: 'navigation',
129
- when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
130
- order: 1,
131
- isSelection: true
132
- }));
133
- const registeredChannels = ( new Map());
134
- this._register(toDisposable(() => dispose(( registeredChannels.values()))));
135
- const registerOutputChannels = (channels) => {
136
- for (const channel of channels) {
137
- const title = channel.label;
138
- const group = channel.extensionId ? '0_ext_outputchannels' : '1_core_outputchannels';
139
- registeredChannels.set(channel.id, registerAction2(class extends Action2 {
140
- constructor() {
141
- super({
142
- id: `workbench.action.output.show.${channel.id}`,
143
- title,
144
- toggled: ( ACTIVE_OUTPUT_CHANNEL_CONTEXT.isEqualTo(channel.id)),
145
- menu: {
146
- id: switchOutputMenu,
147
- group,
148
- }
149
- });
150
- }
151
- async run(accessor) {
152
- return accessor.get(IOutputService).showChannel(channel.id, true);
153
- }
154
- }));
155
- }
156
- };
157
- registerOutputChannels(this.outputService.getChannelDescriptors());
158
- const outputChannelRegistry = ( Registry.as(Extensions$3.OutputChannels));
159
- this._register(outputChannelRegistry.onDidRegisterChannel(e => {
160
- const channel = this.outputService.getChannelDescriptor(e);
161
- if (channel) {
162
- registerOutputChannels([channel]);
163
- }
164
- }));
165
- this._register(outputChannelRegistry.onDidRemoveChannel(e => {
166
- registeredChannels.get(e)?.dispose();
167
- registeredChannels.delete(e);
168
- }));
169
- }
170
- registerShowOutputChannelsAction() {
171
- this._register(registerAction2(class extends Action2 {
172
- constructor() {
173
- super({
174
- id: 'workbench.action.showOutputChannels',
175
- title: ( localize2WithPath(
176
- 'vs/workbench/contrib/output/browser/output.contribution',
177
- 'showOutputChannels',
178
- "Show Output Channels..."
179
- )),
180
- category: ( localize2WithPath(
181
- 'vs/workbench/contrib/output/browser/output.contribution',
182
- 'output',
183
- "Output"
184
- )),
185
- f1: true
186
- });
187
- }
188
- async run(accessor) {
189
- const outputService = accessor.get(IOutputService);
190
- const quickInputService = accessor.get(IQuickInputService);
191
- const extensionChannels = [], coreChannels = [];
192
- for (const channel of outputService.getChannelDescriptors()) {
193
- if (channel.extensionId) {
194
- extensionChannels.push(channel);
195
- }
196
- else {
197
- coreChannels.push(channel);
198
- }
199
- }
200
- const entries = [];
201
- for (const { id, label } of extensionChannels) {
202
- entries.push({ id, label });
203
- }
204
- if (extensionChannels.length && coreChannels.length) {
205
- entries.push({ type: 'separator' });
206
- }
207
- for (const { id, label } of coreChannels) {
208
- entries.push({ id, label });
209
- }
210
- const entry = await quickInputService.pick(entries, { placeHolder: ( localizeWithPath(
211
- 'vs/workbench/contrib/output/browser/output.contribution',
212
- 'selectOutput',
213
- "Select Output Channel"
214
- )) });
215
- if (entry) {
216
- return outputService.showChannel(entry.id);
217
- }
218
- }
219
- }));
220
- }
221
- registerClearOutputAction() {
222
- this._register(registerAction2(class extends Action2 {
223
- constructor() {
224
- super({
225
- id: `workbench.output.action.clearOutput`,
226
- title: ( localize2WithPath(
227
- 'vs/workbench/contrib/output/browser/output.contribution',
228
- 'clearOutput.label',
229
- "Clear Output"
230
- )),
231
- category: Categories.View,
232
- menu: [{
233
- id: MenuId.ViewTitle,
234
- when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
235
- group: 'navigation',
236
- order: 2
237
- }, {
238
- id: MenuId.CommandPalette
239
- }, {
240
- id: MenuId.EditorContext,
241
- when: CONTEXT_IN_OUTPUT
242
- }],
243
- icon: Codicon.clearAll
244
- });
245
- }
246
- async run(accessor) {
247
- const outputService = accessor.get(IOutputService);
248
- const accessibilitySignalService = accessor.get(IAccessibilitySignalService);
249
- const activeChannel = outputService.getActiveChannel();
250
- if (activeChannel) {
251
- activeChannel.clear();
252
- accessibilitySignalService.playSignal(AccessibilitySignal.clear);
253
- }
254
- }
255
- }));
256
- }
257
- registerToggleAutoScrollAction() {
258
- this._register(registerAction2(class extends Action2 {
259
- constructor() {
260
- super({
261
- id: `workbench.output.action.toggleAutoScroll`,
262
- title: ( localize2WithPath(
263
- 'vs/workbench/contrib/output/browser/output.contribution',
264
- 'toggleAutoScroll',
265
- "Toggle Auto Scrolling"
266
- )),
267
- tooltip: ( localizeWithPath(
268
- 'vs/workbench/contrib/output/browser/output.contribution',
269
- 'outputScrollOff',
270
- "Turn Auto Scrolling Off"
271
- )),
272
- menu: {
273
- id: MenuId.ViewTitle,
274
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)))),
275
- group: 'navigation',
276
- order: 3,
277
- },
278
- icon: Codicon.lock,
279
- toggled: {
280
- condition: CONTEXT_OUTPUT_SCROLL_LOCK,
281
- icon: Codicon.unlock,
282
- tooltip: ( localizeWithPath(
283
- 'vs/workbench/contrib/output/browser/output.contribution',
284
- 'outputScrollOn',
285
- "Turn Auto Scrolling On"
286
- ))
287
- }
288
- });
289
- }
290
- async run(accessor) {
291
- const outputView = accessor.get(IViewsService).getActiveViewWithId(OUTPUT_VIEW_ID);
292
- outputView.scrollLock = !outputView.scrollLock;
293
- }
294
- }));
295
- }
296
- registerOpenActiveOutputFileAction() {
297
- const that = this;
298
- this._register(registerAction2(class extends Action2 {
299
- constructor() {
300
- super({
301
- id: `workbench.action.openActiveLogOutputFile`,
302
- title: ( localize2WithPath(
303
- 'vs/workbench/contrib/output/browser/output.contribution',
304
- 'openActiveOutputFile',
305
- "Open Output in Editor"
306
- )),
307
- menu: [{
308
- id: MenuId.ViewTitle,
309
- when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
310
- group: 'navigation',
311
- order: 4,
312
- isHiddenByDefault: true
313
- }],
314
- icon: Codicon.goToFile,
315
- precondition: CONTEXT_ACTIVE_FILE_OUTPUT
316
- });
317
- }
318
- async run() {
319
- that.openActiveOutoutFile();
320
- }
321
- }));
322
- }
323
- registerOpenActiveOutputFileInAuxWindowAction() {
324
- const that = this;
325
- this._register(registerAction2(class extends Action2 {
326
- constructor() {
327
- super({
328
- id: `workbench.action.openActiveLogOutputFileInNewWindow`,
329
- title: ( localize2WithPath(
330
- 'vs/workbench/contrib/output/browser/output.contribution',
331
- 'openActiveOutputFileInNewWindow',
332
- "Open Output in New Window"
333
- )),
334
- menu: [{
335
- id: MenuId.ViewTitle,
336
- when: ( ContextKeyExpr.equals('view', OUTPUT_VIEW_ID)),
337
- group: 'navigation',
338
- order: 5,
339
- isHiddenByDefault: true
340
- }],
341
- icon: Codicon.emptyWindow,
342
- precondition: CONTEXT_ACTIVE_FILE_OUTPUT
343
- });
344
- }
345
- async run() {
346
- that.openActiveOutoutFile(AUX_WINDOW_GROUP);
347
- }
348
- }));
349
- }
350
- async openActiveOutoutFile(group) {
351
- const fileOutputChannelDescriptor = this.getFileOutputChannelDescriptor();
352
- if (fileOutputChannelDescriptor) {
353
- await this.fileConfigurationService.updateReadonly(fileOutputChannelDescriptor.file, true);
354
- await this.editorService.openEditor({
355
- resource: fileOutputChannelDescriptor.file,
356
- options: {
357
- pinned: true,
358
- },
359
- }, group);
360
- }
361
- }
362
- getFileOutputChannelDescriptor() {
363
- const channel = this.outputService.getActiveChannel();
364
- if (channel) {
365
- const descriptor = this.outputService.getChannelDescriptors().filter(c => c.id === channel.id)[0];
366
- if (descriptor?.file) {
367
- return descriptor;
368
- }
369
- }
370
- return null;
371
- }
372
- registerShowLogsAction() {
373
- this._register(registerAction2(class extends Action2 {
374
- constructor() {
375
- super({
376
- id: 'workbench.action.showLogs',
377
- title: ( localize2WithPath(
378
- 'vs/workbench/contrib/output/browser/output.contribution',
379
- 'showLogs',
380
- "Show Logs..."
381
- )),
382
- category: Categories.Developer,
383
- menu: {
384
- id: MenuId.CommandPalette,
385
- },
386
- });
387
- }
388
- async run(accessor) {
389
- const outputService = accessor.get(IOutputService);
390
- const quickInputService = accessor.get(IQuickInputService);
391
- const extensionLogs = [], logs = [];
392
- for (const channel of outputService.getChannelDescriptors()) {
393
- if (channel.log) {
394
- if (channel.extensionId) {
395
- extensionLogs.push(channel);
396
- }
397
- else {
398
- logs.push(channel);
399
- }
400
- }
401
- }
402
- const entries = [];
403
- for (const { id, label } of logs) {
404
- entries.push({ id, label });
405
- }
406
- if (extensionLogs.length && logs.length) {
407
- entries.push({ type: 'separator', label: ( localizeWithPath(
408
- 'vs/workbench/contrib/output/browser/output.contribution',
409
- 'extensionLogs',
410
- "Extension Logs"
411
- )) });
412
- }
413
- for (const { id, label } of extensionLogs) {
414
- entries.push({ id, label });
415
- }
416
- const entry = await quickInputService.pick(entries, { placeHolder: ( localizeWithPath(
417
- 'vs/workbench/contrib/output/browser/output.contribution',
418
- 'selectlog',
419
- "Select Log"
420
- )) });
421
- if (entry) {
422
- return outputService.showChannel(entry.id);
423
- }
424
- }
425
- }));
426
- }
427
- registerOpenLogFileAction() {
428
- this._register(registerAction2(class extends Action2 {
429
- constructor() {
430
- super({
431
- id: 'workbench.action.openLogFile',
432
- title: ( localize2WithPath(
433
- 'vs/workbench/contrib/output/browser/output.contribution',
434
- 'openLogFile',
435
- "Open Log File..."
436
- )),
437
- category: Categories.Developer,
438
- menu: {
439
- id: MenuId.CommandPalette,
440
- },
441
- metadata: {
442
- description: 'workbench.action.openLogFile',
443
- args: [{
444
- name: 'logFile',
445
- schema: {
446
- markdownDescription: ( localizeWithPath(
447
- 'vs/workbench/contrib/output/browser/output.contribution',
448
- 'logFile',
449
- "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"
450
- )),
451
- type: 'string'
452
- }
453
- }]
454
- },
455
- });
456
- }
457
- async run(accessor, args) {
458
- const outputService = accessor.get(IOutputService);
459
- const quickInputService = accessor.get(IQuickInputService);
460
- const editorService = accessor.get(IEditorService);
461
- const fileConfigurationService = accessor.get(IFilesConfigurationService);
462
- let entry;
463
- const argName = args && typeof args === 'string' ? args : undefined;
464
- const extensionChannels = [];
465
- const coreChannels = [];
466
- for (const c of outputService.getChannelDescriptors()) {
467
- if (c.file && c.log) {
468
- const e = { id: c.id, label: c.label, channel: c };
469
- if (c.extensionId) {
470
- extensionChannels.push(e);
471
- }
472
- else {
473
- coreChannels.push(e);
474
- }
475
- if (e.id === argName) {
476
- entry = e;
477
- }
478
- }
479
- }
480
- if (!entry) {
481
- const entries = [...extensionChannels.sort((a, b) => a.label.localeCompare(b.label))];
482
- if (entries.length && coreChannels.length) {
483
- entries.push({ type: 'separator' });
484
- entries.push(...coreChannels.sort((a, b) => a.label.localeCompare(b.label)));
485
- }
486
- entry = await quickInputService.pick(entries, { placeHolder: ( localizeWithPath(
487
- 'vs/workbench/contrib/output/browser/output.contribution',
488
- 'selectlogFile',
489
- "Select Log File"
490
- )) });
491
- }
492
- if (entry) {
493
- const resource = assertIsDefined(entry.channel.file);
494
- await fileConfigurationService.updateReadonly(resource, true);
495
- await editorService.openEditor({
496
- resource,
497
- options: {
498
- pinned: true,
499
- }
500
- });
501
- }
502
- }
503
- }));
504
- }
505
- };
506
- OutputContribution = ( __decorate([
507
- ( __param(0, IOutputService)),
508
- ( __param(1, IEditorService)),
509
- ( __param(2, IFilesConfigurationService))
510
- ], OutputContribution));
511
- ( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(OutputContribution, 3 );
512
- ( Registry.as(Extensions$2.Configuration)).registerConfiguration({
513
- id: 'output',
514
- order: 30,
515
- title: ( localizeWithPath(
516
- 'vs/workbench/contrib/output/browser/output.contribution',
517
- 'output',
518
- "Output"
519
- )),
520
- type: 'object',
521
- properties: {
522
- 'output.smartScroll.enabled': {
523
- type: 'boolean',
524
- description: ( localizeWithPath(
525
- 'vs/workbench/contrib/output/browser/output.contribution',
526
- 'output.smartScroll.enabled',
527
- "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."
528
- )),
529
- default: true,
530
- scope: 3 ,
531
- tags: ['output']
532
- }
533
- }
534
- });
@@ -1,6 +0,0 @@
1
- import n from '../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
-
3
- var css = ".monaco-workbench .part.panel>.content .pane-body.output-view .monaco-editor,.monaco-workbench .part.panel>.content .pane-body.output-view .monaco-editor .margin,.monaco-workbench .part.panel>.content .pane-body.output-view .monaco-editor .monaco-editor-background,.monaco-workbench .part.sidebar .output-view .monaco-editor,.monaco-workbench .part.sidebar .output-view .monaco-editor .margin,.monaco-workbench .part.sidebar .output-view .monaco-editor .monaco-editor-background{background-color:var(--vscode-outputView-background)}.monaco-workbench .part.panel>.content .pane-body.output-view .sticky-widget,.monaco-workbench .part.sidebar .output-view .sticky-widget{background-color:var(--vscode-outputViewStickyScroll-background,var(--vscode-panel-background))}";
4
- n(css,{});
5
-
6
- export { css, css as default };
@@ -1,78 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
3
- import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
4
- import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
5
- import { OUTPUT_MODE_ID, LOG_MODE_ID } from 'vscode/vscode/vs/workbench/services/output/common/output';
6
- import { createWebWorker } from 'vscode/vscode/vs/editor/browser/services/webWorker';
7
- import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
8
- import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
9
- import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
10
-
11
- var OutputLinkProvider_1;
12
- let OutputLinkProvider = class OutputLinkProvider {
13
- static { OutputLinkProvider_1 = this; }
14
- static { this.DISPOSE_WORKER_TIME = 3 * 60 * 1000; }
15
- constructor(contextService, modelService, languageConfigurationService, languageFeaturesService) {
16
- this.contextService = contextService;
17
- this.modelService = modelService;
18
- this.languageConfigurationService = languageConfigurationService;
19
- this.languageFeaturesService = languageFeaturesService;
20
- this.disposeWorkerScheduler = ( new RunOnceScheduler(() => this.disposeWorker(), OutputLinkProvider_1.DISPOSE_WORKER_TIME));
21
- this.registerListeners();
22
- this.updateLinkProviderWorker();
23
- }
24
- registerListeners() {
25
- this.contextService.onDidChangeWorkspaceFolders(() => this.updateLinkProviderWorker());
26
- }
27
- updateLinkProviderWorker() {
28
- const folders = this.contextService.getWorkspace().folders;
29
- if (folders.length > 0) {
30
- if (!this.linkProviderRegistration) {
31
- this.linkProviderRegistration = this.languageFeaturesService.linkProvider.register([{ language: OUTPUT_MODE_ID, scheme: '*' }, { language: LOG_MODE_ID, scheme: '*' }], {
32
- provideLinks: async (model) => {
33
- const links = await this.provideLinks(model.uri);
34
- return links && { links };
35
- }
36
- });
37
- }
38
- }
39
- else {
40
- dispose(this.linkProviderRegistration);
41
- this.linkProviderRegistration = undefined;
42
- }
43
- this.disposeWorker();
44
- this.disposeWorkerScheduler.cancel();
45
- }
46
- getOrCreateWorker() {
47
- this.disposeWorkerScheduler.schedule();
48
- if (!this.worker) {
49
- const createData = {
50
- workspaceFolders: ( this.contextService.getWorkspace().folders.map(folder => ( folder.uri.toString())))
51
- };
52
- this.worker = createWebWorker(this.modelService, this.languageConfigurationService, {
53
- moduleId: 'vs/workbench/contrib/output/common/outputLinkComputer',
54
- createData,
55
- label: 'outputLinkComputer'
56
- });
57
- }
58
- return this.worker;
59
- }
60
- async provideLinks(modelUri) {
61
- const linkComputer = await this.getOrCreateWorker().withSyncedResources([modelUri]);
62
- return linkComputer.computeLinks(( modelUri.toString()));
63
- }
64
- disposeWorker() {
65
- if (this.worker) {
66
- this.worker.dispose();
67
- this.worker = undefined;
68
- }
69
- }
70
- };
71
- OutputLinkProvider = OutputLinkProvider_1 = ( __decorate([
72
- ( __param(0, IWorkspaceContextService)),
73
- ( __param(1, IModelService)),
74
- ( __param(2, ILanguageConfigurationService)),
75
- ( __param(3, ILanguageFeaturesService))
76
- ], OutputLinkProvider));
77
-
78
- export { OutputLinkProvider };
@@ -1,168 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
3
- import { URI } from 'vscode/vscode/vs/base/common/uri';
4
- import { Disposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
5
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
7
- import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
8
- import { OUTPUT_SCHEME, LOG_MIME, OUTPUT_MIME, ACTIVE_OUTPUT_CHANNEL_CONTEXT, CONTEXT_ACTIVE_FILE_OUTPUT, Extensions, OUTPUT_VIEW_ID } from 'vscode/vscode/vs/workbench/services/output/common/output';
9
- import { OutputLinkProvider } from './outputLinkProvider.js';
10
- import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
11
- import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
12
- import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
13
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
14
- import { IOutputChannelModelService } from 'vscode/vscode/vs/workbench/contrib/output/common/outputChannelModelService';
15
- import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
16
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
17
-
18
- const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel';
19
- let OutputChannel = class OutputChannel extends Disposable {
20
- constructor(outputChannelDescriptor, outputChannelModelService, languageService) {
21
- super();
22
- this.outputChannelDescriptor = outputChannelDescriptor;
23
- this.scrollLock = false;
24
- this.id = outputChannelDescriptor.id;
25
- this.label = outputChannelDescriptor.label;
26
- this.uri = ( URI.from({ scheme: OUTPUT_SCHEME, path: this.id }));
27
- this.model = this._register(outputChannelModelService.createOutputChannelModel(this.id, this.uri, outputChannelDescriptor.languageId ? languageService.createById(outputChannelDescriptor.languageId) : languageService.createByMimeType(outputChannelDescriptor.log ? LOG_MIME : OUTPUT_MIME), outputChannelDescriptor.file));
28
- }
29
- append(output) {
30
- this.model.append(output);
31
- }
32
- update(mode, till) {
33
- this.model.update(mode, till, true);
34
- }
35
- clear() {
36
- this.model.clear();
37
- }
38
- replace(value) {
39
- this.model.replace(value);
40
- }
41
- };
42
- OutputChannel = ( __decorate([
43
- ( __param(1, IOutputChannelModelService)),
44
- ( __param(2, ILanguageService))
45
- ], OutputChannel));
46
- let OutputService = class OutputService extends Disposable {
47
- constructor(storageService, instantiationService, textModelResolverService, logService, lifecycleService, viewsService, contextKeyService) {
48
- super();
49
- this.storageService = storageService;
50
- this.instantiationService = instantiationService;
51
- this.logService = logService;
52
- this.lifecycleService = lifecycleService;
53
- this.viewsService = viewsService;
54
- this.channels = ( new Map());
55
- this._onActiveOutputChannel = this._register(( new Emitter()));
56
- this.onActiveOutputChannel = this._onActiveOutputChannel.event;
57
- this.activeChannelIdInStorage = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, 1 , '');
58
- this.activeOutputChannelContext = ACTIVE_OUTPUT_CHANNEL_CONTEXT.bindTo(contextKeyService);
59
- this.activeOutputChannelContext.set(this.activeChannelIdInStorage);
60
- this._register(this.onActiveOutputChannel(channel => this.activeOutputChannelContext.set(channel)));
61
- this.activeFileOutputChannelContext = CONTEXT_ACTIVE_FILE_OUTPUT.bindTo(contextKeyService);
62
- textModelResolverService.registerTextModelContentProvider(OUTPUT_SCHEME, this);
63
- instantiationService.createInstance(OutputLinkProvider);
64
- const registry = ( Registry.as(Extensions.OutputChannels));
65
- for (const channelIdentifier of registry.getChannels()) {
66
- this.onDidRegisterChannel(channelIdentifier.id);
67
- }
68
- this._register(registry.onDidRegisterChannel(this.onDidRegisterChannel, this));
69
- if (!this.activeChannel) {
70
- const channels = this.getChannelDescriptors();
71
- this.setActiveChannel(channels && channels.length > 0 ? this.getChannel(channels[0].id) : undefined);
72
- }
73
- this._register(Event.filter(this.viewsService.onDidChangeViewVisibility, e => e.id === OUTPUT_VIEW_ID && e.visible)(() => {
74
- if (this.activeChannel) {
75
- this.viewsService.getActiveViewWithId(OUTPUT_VIEW_ID)?.showChannel(this.activeChannel, true);
76
- }
77
- }));
78
- this._register(this.lifecycleService.onDidShutdown(() => this.dispose()));
79
- }
80
- provideTextContent(resource) {
81
- const channel = this.getChannel(resource.path);
82
- if (channel) {
83
- return channel.model.loadModel();
84
- }
85
- return null;
86
- }
87
- async showChannel(id, preserveFocus) {
88
- const channel = this.getChannel(id);
89
- if (this.activeChannel?.id !== channel?.id) {
90
- this.setActiveChannel(channel);
91
- this._onActiveOutputChannel.fire(id);
92
- }
93
- const outputView = await this.viewsService.openView(OUTPUT_VIEW_ID, !preserveFocus);
94
- if (outputView && channel) {
95
- outputView.showChannel(channel, !!preserveFocus);
96
- }
97
- }
98
- getChannel(id) {
99
- return this.channels.get(id);
100
- }
101
- getChannelDescriptor(id) {
102
- return ( Registry.as(Extensions.OutputChannels)).getChannel(id);
103
- }
104
- getChannelDescriptors() {
105
- return ( Registry.as(Extensions.OutputChannels)).getChannels();
106
- }
107
- getActiveChannel() {
108
- return this.activeChannel;
109
- }
110
- async onDidRegisterChannel(channelId) {
111
- const channel = this.createChannel(channelId);
112
- this.channels.set(channelId, channel);
113
- if (!this.activeChannel || this.activeChannelIdInStorage === channelId) {
114
- this.setActiveChannel(channel);
115
- this._onActiveOutputChannel.fire(channelId);
116
- const outputView = this.viewsService.getActiveViewWithId(OUTPUT_VIEW_ID);
117
- outputView?.showChannel(channel, true);
118
- }
119
- }
120
- createChannel(id) {
121
- const channelDisposables = [];
122
- const channel = this.instantiateChannel(id);
123
- channel.model.onDispose(() => {
124
- if (this.activeChannel === channel) {
125
- const channels = this.getChannelDescriptors();
126
- const channel = channels.length ? this.getChannel(channels[0].id) : undefined;
127
- if (channel && this.viewsService.isViewVisible(OUTPUT_VIEW_ID)) {
128
- this.showChannel(channel.id);
129
- }
130
- else {
131
- this.setActiveChannel(undefined);
132
- }
133
- }
134
- ( Registry.as(Extensions.OutputChannels)).removeChannel(id);
135
- dispose(channelDisposables);
136
- }, channelDisposables);
137
- return channel;
138
- }
139
- instantiateChannel(id) {
140
- const channelData = ( Registry.as(Extensions.OutputChannels)).getChannel(id);
141
- if (!channelData) {
142
- this.logService.error(`Channel '${id}' is not registered yet`);
143
- throw new Error(`Channel '${id}' is not registered yet`);
144
- }
145
- return this.instantiationService.createInstance(OutputChannel, channelData);
146
- }
147
- setActiveChannel(channel) {
148
- this.activeChannel = channel;
149
- this.activeFileOutputChannelContext.set(!!channel?.outputChannelDescriptor?.file);
150
- if (this.activeChannel) {
151
- this.storageService.store(OUTPUT_ACTIVE_CHANNEL_KEY, this.activeChannel.id, 1 , 1 );
152
- }
153
- else {
154
- this.storageService.remove(OUTPUT_ACTIVE_CHANNEL_KEY, 1 );
155
- }
156
- }
157
- };
158
- OutputService = ( __decorate([
159
- ( __param(0, IStorageService)),
160
- ( __param(1, IInstantiationService)),
161
- ( __param(2, ITextModelService)),
162
- ( __param(3, ILogService)),
163
- ( __param(4, ILifecycleService)),
164
- ( __param(5, IViewsService)),
165
- ( __param(6, IContextKeyService))
166
- ], OutputService));
167
-
168
- export { OutputService };
@@ -1,223 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import './output.css.js';
3
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
- import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
5
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
6
- import { ITextResourceConfigurationService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
7
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
8
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
9
- import { AbstractTextResourceEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textResourceEditor';
10
- import { CONTEXT_OUTPUT_SCROLL_LOCK, OUTPUT_VIEW_ID, CONTEXT_IN_OUTPUT } from 'vscode/vscode/vs/workbench/services/output/common/output';
11
- import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
12
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
13
- import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
14
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
15
- import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
16
- import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
17
- import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
18
- import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
19
- import { TextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
20
- import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
21
- import { Dimension } from 'vscode/vscode/vs/base/browser/dom';
22
- import { createCancelablePromise } from 'vscode/vscode/vs/base/common/async';
23
- import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
24
- import { ResourceContextKey } from 'vscode/vscode/vs/workbench/common/contextkeys';
25
- import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
26
-
27
- let OutputViewPane = class OutputViewPane extends ViewPane {
28
- get scrollLock() { return !!this.scrollLockContextKey.get(); }
29
- set scrollLock(scrollLock) { this.scrollLockContextKey.set(scrollLock); }
30
- constructor(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService) {
31
- super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
32
- this.editorPromise = null;
33
- this.scrollLockContextKey = CONTEXT_OUTPUT_SCROLL_LOCK.bindTo(this.contextKeyService);
34
- const editorInstantiationService = instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService])));
35
- this.editor = editorInstantiationService.createInstance(OutputEditor);
36
- this._register(this.editor.onTitleAreaUpdate(() => {
37
- this.updateTitle(this.editor.getTitle());
38
- this.updateActions();
39
- }));
40
- this._register(this.onDidChangeBodyVisibility(() => this.onDidChangeVisibility(this.isBodyVisible())));
41
- }
42
- showChannel(channel, preserveFocus) {
43
- if (this.channelId !== channel.id) {
44
- this.setInput(channel);
45
- }
46
- if (!preserveFocus) {
47
- this.focus();
48
- }
49
- }
50
- focus() {
51
- super.focus();
52
- this.editorPromise?.then(() => this.editor.focus());
53
- }
54
- renderBody(container) {
55
- super.renderBody(container);
56
- this.editor.create(container);
57
- container.classList.add('output-view');
58
- const codeEditor = this.editor.getControl();
59
- codeEditor.setAriaOptions({ role: 'document', activeDescendant: undefined });
60
- this._register(codeEditor.onDidChangeModelContent(() => {
61
- if (!this.scrollLock) {
62
- this.editor.revealLastLine();
63
- }
64
- }));
65
- this._register(codeEditor.onDidChangeCursorPosition((e) => {
66
- if (e.reason !== 3 ) {
67
- return;
68
- }
69
- if (!this.configurationService.getValue('output.smartScroll.enabled')) {
70
- return;
71
- }
72
- const model = codeEditor.getModel();
73
- if (model) {
74
- const newPositionLine = e.position.lineNumber;
75
- const lastLine = model.getLineCount();
76
- this.scrollLock = lastLine !== newPositionLine;
77
- }
78
- }));
79
- }
80
- layoutBody(height, width) {
81
- super.layoutBody(height, width);
82
- this.editor.layout(( new Dimension(width, height)));
83
- }
84
- onDidChangeVisibility(visible) {
85
- this.editor.setVisible(visible);
86
- if (!visible) {
87
- this.clearInput();
88
- }
89
- }
90
- setInput(channel) {
91
- this.channelId = channel.id;
92
- const input = this.createInput(channel);
93
- if (!this.editor.input || !input.matches(this.editor.input)) {
94
- this.editorPromise?.cancel();
95
- this.editorPromise = createCancelablePromise(token => this.editor.setInput(this.createInput(channel), { preserveFocus: true }, Object.create(null), token)
96
- .then(() => this.editor));
97
- }
98
- }
99
- clearInput() {
100
- this.channelId = undefined;
101
- this.editor.clearInput();
102
- this.editorPromise = null;
103
- }
104
- createInput(channel) {
105
- return this.instantiationService.createInstance(TextResourceEditorInput, channel.uri, ( localizeWithPath(
106
- 'vs/workbench/contrib/output/browser/outputView',
107
- 'output model title',
108
- "{0} - Output",
109
- channel.label
110
- )), ( localizeWithPath(
111
- 'vs/workbench/contrib/output/browser/outputView',
112
- 'channel',
113
- "Output channel for '{0}'",
114
- channel.label
115
- )), undefined, undefined);
116
- }
117
- };
118
- OutputViewPane = ( __decorate([
119
- ( __param(1, IKeybindingService)),
120
- ( __param(2, IContextMenuService)),
121
- ( __param(3, IConfigurationService)),
122
- ( __param(4, IContextKeyService)),
123
- ( __param(5, IViewDescriptorService)),
124
- ( __param(6, IInstantiationService)),
125
- ( __param(7, IOpenerService)),
126
- ( __param(8, IThemeService)),
127
- ( __param(9, ITelemetryService))
128
- ], OutputViewPane));
129
- let OutputEditor = class OutputEditor extends AbstractTextResourceEditor {
130
- constructor(telemetryService, instantiationService, storageService, configurationService, textResourceConfigurationService, themeService, editorGroupService, editorService, fileService, contextKeyService) {
131
- super(OUTPUT_VIEW_ID, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService, fileService);
132
- this.configurationService = configurationService;
133
- this.resourceContext = this._register(instantiationService.createInstance(ResourceContextKey));
134
- }
135
- getId() {
136
- return OUTPUT_VIEW_ID;
137
- }
138
- getTitle() {
139
- return ( localizeWithPath('vs/workbench/contrib/output/browser/outputView', 'output', "Output"));
140
- }
141
- getConfigurationOverrides(configuration) {
142
- const options = super.getConfigurationOverrides(configuration);
143
- options.wordWrap = 'on';
144
- options.lineNumbers = 'off';
145
- options.glyphMargin = false;
146
- options.lineDecorationsWidth = 20;
147
- options.rulers = [];
148
- options.folding = false;
149
- options.scrollBeyondLastLine = false;
150
- options.renderLineHighlight = 'none';
151
- options.minimap = { enabled: false };
152
- options.renderValidationDecorations = 'editable';
153
- options.padding = undefined;
154
- options.readOnly = true;
155
- options.domReadOnly = true;
156
- options.unicodeHighlight = {
157
- nonBasicASCII: false,
158
- invisibleCharacters: false,
159
- ambiguousCharacters: false,
160
- };
161
- const outputConfig = this.configurationService.getValue('[Log]');
162
- if (outputConfig) {
163
- if (outputConfig['editor.minimap.enabled']) {
164
- options.minimap = { enabled: true };
165
- }
166
- if ('editor.wordWrap' in outputConfig) {
167
- options.wordWrap = outputConfig['editor.wordWrap'];
168
- }
169
- }
170
- return options;
171
- }
172
- getAriaLabel() {
173
- return this.input ? this.input.getAriaLabel() : ( localizeWithPath(
174
- 'vs/workbench/contrib/output/browser/outputView',
175
- 'outputViewAriaLabel',
176
- "Output panel"
177
- ));
178
- }
179
- async setInput(input, options, context, token) {
180
- const focus = !(options && options.preserveFocus);
181
- if (this.input && input.matches(this.input)) {
182
- return;
183
- }
184
- if (this.input) {
185
- this.input.dispose();
186
- }
187
- await super.setInput(input, options, context, token);
188
- this.resourceContext.set(input.resource);
189
- if (focus) {
190
- this.focus();
191
- }
192
- this.revealLastLine();
193
- }
194
- clearInput() {
195
- if (this.input) {
196
- this.input.dispose();
197
- }
198
- super.clearInput();
199
- this.resourceContext.reset();
200
- }
201
- createEditor(parent) {
202
- parent.setAttribute('role', 'document');
203
- super.createEditor(parent);
204
- const scopedContextKeyService = this.scopedContextKeyService;
205
- if (scopedContextKeyService) {
206
- CONTEXT_IN_OUTPUT.bindTo(scopedContextKeyService).set(true);
207
- }
208
- }
209
- };
210
- OutputEditor = ( __decorate([
211
- ( __param(0, ITelemetryService)),
212
- ( __param(1, IInstantiationService)),
213
- ( __param(2, IStorageService)),
214
- ( __param(3, IConfigurationService)),
215
- ( __param(4, ITextResourceConfigurationService)),
216
- ( __param(5, IThemeService)),
217
- ( __param(6, IEditorGroupsService)),
218
- ( __param(7, IEditorService)),
219
- ( __param(8, IFileService)),
220
- ( __param(9, IContextKeyService))
221
- ], OutputEditor));
222
-
223
- export { OutputViewPane };