@codingame/monaco-vscode-api 1.83.1 → 1.83.2

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.
Files changed (35) hide show
  1. package/monaco-editor-treemending.patch +555 -555
  2. package/package.json +1 -1
  3. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  4. package/vscode/src/vs/platform/workspaces/common/workspaces.js +15 -15
  5. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +49 -51
  6. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +58 -69
  7. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +23 -23
  8. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +16 -16
  9. package/vscode/src/vs/workbench/api/common/extHostCommands.js +59 -65
  10. package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +8 -8
  11. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +151 -215
  12. package/vscode/src/vs/workbench/api/common/extHostSCM.js +54 -58
  13. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +53 -55
  14. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +28 -28
  15. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +265 -277
  16. package/vscode/src/vs/workbench/api/common/extensionHostMain.js +17 -19
  17. package/vscode/src/vs/workbench/api/worker/extHostExtensionService.js +5 -5
  18. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +26 -32
  19. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +20 -26
  20. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +58 -74
  21. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +19 -19
  22. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +32 -36
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +19 -19
  24. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +73 -126
  25. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +66 -74
  26. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +82 -92
  27. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +27 -29
  28. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +122 -124
  29. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +35 -39
  30. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +25 -25
  31. package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +30 -32
  32. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +82 -92
  33. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +31 -31
  34. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +16 -16
  35. package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.js +32 -42
@@ -64,24 +64,24 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
64
64
  this._lifecycleService = _lifecycleService;
65
65
  this._remoteAuthorityResolverService = _remoteAuthorityResolverService;
66
66
  this._dialogService = _dialogService;
67
- this._onDidRegisterExtensions = this._register(( (new Emitter())));
67
+ this._onDidRegisterExtensions = this._register(( new Emitter()));
68
68
  this.onDidRegisterExtensions = this._onDidRegisterExtensions.event;
69
- this._onDidChangeExtensionsStatus = this._register(( (new Emitter())));
69
+ this._onDidChangeExtensionsStatus = this._register(( new Emitter()));
70
70
  this.onDidChangeExtensionsStatus = this._onDidChangeExtensionsStatus.event;
71
- this._onDidChangeExtensions = this._register(( (new Emitter({ leakWarningThreshold: 400 }))));
71
+ this._onDidChangeExtensions = this._register(( new Emitter({ leakWarningThreshold: 400 })));
72
72
  this.onDidChangeExtensions = this._onDidChangeExtensions.event;
73
- this._onWillActivateByEvent = this._register(( (new Emitter())));
73
+ this._onWillActivateByEvent = this._register(( new Emitter()));
74
74
  this.onWillActivateByEvent = this._onWillActivateByEvent.event;
75
- this._onDidChangeResponsiveChange = this._register(( (new Emitter())));
75
+ this._onDidChangeResponsiveChange = this._register(( new Emitter()));
76
76
  this.onDidChangeResponsiveChange = this._onDidChangeResponsiveChange.event;
77
- this._onWillStop = this._register(( (new Emitter())));
77
+ this._onWillStop = this._register(( new Emitter()));
78
78
  this.onWillStop = this._onWillStop.event;
79
- this._activationEventReader = ( (new ImplicitActivationAwareReader()));
80
- this._registry = ( (new LockableExtensionDescriptionRegistry(this._activationEventReader)));
81
- this._installedExtensionsReady = ( (new Barrier()));
82
- this._extensionStatus = ( (new ExtensionIdentifierMap()));
83
- this._allRequestedActivateEvents = ( (new Set()));
84
- this._remoteCrashTracker = ( (new ExtensionHostCrashTracker()));
79
+ this._activationEventReader = ( new ImplicitActivationAwareReader());
80
+ this._registry = ( new LockableExtensionDescriptionRegistry(this._activationEventReader));
81
+ this._installedExtensionsReady = ( new Barrier());
82
+ this._extensionStatus = ( new ExtensionIdentifierMap());
83
+ this._allRequestedActivateEvents = ( new Set());
84
+ this._remoteCrashTracker = ( new ExtensionHostCrashTracker());
85
85
  this._deltaExtensionsQueue = [];
86
86
  this._inHandleDeltaExtensions = false;
87
87
  this._extensionHostManagers = [];
@@ -91,14 +91,14 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
91
91
  e.join(this.activateByEvent(`onFileSystem:${e.scheme}`));
92
92
  }
93
93
  }));
94
- this._runningLocations = ( (new ExtensionRunningLocationTracker(
94
+ this._runningLocations = ( new ExtensionRunningLocationTracker(
95
95
  this._registry,
96
96
  this._extensionHostKindPicker,
97
97
  this._environmentService,
98
98
  this._configurationService,
99
99
  this._logService,
100
100
  this._extensionManifestPropertiesService
101
- )));
101
+ ));
102
102
  this._register(this._extensionEnablementService.onEnablementChanged((extensions) => {
103
103
  const toAdd = [];
104
104
  const toRemove = [];
@@ -111,16 +111,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
111
111
  }
112
112
  }
113
113
  if (isCI) {
114
- this._logService.info(`AbstractExtensionService.onEnablementChanged fired for ${( ( extensions.map(e => e.identifier.id))).join(', ')}`);
114
+ this._logService.info(`AbstractExtensionService.onEnablementChanged fired for ${( extensions.map(e => e.identifier.id)).join(', ')}`);
115
115
  }
116
- this._handleDeltaExtensions(( (new DeltaExtensionsQueueItem(toAdd, toRemove))));
116
+ this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(toAdd, toRemove)));
117
117
  }));
118
118
  this._register(this._extensionManagementService.onDidChangeProfile(({ added, removed }) => {
119
119
  if (added.length || removed.length) {
120
120
  if (isCI) {
121
121
  this._logService.info(`AbstractExtensionService.onDidChangeProfile fired`);
122
122
  }
123
- this._handleDeltaExtensions(( (new DeltaExtensionsQueueItem(added, removed))));
123
+ this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(added, removed)));
124
124
  }
125
125
  }));
126
126
  this._register(this._extensionManagementService.onDidInstallExtensions((result) => {
@@ -132,9 +132,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
132
132
  }
133
133
  if (extensions.length) {
134
134
  if (isCI) {
135
- this._logService.info(`AbstractExtensionService.onDidInstallExtensions fired for ${( ( extensions.map(e => e.identifier.id))).join(', ')}`);
135
+ this._logService.info(`AbstractExtensionService.onDidInstallExtensions fired for ${( extensions.map(e => e.identifier.id)).join(', ')}`);
136
136
  }
137
- this._handleDeltaExtensions(( (new DeltaExtensionsQueueItem(extensions, []))));
137
+ this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(extensions, [])));
138
138
  }
139
139
  }));
140
140
  this._register(this._extensionManagementService.onDidUninstallExtension((event) => {
@@ -142,7 +142,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
142
142
  if (isCI) {
143
143
  this._logService.info(`AbstractExtensionService.onDidUninstallExtension fired for ${event.identifier.id}`);
144
144
  }
145
- this._handleDeltaExtensions(( (new DeltaExtensionsQueueItem([], [event.identifier.id]))));
145
+ this._handleDeltaExtensions(( new DeltaExtensionsQueueItem([], [event.identifier.id])));
146
146
  }
147
147
  }));
148
148
  this._register(this._lifecycleService.onDidShutdown(() => {
@@ -184,7 +184,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
184
184
  }
185
185
  async _deltaExtensions(lock, _toAdd, _toRemove) {
186
186
  if (isCI) {
187
- this._logService.info(`AbstractExtensionService._deltaExtensions: toAdd: [${( ( _toAdd.map(e => e.identifier.id))).join(',')}] toRemove: [${( ( _toRemove.map(e => typeof e === 'string' ? e : e.identifier.id))).join(',')}]`);
187
+ this._logService.info(`AbstractExtensionService._deltaExtensions: toAdd: [${( _toAdd.map(e => e.identifier.id)).join(',')}] toRemove: [${( _toRemove.map(e => typeof e === 'string' ? e : e.identifier.id)).join(',')}]`);
188
188
  }
189
189
  let toRemove = [];
190
190
  for (let i = 0, len = _toRemove.length; i < len; i++) {
@@ -218,30 +218,30 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
218
218
  if (toAdd.length === 0 && toRemove.length === 0) {
219
219
  return;
220
220
  }
221
- const result = this._registry.deltaExtensions(lock, toAdd, ( (toRemove.map(e => e.identifier))));
221
+ const result = this._registry.deltaExtensions(lock, toAdd, ( toRemove.map(e => e.identifier)));
222
222
  this._onDidChangeExtensions.fire({ added: toAdd, removed: toRemove });
223
223
  toRemove = toRemove.concat(result.removedDueToLooping);
224
224
  if (result.removedDueToLooping.length > 0) {
225
225
  this._notificationService.notify({
226
226
  severity: Severity.Error,
227
- message: ( (nls.localize(
227
+ message: ( nls.localize(
228
228
  'looping',
229
229
  "The following extensions contain dependency loops and have been disabled: {0}",
230
- ( (result.removedDueToLooping.map(e => `'${e.identifier.value}'`))).join(', ')
231
- )))
230
+ ( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(', ')
231
+ ))
232
232
  });
233
233
  }
234
234
  this._doHandleExtensionPoints([].concat(toAdd).concat(toRemove));
235
- await this._updateExtensionsOnExtHosts(result.versionId, toAdd, ( (toRemove.map(e => e.identifier))));
235
+ await this._updateExtensionsOnExtHosts(result.versionId, toAdd, ( toRemove.map(e => e.identifier)));
236
236
  for (let i = 0; i < toAdd.length; i++) {
237
237
  this._activateAddedExtensionIfNeeded(toAdd[i]);
238
238
  }
239
239
  }
240
240
  async _updateExtensionsOnExtHosts(versionId, toAdd, toRemove) {
241
241
  const removedRunningLocation = this._runningLocations.deltaExtensions(toAdd, toRemove);
242
- const promises = ( (this._extensionHostManagers.map(
242
+ const promises = ( this._extensionHostManagers.map(
243
243
  extHostManager => this._updateExtensionsOnExtHost(extHostManager, versionId, toAdd, toRemove, removedRunningLocation)
244
- )));
244
+ ));
245
245
  await Promise.all(promises);
246
246
  }
247
247
  async _updateExtensionsOnExtHost(extensionHostManager, versionId, toAdd, toRemove, removedRunningLocation) {
@@ -249,11 +249,11 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
249
249
  const myToRemove = filterExtensionIdentifiers(toRemove, removedRunningLocation, extRunningLocation => extensionHostManager.representsRunningLocation(extRunningLocation));
250
250
  const addActivationEvents = ImplicitActivationEvents.createActivationEventsMap(toAdd);
251
251
  if (isCI) {
252
- const printExtIds = (extensions) => ( (extensions.map(e => e.identifier.value))).join(',');
253
- const printIds = (extensions) => ( (extensions.map(e => e.value))).join(',');
252
+ const printExtIds = (extensions) => ( extensions.map(e => e.identifier.value)).join(',');
253
+ const printIds = (extensions) => ( extensions.map(e => e.value)).join(',');
254
254
  this._logService.info(`AbstractExtensionService: Calling deltaExtensions: toRemove: [${printIds(toRemove)}], toAdd: [${printExtIds(toAdd)}], myToRemove: [${printIds(myToRemove)}], myToAdd: [${printExtIds(myToAdd)}],`);
255
255
  }
256
- await extensionHostManager.deltaExtensions({ versionId, toRemove, toAdd, addActivationEvents, myToRemove, myToAdd: ( (myToAdd.map(extension => extension.identifier))) });
256
+ await extensionHostManager.deltaExtensions({ versionId, toRemove, toAdd, addActivationEvents, myToRemove, myToAdd: ( myToAdd.map(extension => extension.identifier)) });
257
257
  }
258
258
  canAddExtension(extension) {
259
259
  return this._canAddExtension(extension, []);
@@ -261,9 +261,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
261
261
  _canAddExtension(extension, extensionsBeingRemoved) {
262
262
  const existing = this._registry.getExtensionDescriptionByIdOrUUID(extension.identifier, extension.id);
263
263
  if (existing) {
264
- const isBeingRemoved = ( (extensionsBeingRemoved.some(
264
+ const isBeingRemoved = ( extensionsBeingRemoved.some(
265
265
  (extensionDescription) => ExtensionIdentifier.equals(extension.identifier, extensionDescription.identifier)
266
- )));
266
+ ));
267
267
  if (!isBeingRemoved) {
268
268
  return false;
269
269
  }
@@ -295,7 +295,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
295
295
  if (activationEvent === 'onUri') {
296
296
  activationEvent = `onUri:${ExtensionIdentifier.toKey(extensionDescription.identifier)}`;
297
297
  }
298
- if (( (this._allRequestedActivateEvents.has(activationEvent)))) {
298
+ if (( this._allRequestedActivateEvents.has(activationEvent))) {
299
299
  shouldActivate = true;
300
300
  shouldActivateReason = activationEvent;
301
301
  break;
@@ -315,16 +315,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
315
315
  }
316
316
  }
317
317
  if (shouldActivate) {
318
- await Promise.all(( (this._extensionHostManagers.map(
318
+ await Promise.all(( this._extensionHostManagers.map(
319
319
  extHostManager => extHostManager.activate(extensionDescription.identifier, { startup: false, extensionId: extensionDescription.identifier, activationEvent: shouldActivateReason })
320
- )))).then(() => { });
320
+ ))).then(() => { });
321
321
  }
322
322
  else if (hasWorkspaceContains) {
323
323
  const workspace = await this._contextService.getCompleteWorkspace();
324
324
  const forceUsingSearch = !!this._environmentService.remoteAuthority;
325
325
  const host = {
326
326
  logService: this._logService,
327
- folders: ( (workspace.folders.map(folder => folder.uri))),
327
+ folders: ( workspace.folders.map(folder => folder.uri)),
328
328
  forceUsingSearch: forceUsingSearch,
329
329
  exists: (uri) => this._fileService.exists(uri),
330
330
  checkExists: (folders, includes, token) => this._instantiationService.invokeFunction((accessor) => checkGlobFileExists(accessor, folders, includes, token))
@@ -333,9 +333,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
333
333
  if (!result) {
334
334
  return;
335
335
  }
336
- await Promise.all(( (this._extensionHostManagers.map(
336
+ await Promise.all(( this._extensionHostManagers.map(
337
337
  extHostManager => extHostManager.activate(extensionDescription.identifier, { startup: false, extensionId: extensionDescription.identifier, activationEvent: result.activationEvent })
338
- )))).then(() => { });
338
+ ))).then(() => { });
339
339
  }
340
340
  }
341
341
  async _initialize() {
@@ -349,7 +349,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
349
349
  for (const extHostManager of this._extensionHostManagers) {
350
350
  if (extHostManager.startup !== 1 ) {
351
351
  const extensions = this._runningLocations.filterByExtensionHostManager(snapshot.extensions, extHostManager);
352
- extHostManager.start(snapshot.versionId, snapshot.extensions, ( (extensions.map(extension => extension.identifier))));
352
+ extHostManager.start(snapshot.versionId, snapshot.extensions, ( extensions.map(extension => extension.identifier)));
353
353
  }
354
354
  }
355
355
  }
@@ -380,11 +380,11 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
380
380
  if (result.removedDueToLooping.length > 0) {
381
381
  this._notificationService.notify({
382
382
  severity: Severity.Error,
383
- message: ( (nls.localize(
383
+ message: ( nls.localize(
384
384
  'looping',
385
385
  "The following extensions contain dependency loops and have been disabled: {0}",
386
- ( (result.removedDueToLooping.map(e => `'${e.identifier.value}'`))).join(', ')
387
- )))
386
+ ( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(', ')
387
+ ))
388
388
  });
389
389
  }
390
390
  this._doHandleExtensionPoints(this._registry.getAllExtensionDescriptions());
@@ -395,11 +395,11 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
395
395
  }
396
396
  const extensionHostManager = this.findTestExtensionHost(this._environmentService.extensionTestsLocationURI);
397
397
  if (!extensionHostManager) {
398
- const msg = ( (nls.localize(
398
+ const msg = ( nls.localize(
399
399
  'extensionTestError',
400
400
  "No extension host found that can launch the test runner at {0}.",
401
- (this._environmentService.extensionTestsLocationURI.toString())
402
- )));
401
+ ( this._environmentService.extensionTestsLocationURI.toString())
402
+ ));
403
403
  console.error(msg);
404
404
  this._notificationService.error(msg);
405
405
  return;
@@ -430,10 +430,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
430
430
  }
431
431
  if (runningLocation === null) {
432
432
  if (testLocation.scheme === Schemas.vscodeRemote) {
433
- runningLocation = ( (new RemoteRunningLocation()));
433
+ runningLocation = ( new RemoteRunningLocation());
434
434
  }
435
435
  else {
436
- runningLocation = ( (new LocalProcessRunningLocation(0)));
436
+ runningLocation = ( new LocalProcessRunningLocation(0));
437
437
  }
438
438
  }
439
439
  if (runningLocation !== null) {
@@ -444,7 +444,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
444
444
  _releaseBarrier() {
445
445
  this._installedExtensionsReady.open();
446
446
  this._onDidRegisterExtensions.fire(undefined);
447
- this._onDidChangeExtensionsStatus.fire(( (this._registry.getAllExtensionDescriptions().map(e => e.identifier))));
447
+ this._onDidChangeExtensionsStatus.fire(( this._registry.getAllExtensionDescriptions().map(e => e.identifier)));
448
448
  }
449
449
  async _resolveAuthorityInitial(remoteAuthority) {
450
450
  const MAX_ATTEMPTS = 5;
@@ -502,9 +502,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
502
502
  throw new Error(`Cannot resolve authority`);
503
503
  }
504
504
  this._resolveAuthorityAttempt++;
505
- const results = await Promise.all(( (extensionHosts.map(
505
+ const results = await Promise.all(( extensionHosts.map(
506
506
  extHost => extHost.resolveAuthority(remoteAuthority, this._resolveAuthorityAttempt)
507
- ))));
507
+ )));
508
508
  let bestErrorResult = null;
509
509
  for (const result of results) {
510
510
  if (result.type === 'ok') {
@@ -527,7 +527,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
527
527
  }
528
528
  _doStopExtensionHosts() {
529
529
  const previouslyActivatedExtensionIds = [];
530
- for (const extensionStatus of ( (this._extensionStatus.values()))) {
530
+ for (const extensionStatus of ( this._extensionStatus.values())) {
531
531
  if (extensionStatus.activationStarted) {
532
532
  previouslyActivatedExtensionIds.push(extensionStatus.id);
533
533
  }
@@ -536,7 +536,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
536
536
  this._extensionHostManagers[i].dispose();
537
537
  }
538
538
  this._extensionHostManagers = [];
539
- for (const extensionStatus of ( (this._extensionStatus.values()))) {
539
+ for (const extensionStatus of ( this._extensionStatus.values())) {
540
540
  extensionStatus.clearRuntimeStatus();
541
541
  }
542
542
  if (previouslyActivatedExtensionIds.length > 0) {
@@ -545,7 +545,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
545
545
  }
546
546
  async _doStopExtensionHostsWithVeto(reason) {
547
547
  const vetos = [];
548
- const vetoReasons = ( (new Set()));
548
+ const vetoReasons = ( new Set());
549
549
  this._onWillStop.fire({
550
550
  reason,
551
551
  veto(value, reason) {
@@ -561,12 +561,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
561
561
  vetoReasons.add(reason);
562
562
  }
563
563
  }).catch(error => {
564
- vetoReasons.add(( (nls.localize(
564
+ vetoReasons.add(( nls.localize(
565
565
  'extensionStopVetoError',
566
566
  "{0} (Error: {1})",
567
567
  reason,
568
568
  toErrorMessage(error)
569
- ))));
569
+ )));
570
570
  });
571
571
  }
572
572
  }
@@ -578,33 +578,33 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
578
578
  else {
579
579
  const vetoReasonsArray = Array.from(vetoReasons);
580
580
  this._logService.warn(`Extension host was not stopped because of veto (stop reason: ${reason}, veto reason: ${vetoReasonsArray.join(', ')})`);
581
- await this._dialogService.warn(( (nls.localize(
581
+ await this._dialogService.warn(( nls.localize(
582
582
  'extensionStopVetoMessage',
583
583
  "The following operation was blocked: {0}",
584
584
  reason
585
- ))), vetoReasonsArray.length === 1 ?
586
- ( (nls.localize(
587
- 'extensionStopVetoDetailsOne',
588
- "The reason for blocking the operation: {0}",
589
- vetoReasonsArray[0]
590
- ))) :
591
- ( (nls.localize(
592
- 'extensionStopVetoDetailsMany',
593
- "The reasons for blocking the operation:\n- {0}",
594
- vetoReasonsArray.join('\n -')
595
- ))));
585
+ )), vetoReasonsArray.length === 1 ?
586
+ ( nls.localize(
587
+ 'extensionStopVetoDetailsOne',
588
+ "The reason for blocking the operation: {0}",
589
+ vetoReasonsArray[0]
590
+ )) :
591
+ ( nls.localize(
592
+ 'extensionStopVetoDetailsMany',
593
+ "The reasons for blocking the operation:\n- {0}",
594
+ vetoReasonsArray.join('\n -')
595
+ )));
596
596
  }
597
597
  return !veto;
598
598
  }
599
599
  _startExtensionHostsIfNecessary(isInitialStart, initialActivationEvents) {
600
600
  const locations = [];
601
601
  for (let affinity = 0; affinity <= this._runningLocations.maxLocalProcessAffinity; affinity++) {
602
- locations.push(( (new LocalProcessRunningLocation(affinity))));
602
+ locations.push(( new LocalProcessRunningLocation(affinity)));
603
603
  }
604
604
  for (let affinity = 0; affinity <= this._runningLocations.maxLocalWebWorkerAffinity; affinity++) {
605
- locations.push(( (new LocalWebWorkerRunningLocation(affinity))));
605
+ locations.push(( new LocalWebWorkerRunningLocation(affinity)));
606
606
  }
607
- locations.push(( (new RemoteRunningLocation())));
607
+ locations.push(( new RemoteRunningLocation()));
608
608
  for (const location of locations) {
609
609
  if (this._getExtensionHostManagerByRunningLocation(location)) {
610
610
  continue;
@@ -663,17 +663,15 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
663
663
  }
664
664
  }
665
665
  _getExtensionHostExitInfoWithTimeout(reconnectionToken) {
666
- return (
667
- (new Promise((resolve, reject) => {
668
- const timeoutHandle = setTimeout(() => {
669
- reject(( (new Error('getExtensionHostExitInfo timed out'))));
670
- }, 2000);
671
- this._remoteAgentService.getExtensionHostExitInfo(reconnectionToken).then((r) => {
672
- clearTimeout(timeoutHandle);
673
- resolve(r);
674
- }, reject);
675
- }))
676
- );
666
+ return ( new Promise((resolve, reject) => {
667
+ const timeoutHandle = setTimeout(() => {
668
+ reject(( new Error('getExtensionHostExitInfo timed out')));
669
+ }, 2000);
670
+ this._remoteAgentService.getExtensionHostExitInfo(reconnectionToken).then((r) => {
671
+ clearTimeout(timeoutHandle);
672
+ resolve(r);
673
+ }, reject);
674
+ }));
677
675
  }
678
676
  async _onRemoteExtensionHostCrashed(extensionHost, reconnectionToken) {
679
677
  try {
@@ -685,20 +683,20 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
685
683
  this._remoteCrashTracker.registerCrash();
686
684
  if (this._remoteCrashTracker.shouldAutomaticallyRestart()) {
687
685
  this._logService.info(`Automatically restarting the remote extension host.`);
688
- this._notificationService.status(( (nls.localize(
686
+ this._notificationService.status(( nls.localize(
689
687
  'extensionService.autoRestart',
690
688
  "The remote extension host terminated unexpectedly. Restarting..."
691
- ))), { hideAfter: 5000 });
692
- this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
689
+ )), { hideAfter: 5000 });
690
+ this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
693
691
  }
694
692
  else {
695
- this._notificationService.prompt(Severity.Error, ( (nls.localize(
693
+ this._notificationService.prompt(Severity.Error, ( nls.localize(
696
694
  'extensionService.crash',
697
695
  "Remote Extension host terminated unexpectedly 3 times within the last 5 minutes."
698
- ))), [{
699
- label: ( (nls.localize('restart', "Restart Remote Extension Host"))),
696
+ )), [{
697
+ label: ( nls.localize('restart', "Restart Remote Extension Host")),
700
698
  run: () => {
701
- this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
699
+ this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
702
700
  }
703
701
  }]);
704
702
  }
@@ -708,13 +706,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
708
706
  }
709
707
  _logExtensionHostCrash(extensionHost) {
710
708
  const activatedExtensions = [];
711
- for (const extensionStatus of ( (this._extensionStatus.values()))) {
709
+ for (const extensionStatus of ( this._extensionStatus.values())) {
712
710
  if (extensionStatus.activationStarted && extensionHost.containsExtension(extensionStatus.id)) {
713
711
  activatedExtensions.push(extensionStatus.id);
714
712
  }
715
713
  }
716
714
  if (activatedExtensions.length > 0) {
717
- this._logService.error(`Extension host (${extensionHostKindToString(extensionHost.kind)}) terminated unexpectedly. The following extensions were running: ${( ( activatedExtensions.map(id => id.value))).join(', ')}`);
715
+ this._logService.error(`Extension host (${extensionHostKindToString(extensionHost.kind)}) terminated unexpectedly. The following extensions were running: ${( activatedExtensions.map(id => id.value)).join(', ')}`);
718
716
  }
719
717
  else {
720
718
  this._logService.error(`Extension host (${extensionHostKindToString(extensionHost.kind)}) terminated unexpectedly. No extensions were activated.`);
@@ -724,9 +722,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
724
722
  this._doStopExtensionHosts();
725
723
  const lock = await this._registry.acquireLock('startExtensionHosts');
726
724
  try {
727
- this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
725
+ this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
728
726
  const localProcessExtensionHosts = this._getExtensionHostManagers(1 );
729
- await Promise.all(( (localProcessExtensionHosts.map(extHost => extHost.ready()))));
727
+ await Promise.all(( localProcessExtensionHosts.map(extHost => extHost.ready())));
730
728
  }
731
729
  finally {
732
730
  lock.dispose();
@@ -749,9 +747,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
749
747
  }
750
748
  }
751
749
  _activateByEvent(activationEvent, activationKind) {
752
- const result = Promise.all(( (this._extensionHostManagers.map(
750
+ const result = Promise.all(( this._extensionHostManagers.map(
753
751
  extHostManager => extHostManager.activateByEvent(activationEvent, activationKind)
754
- )))).then(() => { });
752
+ ))).then(() => { });
755
753
  this._onWillActivateByEvent.fire({
756
754
  event: activationEvent,
757
755
  activation: result
@@ -787,7 +785,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
787
785
  const result = [];
788
786
  for (const desc of availableExtensions) {
789
787
  if (desc.contributes && hasOwnProperty.call(desc.contributes, extPoint.name)) {
790
- result.push(( (new ExtensionPointContribution(desc, desc.contributes[extPoint.name]))));
788
+ result.push(( new ExtensionPointContribution(desc, desc.contributes[extPoint.name])));
791
789
  }
792
790
  }
793
791
  return result;
@@ -812,12 +810,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
812
810
  return result;
813
811
  }
814
812
  async getInspectPorts(extensionHostKind, tryEnableInspector) {
815
- const result = await Promise.all(( (this._getExtensionHostManagers(extensionHostKind).map(extHost => extHost.getInspectPort(tryEnableInspector)))));
813
+ const result = await Promise.all(( this._getExtensionHostManagers(extensionHostKind).map(extHost => extHost.getInspectPort(tryEnableInspector))));
816
814
  return result.filter(element => Boolean(element));
817
815
  }
818
816
  async setRemoteEnvironment(env) {
819
- await ( (this._extensionHostManagers
820
- .map(manager => manager.setRemoteEnvironment(env))));
817
+ await ( this._extensionHostManagers
818
+ .map(manager => manager.setRemoteEnvironment(env)));
821
819
  }
822
820
  _safeInvokeIsEnabled(extension) {
823
821
  try {
@@ -852,8 +850,8 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
852
850
  performance.mark('code/didHandleExtensionPoints');
853
851
  }
854
852
  _getOrCreateExtensionStatus(extensionId) {
855
- if (!( (this._extensionStatus.has(extensionId)))) {
856
- this._extensionStatus.set(extensionId, ( (new ExtensionStatus(extensionId))));
853
+ if (!( this._extensionStatus.has(extensionId))) {
854
+ this._extensionStatus.set(extensionId, ( new ExtensionStatus(extensionId)));
857
855
  }
858
856
  return this._extensionStatus.get(extensionId);
859
857
  }
@@ -891,7 +889,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
891
889
  users.push({
892
890
  description: desc,
893
891
  value: desc.contributes[extensionPoint.name],
894
- collector: ( (new ExtensionMessageCollector(messageHandler, desc, extensionPoint.name)))
892
+ collector: ( new ExtensionMessageCollector(messageHandler, desc, extensionPoint.name))
895
893
  });
896
894
  }
897
895
  }
@@ -917,8 +915,8 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
917
915
  };
918
916
  }
919
917
  async _activateById(extensionId, reason) {
920
- const results = await Promise.all(( (this._extensionHostManagers.map(manager => manager.activate(extensionId, reason)))));
921
- const activated = ( (results.some(e => e)));
918
+ const results = await Promise.all(( this._extensionHostManagers.map(manager => manager.activate(extensionId, reason))));
919
+ const activated = ( results.some(e => e));
922
920
  if (!activated) {
923
921
  throw new Error(`Unknown extension ${extensionId.value}`);
924
922
  }
@@ -930,7 +928,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
930
928
  }
931
929
  _onDidActivateExtension(extensionId, codeLoadingTime, activateCallTime, activateResolvedTime, activationReason) {
932
930
  const extensionStatus = this._getOrCreateExtensionStatus(extensionId);
933
- extensionStatus.setActivationTimes(( (new ActivationTimes(codeLoadingTime, activateCallTime, activateResolvedTime, activationReason))));
931
+ extensionStatus.setActivationTimes(( new ActivationTimes(codeLoadingTime, activateCallTime, activateResolvedTime, activationReason)));
934
932
  this._onDidChangeExtensionsStatus.fire([extensionId]);
935
933
  }
936
934
  _onDidActivateExtensionError(extensionId, error) {
@@ -945,25 +943,25 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
945
943
  this._onDidChangeExtensionsStatus.fire([extensionId]);
946
944
  }
947
945
  };
948
- AbstractExtensionService = AbstractExtensionService_1 = ( (__decorate([
949
- ( (__param(3, IInstantiationService))),
950
- ( (__param(4, INotificationService))),
951
- ( (__param(5, IWorkbenchEnvironmentService))),
952
- ( (__param(6, ITelemetryService))),
953
- ( (__param(7, IWorkbenchExtensionEnablementService))),
954
- ( (__param(8, IFileService))),
955
- ( (__param(9, IProductService))),
956
- ( (__param(10, IWorkbenchExtensionManagementService))),
957
- ( (__param(11, IWorkspaceContextService))),
958
- ( (__param(12, IConfigurationService))),
959
- ( (__param(13, IExtensionManifestPropertiesService))),
960
- ( (__param(14, ILogService))),
961
- ( (__param(15, IRemoteAgentService))),
962
- ( (__param(16, IRemoteExtensionsScannerService))),
963
- ( (__param(17, ILifecycleService))),
964
- ( (__param(18, IRemoteAuthorityResolverService))),
965
- ( (__param(19, IDialogService)))
966
- ], AbstractExtensionService)));
946
+ AbstractExtensionService = AbstractExtensionService_1 = ( __decorate([
947
+ ( __param(3, IInstantiationService)),
948
+ ( __param(4, INotificationService)),
949
+ ( __param(5, IWorkbenchEnvironmentService)),
950
+ ( __param(6, ITelemetryService)),
951
+ ( __param(7, IWorkbenchExtensionEnablementService)),
952
+ ( __param(8, IFileService)),
953
+ ( __param(9, IProductService)),
954
+ ( __param(10, IWorkbenchExtensionManagementService)),
955
+ ( __param(11, IWorkspaceContextService)),
956
+ ( __param(12, IConfigurationService)),
957
+ ( __param(13, IExtensionManifestPropertiesService)),
958
+ ( __param(14, ILogService)),
959
+ ( __param(15, IRemoteAgentService)),
960
+ ( __param(16, IRemoteExtensionsScannerService)),
961
+ ( __param(17, ILifecycleService)),
962
+ ( __param(18, IRemoteAuthorityResolverService)),
963
+ ( __param(19, IDialogService))
964
+ ], AbstractExtensionService));
967
965
  class ResolvedExtensions {
968
966
  constructor(local, remote, hasLocalProcess, allowRemoteExtensionsInLocalWebWorker) {
969
967
  this.local = local;