@codingame/monaco-vscode-api 1.69.24 → 1.76.0-next.1

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.
@@ -1,28 +1,24 @@
1
- import { E as Emitter, _ as __decorate, a as __param } from './workspace.js';
2
- import { U as UserSettings, p as parseTree, f as findNodeAtLocation, c as createScanner } from './polyfill.js';
3
- import { b as IPolicyService, N as NullPolicyService } from './missing-services.js';
4
- import { i as isEmptyObject } from './types.js';
5
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
- import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
7
- import { Extensions, machineOverridableSettings, windowSettings, resourceSettings, allSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId, OVERRIDE_PROPERTY_REGEX, overrideIdentifiersFromKey, applicationSettings, machineSettings } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
8
- import { Configuration, ConfigurationModel, ConfigurationChangeEvent } from 'monaco-editor/esm/vs/platform/configuration/common/configurationModels.js';
9
- import { IConfigurationService, addToValueTree, toValuesTree } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
10
- import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
11
- import { coalesce } from 'monaco-editor/esm/vs/base/common/arrays.js';
12
- import { equals } from 'monaco-editor/esm/vs/base/common/objects.js';
13
- import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
1
+ import { E as Emitter, _ as __decorate, a as __param } from './contextkey.js';
2
+ import { I as IPolicyService, N as NullPolicyService, b as NullPolicyConfiguration, P as PolicyConfiguration, U as UserSettings, c as parseTree, d as findNodeAtLocation, e as createScanner } from './polyfill.js';
3
+ import { c as IExtensionService, I as ILifecycleService } from './missing-services.js';
14
4
  import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
15
- import { isArray } from 'monaco-editor/esm/vs/base/common/types.js';
5
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
+ import { DefaultConfiguration } from 'monaco-editor/esm/vs/platform/configuration/common/configurations.js';
16
7
  import { extUriBiasedIgnorePathCase } from 'monaco-editor/esm/vs/base/common/resources.js';
17
- import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
18
- import { bg as Position$2, bh as keyFromOverrideIdentifiers, bi as configurationDefaultsSchemaId } from './extHost.js';
19
- export { bj as ConfigurationScope } from './extHost.js';
8
+ import { Configuration, ConfigurationModel, ConfigurationChangeEvent } from 'monaco-editor/esm/vs/platform/configuration/common/configurationModels.js';
9
+ import { RunOnceScheduler, Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
10
+ import { bn as Position$2, bo as keyFromOverrideIdentifiers, bp as configurationDefaultsSchemaId } from './extHost.js';
11
+ export { bq as ConfigurationScope } from './extHost.js';
12
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
20
13
  import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
21
14
  import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
22
15
  import { r as IUserDataProfilesService, c as IFileService, l as IWorkbenchEnvironmentService } from './services2.js';
16
+ import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
17
+ import { Extensions, applicationSettings, windowSettings, resourceSettings, allSettings, machineSettings, machineOverridableSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
23
18
  import { localize } from 'monaco-editor/esm/vs/nls.js';
24
19
  import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
25
20
  import { IWorkspaceTrustManagementService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
21
+ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
26
22
  import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
27
23
  import { g as getServiceOverride$2 } from './workspaceContext.js';
28
24
  import { g as getServiceOverride$1 } from './files.js';
@@ -32,6 +28,7 @@ import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/c
32
28
  import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
33
29
  import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
34
30
  import { createTextBuffer, TextModel } from 'monaco-editor/esm/vs/editor/common/model/textModel.js';
31
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
35
32
  function isConfigurationOverrides(thing) {
36
33
  return thing
37
34
  && typeof thing === 'object'
@@ -41,157 +38,10 @@ function isConfigurationOverrides(thing) {
41
38
  function isConfigurationUpdateOverrides(thing) {
42
39
  return thing
43
40
  && typeof thing === 'object'
44
- && (!thing.overrideIdentifiers || isArray(thing.overrideIdentifiers))
41
+ && (!thing.overrideIdentifiers || Array.isArray(thing.overrideIdentifiers))
45
42
  && !thing.overrideIdentifier
46
43
  && (!thing.resource || thing.resource instanceof URI);
47
44
  }
48
- class DefaultConfiguration extends Disposable {
49
- constructor() {
50
- super(...arguments);
51
- this._onDidChangeConfiguration = this._register(( (new Emitter())));
52
- this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
53
- }
54
- get configurationModel() {
55
- if (!this._configurationModel) {
56
- this._configurationModel = ( (new DefaultConfigurationModel(this.getConfigurationDefaultOverrides())));
57
- }
58
- return this._configurationModel;
59
- }
60
- async initialize() {
61
- this._configurationModel = undefined;
62
- this._register(( (Registry.as(Extensions.Configuration))).onDidUpdateConfiguration(({ properties, defaultsOverrides }) => this.onDidUpdateConfiguration(properties, defaultsOverrides)));
63
- return this.configurationModel;
64
- }
65
- reload() {
66
- this._configurationModel = undefined;
67
- return this.configurationModel;
68
- }
69
- onDidUpdateConfiguration(properties, defaultsOverrides) {
70
- this._configurationModel = undefined;
71
- this._onDidChangeConfiguration.fire({ defaults: this.configurationModel, properties });
72
- }
73
- getConfigurationDefaultOverrides() {
74
- return {};
75
- }
76
- }
77
- class DefaultConfigurationModel extends ConfigurationModel {
78
- constructor(configurationDefaultsOverrides = {}) {
79
- const properties = ( (Registry.as(Extensions.Configuration))).getConfigurationProperties();
80
- const keys = ( (Object.keys(properties)));
81
- const contents = Object.create(null);
82
- const overrides = [];
83
- for (const key in properties) {
84
- const defaultOverrideValue = configurationDefaultsOverrides[key];
85
- const value = defaultOverrideValue !== undefined ? defaultOverrideValue : properties[key].default;
86
- addToValueTree(contents, key, value, message => console.error(`Conflict in default settings: ${message}`));
87
- }
88
- for (const key of ( (Object.keys(contents)))) {
89
- if (OVERRIDE_PROPERTY_REGEX.test(key)) {
90
- overrides.push({
91
- identifiers: overrideIdentifiersFromKey(key),
92
- keys: ( (Object.keys(contents[key]))),
93
- contents: toValuesTree(contents[key], message => console.error(`Conflict in default settings file: ${message}`)),
94
- });
95
- }
96
- }
97
- super(contents, keys, overrides);
98
- }
99
- }
100
- class NullPolicyConfiguration {
101
- constructor() {
102
- this.onDidChangeConfiguration = Event.None;
103
- this.configurationModel = ( (new ConfigurationModel()));
104
- }
105
- async initialize() { return this.configurationModel; }
106
- }
107
- let PolicyConfiguration = class PolicyConfiguration extends Disposable {
108
- constructor(defaultConfiguration, policyService, logService) {
109
- super();
110
- this.defaultConfiguration = defaultConfiguration;
111
- this.policyService = policyService;
112
- this.logService = logService;
113
- this._onDidChangeConfiguration = this._register(( (new Emitter())));
114
- this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
115
- this._configurationModel = ( (new ConfigurationModel()));
116
- }
117
- get configurationModel() { return this._configurationModel; }
118
- async initialize() {
119
- this.update(await this.registerPolicyDefinitions(this.defaultConfiguration.configurationModel.keys), false);
120
- this._register(this.policyService.onDidChange(policyNames => this.onDidChangePolicies(policyNames)));
121
- this._register(this.defaultConfiguration.onDidChangeConfiguration(async ({ properties }) => this.update(await this.registerPolicyDefinitions(properties), true)));
122
- return this._configurationModel;
123
- }
124
- async registerPolicyDefinitions(properties) {
125
- const policyDefinitions = {};
126
- const keys = [];
127
- const configurationProperties = ( (Registry.as(Extensions.Configuration))).getConfigurationProperties();
128
- for (const key of properties) {
129
- const config = configurationProperties[key];
130
- if (!config) {
131
- keys.push(key);
132
- continue;
133
- }
134
- if (config.policy) {
135
- if (config.type !== 'string' && config.type !== 'number') {
136
- this.logService.warn(`Policy ${config.policy.name} has unsupported type ${config.type}`);
137
- continue;
138
- }
139
- keys.push(key);
140
- policyDefinitions[config.policy.name] = { type: config.type };
141
- }
142
- }
143
- if (!isEmptyObject(policyDefinitions)) {
144
- await this.policyService.registerPolicyDefinitions(policyDefinitions);
145
- }
146
- return keys;
147
- }
148
- onDidChangePolicies(policyNames) {
149
- const policyConfigurations = ( (Registry.as(Extensions.Configuration))).getPolicyConfigurations();
150
- const keys = coalesce(policyNames.map(policyName => policyConfigurations.get(policyName)));
151
- this.update(keys, true);
152
- }
153
- update(keys, trigger) {
154
- const configurationProperties = ( (Registry.as(Extensions.Configuration))).getConfigurationProperties();
155
- const changed = [];
156
- const wasEmpty = this._configurationModel.isEmpty();
157
- for (const key of keys) {
158
- const policyName = configurationProperties[key]?.policy?.name;
159
- if (policyName) {
160
- const policyValue = this.policyService.getPolicyValue(policyName);
161
- if (wasEmpty ? policyValue !== undefined : !equals(this._configurationModel.getValue(key), policyValue)) {
162
- changed.push([key, policyValue]);
163
- }
164
- }
165
- else {
166
- if (this._configurationModel.getValue(key) !== undefined) {
167
- changed.push([key, undefined]);
168
- }
169
- }
170
- }
171
- if (changed.length) {
172
- const old = this._configurationModel;
173
- this._configurationModel = ( (new ConfigurationModel()));
174
- for (const key of old.keys) {
175
- this._configurationModel.setValue(key, old.getValue(key));
176
- }
177
- for (const [key, policyValue] of changed) {
178
- if (policyValue === undefined) {
179
- this._configurationModel.removeValue(key);
180
- }
181
- else {
182
- this._configurationModel.setValue(key, policyValue);
183
- }
184
- }
185
- if (trigger) {
186
- this._onDidChangeConfiguration.fire(this._configurationModel);
187
- }
188
- }
189
- }
190
- };
191
- PolicyConfiguration = ( (__decorate([
192
- ( (__param(1, IPolicyService))),
193
- ( (__param(2, ILogService)))
194
- ], PolicyConfiguration)));
195
45
  function format(documentText, range, options) {
196
46
  let initialIndentLevel;
197
47
  let formatText;
@@ -690,7 +540,7 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
690
540
  return {
691
541
  affectedKeys: configurationChangeEvent.affectedKeys,
692
542
  affectsConfiguration: (resource, configuration) => {
693
- const overrideIdentifier = this.getLanguage(resource, null);
543
+ const overrideIdentifier = resource ? this.getLanguage(resource, null) : undefined;
694
544
  return configurationChangeEvent.affectsConfiguration(configuration, { resource, overrideIdentifier });
695
545
  }
696
546
  };
@@ -716,16 +566,17 @@ WORKSPACE_STANDALONE_CONFIGURATIONS[LAUNCH_CONFIGURATION_KEY] = `${FOLDER_CONFIG
716
566
  const USER_STANDALONE_CONFIGURATIONS = Object.create(null);
717
567
  USER_STANDALONE_CONFIGURATIONS[TASKS_CONFIGURATION_KEY] = `${TASKS_CONFIGURATION_KEY}.json`;
718
568
  let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchemasContribution extends Disposable {
719
- constructor(workspaceContextService, environmentService, workspaceTrustManagementService) {
569
+ constructor(workspaceContextService, environmentService, workspaceTrustManagementService, extensionService, lifecycleService) {
720
570
  super();
721
571
  this.workspaceContextService = workspaceContextService;
722
572
  this.environmentService = environmentService;
723
573
  this.workspaceTrustManagementService = workspaceTrustManagementService;
724
- this.registerConfigurationSchemas();
725
- const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
726
- this._register(configurationRegistry.onDidUpdateConfiguration(e => this.registerConfigurationSchemas()));
727
- this._register(configurationRegistry.onDidSchemaChange(e => this.registerConfigurationSchemas()));
728
- this._register(workspaceTrustManagementService.onDidChangeTrust(() => this.registerConfigurationSchemas()));
574
+ extensionService.whenInstalledExtensionsRegistered().then(() => {
575
+ this.registerConfigurationSchemas();
576
+ const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
577
+ const delayer = this._register(( (new Delayer(50))));
578
+ this._register(Event.any(configurationRegistry.onDidUpdateConfiguration, configurationRegistry.onDidSchemaChange, workspaceTrustManagementService.onDidChangeTrust)(() => delayer.trigger(() => this.registerConfigurationSchemas(), lifecycleService.phase === 4 ? undefined : 2500 )));
579
+ });
729
580
  }
730
581
  registerConfigurationSchemas() {
731
582
  const jsonRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
@@ -738,11 +589,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
738
589
  };
739
590
  const userSettingsSchema = this.environmentService.remoteAuthority ?
740
591
  {
741
- properties: {
742
- ...applicationSettings.properties,
743
- ...windowSettings.properties,
744
- ...resourceSettings.properties
745
- },
592
+ properties: Object.assign({}, applicationSettings.properties, windowSettings.properties, resourceSettings.properties),
746
593
  patternProperties: allSettings.patternProperties,
747
594
  additionalProperties: true,
748
595
  allowTrailingCommas: true,
@@ -750,35 +597,21 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
750
597
  }
751
598
  : allSettingsSchema;
752
599
  const profileSettingsSchema = {
753
- properties: {
754
- ...machineSettings.properties,
755
- ...machineOverridableSettings.properties,
756
- ...windowSettings.properties,
757
- ...resourceSettings.properties
758
- },
600
+ properties: Object.assign({}, machineSettings.properties, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
759
601
  patternProperties: allSettings.patternProperties,
760
602
  additionalProperties: true,
761
603
  allowTrailingCommas: true,
762
604
  allowComments: true
763
605
  };
764
606
  const machineSettingsSchema = {
765
- properties: {
766
- ...machineSettings.properties,
767
- ...machineOverridableSettings.properties,
768
- ...windowSettings.properties,
769
- ...resourceSettings.properties
770
- },
607
+ properties: Object.assign({}, machineSettings.properties, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
771
608
  patternProperties: allSettings.patternProperties,
772
609
  additionalProperties: true,
773
610
  allowTrailingCommas: true,
774
611
  allowComments: true
775
612
  };
776
613
  const workspaceSettingsSchema = {
777
- properties: {
778
- ...this.checkAndFilterPropertiesRequiringTrust(machineOverridableSettings.properties),
779
- ...this.checkAndFilterPropertiesRequiringTrust(windowSettings.properties),
780
- ...this.checkAndFilterPropertiesRequiringTrust(resourceSettings.properties)
781
- },
614
+ properties: Object.assign({}, this.checkAndFilterPropertiesRequiringTrust(machineOverridableSettings.properties), this.checkAndFilterPropertiesRequiringTrust(windowSettings.properties), this.checkAndFilterPropertiesRequiringTrust(resourceSettings.properties)),
782
615
  patternProperties: allSettings.patternProperties,
783
616
  additionalProperties: true,
784
617
  allowTrailingCommas: true,
@@ -786,17 +619,11 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
786
619
  };
787
620
  jsonRegistry.registerSchema(defaultSettingsSchemaId, {
788
621
  properties: ( (Object.keys(allSettings.properties))).reduce((result, key) => {
789
- result[key] = {
790
- ...allSettings.properties[key],
791
- deprecationMessage: undefined
792
- };
622
+ result[key] = Object.assign({ deprecationMessage: undefined }, allSettings.properties[key]);
793
623
  return result;
794
624
  }, {}),
795
625
  patternProperties: ( (Object.keys(allSettings.patternProperties))).reduce((result, key) => {
796
- result[key] = {
797
- ...allSettings.patternProperties[key],
798
- deprecationMessage: undefined
799
- };
626
+ result[key] = Object.assign({ deprecationMessage: undefined }, allSettings.patternProperties[key]);
800
627
  return result;
801
628
  }, {}),
802
629
  additionalProperties: true,
@@ -808,10 +635,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
808
635
  jsonRegistry.registerSchema(machineSettingsSchemaId, machineSettingsSchema);
809
636
  if (3 === this.workspaceContextService.getWorkbenchState()) {
810
637
  const folderSettingsSchema = {
811
- properties: {
812
- ...this.checkAndFilterPropertiesRequiringTrust(machineOverridableSettings.properties),
813
- ...this.checkAndFilterPropertiesRequiringTrust(resourceSettings.properties)
814
- },
638
+ properties: Object.assign({}, this.checkAndFilterPropertiesRequiringTrust(machineOverridableSettings.properties), this.checkAndFilterPropertiesRequiringTrust(resourceSettings.properties)),
815
639
  patternProperties: allSettings.patternProperties,
816
640
  additionalProperties: true,
817
641
  allowTrailingCommas: true,
@@ -830,11 +654,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
830
654
  'configurationDefaults.description',
831
655
  'Contribute defaults for configurations'
832
656
  ))),
833
- properties: {
834
- ...machineOverridableSettings.properties,
835
- ...windowSettings.properties,
836
- ...resourceSettings.properties
837
- },
657
+ properties: Object.assign({}, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
838
658
  patternProperties: {
839
659
  [OVERRIDE_PROPERTY_PATTERN]: {
840
660
  type: 'object',
@@ -861,7 +681,9 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
861
681
  RegisterConfigurationSchemasContribution = ( (__decorate([
862
682
  ( (__param(0, IWorkspaceContextService))),
863
683
  ( (__param(1, IWorkbenchEnvironmentService))),
864
- ( (__param(2, IWorkspaceTrustManagementService)))
684
+ ( (__param(2, IWorkspaceTrustManagementService))),
685
+ ( (__param(3, IExtensionService))),
686
+ ( (__param(4, ILifecycleService)))
865
687
  ], RegisterConfigurationSchemasContribution)));
866
688
  async function updateUserConfiguration(configurationJson) {
867
689
  const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService);
@@ -898,9 +720,13 @@ let InjectedConfigurationService = class InjectedConfigurationService extends Co
898
720
  constructor(userDataProfilesService, fileService, policyService, logService) {
899
721
  super(userDataProfilesService.defaultProfile.settingsResource, fileService, policyService, logService);
900
722
  this.userDataProfilesService = userDataProfilesService;
901
- this.initialize().catch(error => {
902
- logService.error(error);
903
- });
723
+ }
724
+ getValue(...args) {
725
+ const value = super.getValue.apply(this, args);
726
+ if (args[0] === 'keyboard') {
727
+ return value ?? {};
728
+ }
729
+ return value;
904
730
  }
905
731
  async updateValue(key, value, arg3, arg4) {
906
732
  const overrides = isConfigurationUpdateOverrides(arg3)
@@ -926,9 +752,13 @@ InjectedConfigurationService = ( __decorate([
926
752
  ( __param(2, IPolicyService)),
927
753
  ( __param(3, ILogService))
928
754
  ], InjectedConfigurationService));
929
- function initialize(instantiationService) {
755
+ async function initialize(instantiationService) {
930
756
  instantiationService.createInstance(RegisterConfigurationSchemasContribution);
931
- void updateUserConfiguration('{}');
757
+ const configurationService = instantiationService.invokeFunction((accessor) => accessor.get(IConfigurationService));
758
+ await Promise.all([
759
+ updateUserConfiguration('{}'),
760
+ configurationService.initialize()
761
+ ]);
932
762
  }
933
763
  function getServiceOverride() {
934
764
  onServicesInitialized(initialize);
@@ -1,8 +1,6 @@
1
1
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
2
2
  import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
3
3
  import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
4
- import { joinPath } from 'monaco-editor/esm/vs/base/common/resources.js';
5
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
6
4
  const Emitter = monaco.Emitter;
7
5
  var NeverShowAgainScope;
8
6
  ( (function(NeverShowAgainScope) {
@@ -145,11 +143,6 @@ class ContextKeyTrueExpr {
145
143
  }
146
144
  ContextKeyTrueExpr.INSTANCE = ( new ContextKeyTrueExpr());
147
145
  class ContextKeyDefinedExpr {
148
- constructor(key, negated) {
149
- this.key = key;
150
- this.negated = negated;
151
- this.type = 2 ;
152
- }
153
146
  static create(key, negated = null) {
154
147
  const constantValue = CONSTANT_VALUES.get(key);
155
148
  if (typeof constantValue === 'boolean') {
@@ -157,6 +150,11 @@ class ContextKeyDefinedExpr {
157
150
  }
158
151
  return ( new ContextKeyDefinedExpr(key, negated));
159
152
  }
153
+ constructor(key, negated) {
154
+ this.key = key;
155
+ this.negated = negated;
156
+ this.type = 2 ;
157
+ }
160
158
  cmp(other) {
161
159
  if (other.type !== this.type) {
162
160
  return this.type - other.type;
@@ -196,12 +194,6 @@ class ContextKeyDefinedExpr {
196
194
  }
197
195
  }
198
196
  class ContextKeyEqualsExpr {
199
- constructor(key, value, negated) {
200
- this.key = key;
201
- this.value = value;
202
- this.negated = negated;
203
- this.type = 4 ;
204
- }
205
197
  static create(key, value, negated = null) {
206
198
  if (typeof value === 'boolean') {
207
199
  return (value ? ( ContextKeyDefinedExpr.create(key, negated)) : ( ContextKeyNotExpr.create(key, negated)));
@@ -213,6 +205,12 @@ class ContextKeyEqualsExpr {
213
205
  }
214
206
  return ( new ContextKeyEqualsExpr(key, value, negated));
215
207
  }
208
+ constructor(key, value, negated) {
209
+ this.key = key;
210
+ this.value = value;
211
+ this.negated = negated;
212
+ this.type = 4 ;
213
+ }
216
214
  cmp(other) {
217
215
  if (other.type !== this.type) {
218
216
  return this.type - other.type;
@@ -253,12 +251,6 @@ class ContextKeyEqualsExpr {
253
251
  }
254
252
  }
255
253
  class ContextKeyNotEqualsExpr {
256
- constructor(key, value, negated) {
257
- this.key = key;
258
- this.value = value;
259
- this.negated = negated;
260
- this.type = 5 ;
261
- }
262
254
  static create(key, value, negated = null) {
263
255
  if (typeof value === 'boolean') {
264
256
  if (value) {
@@ -273,6 +265,12 @@ class ContextKeyNotEqualsExpr {
273
265
  }
274
266
  return ( new ContextKeyNotEqualsExpr(key, value, negated));
275
267
  }
268
+ constructor(key, value, negated) {
269
+ this.key = key;
270
+ this.value = value;
271
+ this.negated = negated;
272
+ this.type = 5 ;
273
+ }
276
274
  cmp(other) {
277
275
  if (other.type !== this.type) {
278
276
  return this.type - other.type;
@@ -313,11 +311,6 @@ class ContextKeyNotEqualsExpr {
313
311
  }
314
312
  }
315
313
  class ContextKeyNotExpr {
316
- constructor(key, negated) {
317
- this.key = key;
318
- this.negated = negated;
319
- this.type = 3 ;
320
- }
321
314
  static create(key, negated = null) {
322
315
  const constantValue = CONSTANT_VALUES.get(key);
323
316
  if (typeof constantValue === 'boolean') {
@@ -325,6 +318,11 @@ class ContextKeyNotExpr {
325
318
  }
326
319
  return ( new ContextKeyNotExpr(key, negated));
327
320
  }
321
+ constructor(key, negated) {
322
+ this.key = key;
323
+ this.negated = negated;
324
+ this.type = 3 ;
325
+ }
328
326
  cmp(other) {
329
327
  if (other.type !== this.type) {
330
328
  return this.type - other.type;
@@ -364,6 +362,9 @@ class ContextKeyNotExpr {
364
362
  }
365
363
  }
366
364
  class RawContextKey extends ContextKeyDefinedExpr {
365
+ static all() {
366
+ return ( RawContextKey._info.values());
367
+ }
367
368
  constructor(key, defaultValue, metaOrHide) {
368
369
  super(key, null);
369
370
  this._defaultValue = defaultValue;
@@ -374,9 +375,6 @@ class RawContextKey extends ContextKeyDefinedExpr {
374
375
  RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
375
376
  }
376
377
  }
377
- static all() {
378
- return ( RawContextKey._info.values());
379
- }
380
378
  bindTo(target) {
381
379
  return target.createKey(this.key, this._defaultValue);
382
380
  }
@@ -418,23 +416,4 @@ function cmp2(key1, value1, key2, value2) {
418
416
  }
419
417
  return 0;
420
418
  }
421
- function isWorkspaceIdentifier(obj) {
422
- const workspaceIdentifier = obj;
423
- return typeof workspaceIdentifier?.id === 'string' && URI.isUri(workspaceIdentifier.configPath);
424
- }
425
- class WorkspaceFolder {
426
- constructor(data,
427
- raw) {
428
- this.raw = raw;
429
- this.uri = data.uri;
430
- this.index = data.index;
431
- this.name = data.name;
432
- }
433
- toResource(relativePath) {
434
- return joinPath(this.uri, relativePath);
435
- }
436
- toJSON() {
437
- return { uri: this.uri, name: this.name, index: this.index };
438
- }
439
- }
440
- export { ContextKeyExprType as C, Emitter as E, NotificationsFilter as N, RawContextKey as R, WorkspaceFolder as W, __decorate as _, __param as a, NeverShowAgainScope as b, __classPrivateFieldSet as c, __classPrivateFieldGet as d, NoOpNotification as e, isWorkspaceIdentifier as i };
419
+ export { ContextKeyExprType as C, Emitter as E, NotificationsFilter as N, RawContextKey as R, __decorate as _, __param as a, NeverShowAgainScope as b, __classPrivateFieldSet as c, __classPrivateFieldGet as d, NoOpNotification as e };