@codingame/monaco-vscode-configuration-service-override 4.5.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +2 -20
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +89 -188
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +33 -43
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +41 -30
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +125 -116
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +103 -142
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +11 -11
- package/vscode/src/vs/workbench/services/label/common/labelService.js +39 -63
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +39 -48
|
@@ -19,6 +19,7 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
|
|
|
19
19
|
import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
20
20
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
21
21
|
|
|
22
|
+
const _moduleId = "vs/workbench/contrib/workspaces/browser/workspaces.contribution";
|
|
22
23
|
let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Disposable {
|
|
23
24
|
constructor(contextService, notificationService, fileService, quickInputService, hostService, storageService) {
|
|
24
25
|
super();
|
|
@@ -47,15 +48,14 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
47
48
|
const neverShowAgain = { id: 'workspaces.dontPromptToOpen', scope: NeverShowAgainScope.WORKSPACE, isSecondary: true };
|
|
48
49
|
if (workspaces.length === 1) {
|
|
49
50
|
const workspaceFile = workspaces[0];
|
|
50
|
-
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
)),
|
|
51
|
+
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
52
|
+
_moduleId,
|
|
53
|
+
0,
|
|
54
|
+
"This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
|
|
55
|
+
workspaceFile,
|
|
56
|
+
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
57
|
+
)), [{
|
|
58
|
+
label: ( localizeWithPath(_moduleId, 1, "Open Workspace")),
|
|
59
59
|
run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
|
|
60
60
|
}], {
|
|
61
61
|
neverShowAgain,
|
|
@@ -63,21 +63,15 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
else if (workspaces.length > 1) {
|
|
66
|
-
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"Select Workspace"
|
|
74
|
-
)),
|
|
66
|
+
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
67
|
+
_moduleId,
|
|
68
|
+
2,
|
|
69
|
+
"This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
|
|
70
|
+
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
71
|
+
)), [{
|
|
72
|
+
label: ( localizeWithPath(_moduleId, 3, "Select Workspace")),
|
|
75
73
|
run: () => {
|
|
76
|
-
this.quickInputService.pick(( workspaces.map(workspace => ({ label: workspace }))), { placeHolder: ( localizeWithPath(
|
|
77
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
78
|
-
'selectToOpen',
|
|
79
|
-
"Select a workspace to open"
|
|
80
|
-
)) }).then(pick => {
|
|
74
|
+
this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localizeWithPath(_moduleId, 4, "Select a workspace to open")) }).then(pick => {
|
|
81
75
|
if (pick) {
|
|
82
76
|
this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
|
|
83
77
|
}
|
|
@@ -90,28 +84,28 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
90
84
|
}
|
|
91
85
|
}
|
|
92
86
|
};
|
|
93
|
-
WorkspacesFinderContribution = ( __decorate([
|
|
94
|
-
( __param(0, IWorkspaceContextService)),
|
|
95
|
-
( __param(1, INotificationService)),
|
|
96
|
-
( __param(2, IFileService)),
|
|
97
|
-
( __param(3, IQuickInputService)),
|
|
98
|
-
( __param(4, IHostService)),
|
|
99
|
-
( __param(5, IStorageService))
|
|
100
|
-
], WorkspacesFinderContribution));
|
|
101
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspacesFinderContribution, 4 );
|
|
87
|
+
WorkspacesFinderContribution = ( (__decorate([
|
|
88
|
+
( (__param(0, IWorkspaceContextService))),
|
|
89
|
+
( (__param(1, INotificationService))),
|
|
90
|
+
( (__param(2, IFileService))),
|
|
91
|
+
( (__param(3, IQuickInputService))),
|
|
92
|
+
( (__param(4, IHostService))),
|
|
93
|
+
( (__param(5, IStorageService)))
|
|
94
|
+
], WorkspacesFinderContribution)));
|
|
95
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspacesFinderContribution, 4 );
|
|
102
96
|
registerAction2(class extends Action2 {
|
|
103
97
|
constructor() {
|
|
104
98
|
super({
|
|
105
99
|
id: 'workbench.action.openWorkspaceFromEditor',
|
|
106
|
-
title: ( localize2WithPath(
|
|
107
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
108
|
-
'openWorkspace',
|
|
109
|
-
"Open Workspace"
|
|
110
|
-
)),
|
|
100
|
+
title: ( localize2WithPath(_moduleId, 1, "Open Workspace")),
|
|
111
101
|
f1: false,
|
|
112
102
|
menu: {
|
|
113
103
|
id: MenuId.EditorContent,
|
|
114
|
-
when: ( ContextKeyExpr.and(
|
|
104
|
+
when: ( (ContextKeyExpr.and(
|
|
105
|
+
(ResourceContextKey.Extension.isEqualTo(WORKSPACE_SUFFIX)),
|
|
106
|
+
(ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)),
|
|
107
|
+
(TemporaryWorkspaceContext.toNegated())
|
|
108
|
+
)))
|
|
115
109
|
}
|
|
116
110
|
});
|
|
117
111
|
}
|
|
@@ -122,11 +116,7 @@ registerAction2(class extends Action2 {
|
|
|
122
116
|
if (contextService.getWorkbenchState() === 3 ) {
|
|
123
117
|
const workspaceConfiguration = contextService.getWorkspace().configuration;
|
|
124
118
|
if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
|
|
125
|
-
notificationService.info(( localizeWithPath(
|
|
126
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
127
|
-
'alreadyOpen',
|
|
128
|
-
"This workspace is already open."
|
|
129
|
-
)));
|
|
119
|
+
notificationService.info(( localizeWithPath(_moduleId, 5, "This workspace is already open.")));
|
|
130
120
|
return;
|
|
131
121
|
}
|
|
132
122
|
}
|
|
@@ -16,8 +16,8 @@ import { DefaultConfiguration as DefaultConfiguration$1 } from 'vscode/vscode/vs
|
|
|
16
16
|
|
|
17
17
|
class DefaultConfiguration extends DefaultConfiguration$1 {
|
|
18
18
|
static { this.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY = 'DefaultOverridesCacheExists'; }
|
|
19
|
-
constructor(configurationCache, environmentService) {
|
|
20
|
-
super();
|
|
19
|
+
constructor(configurationCache, environmentService, logService) {
|
|
20
|
+
super(logService);
|
|
21
21
|
this.configurationCache = configurationCache;
|
|
22
22
|
this.configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
23
23
|
this.cachedConfigurationDefaultsOverrides = {};
|
|
@@ -91,8 +91,8 @@ class DefaultConfiguration extends DefaultConfiguration$1 {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
class ApplicationConfiguration extends UserSettings {
|
|
94
|
-
constructor(userDataProfilesService, fileService, uriIdentityService) {
|
|
95
|
-
super(userDataProfilesService.defaultProfile.settingsResource, { scopes: [1 ] }, uriIdentityService.extUri, fileService);
|
|
94
|
+
constructor(userDataProfilesService, fileService, uriIdentityService, logService) {
|
|
95
|
+
super(userDataProfilesService.defaultProfile.settingsResource, { scopes: [1 ] }, uriIdentityService.extUri, fileService, logService);
|
|
96
96
|
this._onDidChangeConfiguration = this._register(( new Emitter()));
|
|
97
97
|
this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
98
98
|
this._register(this.onDidChange(() => this.reloadConfigurationScheduler.schedule()));
|
|
@@ -131,7 +131,8 @@ class UserConfiguration extends Disposable {
|
|
|
131
131
|
settingsResource,
|
|
132
132
|
this.configurationParseOptions,
|
|
133
133
|
uriIdentityService.extUri,
|
|
134
|
-
this.fileService
|
|
134
|
+
this.fileService,
|
|
135
|
+
logService
|
|
135
136
|
));
|
|
136
137
|
this.userConfigurationChangeDisposable.value = this.userConfiguration.value.onDidChange(() => this.reloadConfigurationScheduler.schedule());
|
|
137
138
|
this.reloadConfigurationScheduler = this._register(( new RunOnceScheduler(
|
|
@@ -188,10 +189,10 @@ class FileServiceBasedConfiguration extends Disposable {
|
|
|
188
189
|
resource => combinedDisposable(this.fileService.watch(uriIdentityService.extUri.dirname(resource)),
|
|
189
190
|
this.fileService.watch(resource))
|
|
190
191
|
))));
|
|
191
|
-
this._folderSettingsModelParser = ( new ConfigurationModelParser(name));
|
|
192
|
+
this._folderSettingsModelParser = ( new ConfigurationModelParser(name, logService));
|
|
192
193
|
this._folderSettingsParseOptions = configurationParseOptions;
|
|
193
194
|
this._standAloneConfigurations = [];
|
|
194
|
-
this._cache =
|
|
195
|
+
this._cache = ConfigurationModel.createEmptyModel(this.logService);
|
|
195
196
|
this._register(Event.debounce(Event.any(Event.filter(this.fileService.onDidFilesChange, e => this.handleFileChangesEvent(e)), Event.filter(this.fileService.onDidRunOperation, e => this.handleFileOperationEvent(e))), () => undefined, 100)(() => this._onDidChange.fire()));
|
|
196
197
|
}
|
|
197
198
|
async resolveContents(donotResolveSettings) {
|
|
@@ -229,7 +230,7 @@ class FileServiceBasedConfiguration extends Disposable {
|
|
|
229
230
|
for (let index = 0; index < standAloneConfigurationContents.length; index++) {
|
|
230
231
|
const contents = standAloneConfigurationContents[index][1];
|
|
231
232
|
if (contents !== undefined) {
|
|
232
|
-
const standAloneConfigurationModelParser = ( new StandaloneConfigurationModelParser(( this.standAloneConfigurationResources[index][1].toString()), this.standAloneConfigurationResources[index][0]));
|
|
233
|
+
const standAloneConfigurationModelParser = ( new StandaloneConfigurationModelParser(( this.standAloneConfigurationResources[index][1].toString()), this.standAloneConfigurationResources[index][0], this.logService));
|
|
233
234
|
standAloneConfigurationModelParser.parse(contents);
|
|
234
235
|
this._standAloneConfigurations.push(standAloneConfigurationModelParser.configurationModel);
|
|
235
236
|
}
|
|
@@ -279,7 +280,7 @@ class FileServiceBasedConfiguration extends Disposable {
|
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
282
|
class RemoteUserConfiguration extends Disposable {
|
|
282
|
-
constructor(remoteAuthority, configurationCache, fileService, uriIdentityService, remoteAgentService) {
|
|
283
|
+
constructor(remoteAuthority, configurationCache, fileService, uriIdentityService, remoteAgentService, logService) {
|
|
283
284
|
super();
|
|
284
285
|
this._userConfigurationInitializationPromise = null;
|
|
285
286
|
this._onDidChangeConfiguration = this._register(( new Emitter()));
|
|
@@ -287,14 +288,20 @@ class RemoteUserConfiguration extends Disposable {
|
|
|
287
288
|
this._onDidInitialize = this._register(( new Emitter()));
|
|
288
289
|
this.onDidInitialize = this._onDidInitialize.event;
|
|
289
290
|
this._fileService = fileService;
|
|
290
|
-
this._userConfiguration = this._cachedConfiguration = ( new CachedRemoteUserConfiguration(
|
|
291
|
+
this._userConfiguration = this._cachedConfiguration = ( new CachedRemoteUserConfiguration(
|
|
292
|
+
remoteAuthority,
|
|
293
|
+
configurationCache,
|
|
294
|
+
{ scopes: REMOTE_MACHINE_SCOPES },
|
|
295
|
+
logService
|
|
296
|
+
));
|
|
291
297
|
remoteAgentService.getEnvironment().then(async (environment) => {
|
|
292
298
|
if (environment) {
|
|
293
299
|
const userConfiguration = this._register(( new FileServiceBasedRemoteUserConfiguration(
|
|
294
300
|
environment.settingsPath,
|
|
295
301
|
{ scopes: REMOTE_MACHINE_SCOPES },
|
|
296
302
|
this._fileService,
|
|
297
|
-
uriIdentityService
|
|
303
|
+
uriIdentityService,
|
|
304
|
+
logService
|
|
298
305
|
)));
|
|
299
306
|
this._register(userConfiguration.onDidChangeConfiguration(configurationModel => this.onDidUserConfigurationChange(configurationModel)));
|
|
300
307
|
this._userConfigurationInitializationPromise = userConfiguration.initialize();
|
|
@@ -346,16 +353,17 @@ class RemoteUserConfiguration extends Disposable {
|
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
class FileServiceBasedRemoteUserConfiguration extends Disposable {
|
|
349
|
-
constructor(configurationResource, configurationParseOptions, fileService, uriIdentityService) {
|
|
356
|
+
constructor(configurationResource, configurationParseOptions, fileService, uriIdentityService, logService) {
|
|
350
357
|
super();
|
|
351
358
|
this.configurationResource = configurationResource;
|
|
352
359
|
this.fileService = fileService;
|
|
353
360
|
this.uriIdentityService = uriIdentityService;
|
|
361
|
+
this.logService = logService;
|
|
354
362
|
this._onDidChangeConfiguration = this._register(( new Emitter()));
|
|
355
363
|
this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
356
364
|
this.fileWatcherDisposable = this._register(( new MutableDisposable()));
|
|
357
365
|
this.directoryWatcherDisposable = this._register(( new MutableDisposable()));
|
|
358
|
-
this.parser = ( new ConfigurationModelParser(( this.configurationResource.toString())));
|
|
366
|
+
this.parser = ( new ConfigurationModelParser(( this.configurationResource.toString()), logService));
|
|
359
367
|
this.parseOptions = configurationParseOptions;
|
|
360
368
|
this._register(fileService.onDidFilesChange(e => this.handleFileChangesEvent(e)));
|
|
361
369
|
this._register(fileService.onDidRunOperation(e => this.handleFileOperationEvent(e)));
|
|
@@ -397,7 +405,7 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable {
|
|
|
397
405
|
return this.parser.configurationModel;
|
|
398
406
|
}
|
|
399
407
|
catch (e) {
|
|
400
|
-
return
|
|
408
|
+
return ConfigurationModel.createEmptyModel(this.logService);
|
|
401
409
|
}
|
|
402
410
|
}
|
|
403
411
|
reparse(configurationParseOptions) {
|
|
@@ -440,15 +448,15 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable {
|
|
|
440
448
|
}
|
|
441
449
|
}
|
|
442
450
|
class CachedRemoteUserConfiguration extends Disposable {
|
|
443
|
-
constructor(remoteAuthority, configurationCache, configurationParseOptions) {
|
|
451
|
+
constructor(remoteAuthority, configurationCache, configurationParseOptions, logService) {
|
|
444
452
|
super();
|
|
445
453
|
this.configurationCache = configurationCache;
|
|
446
454
|
this._onDidChange = this._register(( new Emitter()));
|
|
447
455
|
this.onDidChange = this._onDidChange.event;
|
|
448
456
|
this.key = { type: 'user', key: remoteAuthority };
|
|
449
|
-
this.parser = ( new ConfigurationModelParser('CachedRemoteUserConfiguration'));
|
|
457
|
+
this.parser = ( new ConfigurationModelParser('CachedRemoteUserConfiguration', logService));
|
|
450
458
|
this.parseOptions = configurationParseOptions;
|
|
451
|
-
this.configurationModel =
|
|
459
|
+
this.configurationModel = ConfigurationModel.createEmptyModel(logService);
|
|
452
460
|
}
|
|
453
461
|
getConfigurationModel() {
|
|
454
462
|
return this.configurationModel;
|
|
@@ -501,7 +509,7 @@ class WorkspaceConfiguration extends Disposable {
|
|
|
501
509
|
this.onDidUpdateConfiguration = this._onDidUpdateConfiguration.event;
|
|
502
510
|
this._initialized = false;
|
|
503
511
|
this.fileService = fileService;
|
|
504
|
-
this._workspaceConfiguration = this._cachedConfiguration = ( new CachedWorkspaceConfiguration(configurationCache));
|
|
512
|
+
this._workspaceConfiguration = this._cachedConfiguration = ( new CachedWorkspaceConfiguration(configurationCache, logService));
|
|
505
513
|
}
|
|
506
514
|
async initialize(workspaceIdentifier, workspaceTrusted) {
|
|
507
515
|
this._workspaceIdentifier = workspaceIdentifier;
|
|
@@ -589,8 +597,8 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable {
|
|
|
589
597
|
this._workspaceIdentifier = null;
|
|
590
598
|
this._onDidChange = this._register(( new Emitter()));
|
|
591
599
|
this.onDidChange = this._onDidChange.event;
|
|
592
|
-
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(''));
|
|
593
|
-
this.workspaceSettings =
|
|
600
|
+
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser('', logService));
|
|
601
|
+
this.workspaceSettings = ConfigurationModel.createEmptyModel(logService);
|
|
594
602
|
this._register(Event.any(Event.filter(this.fileService.onDidFilesChange, e => !!this._workspaceIdentifier && e.contains(this._workspaceIdentifier.configPath)), Event.filter(this.fileService.onDidRunOperation, e => !!this._workspaceIdentifier && (e.isOperation(0 ) || e.isOperation(3 ) || e.isOperation(1 ) || e.isOperation(4 )) && uriIdentityService.extUri.isEqual(e.resource, this._workspaceIdentifier.configPath)))(() => this.reloadConfigurationScheduler.schedule()));
|
|
595
603
|
this.reloadConfigurationScheduler = this._register(( new RunOnceScheduler(() => this._onDidChange.fire(), 50)));
|
|
596
604
|
this.workspaceConfigWatcher = this._register(this.watchWorkspaceConfigurationFile());
|
|
@@ -605,7 +613,7 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable {
|
|
|
605
613
|
async load(workspaceIdentifier, configurationParseOptions) {
|
|
606
614
|
if (!this._workspaceIdentifier || this._workspaceIdentifier.id !== workspaceIdentifier.id) {
|
|
607
615
|
this._workspaceIdentifier = workspaceIdentifier;
|
|
608
|
-
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(this._workspaceIdentifier.id));
|
|
616
|
+
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(this._workspaceIdentifier.id, this.logService));
|
|
609
617
|
dispose(this.workspaceConfigWatcher);
|
|
610
618
|
this.workspaceConfigWatcher = this._register(this.watchWorkspaceConfigurationFile());
|
|
611
619
|
}
|
|
@@ -650,11 +658,12 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable {
|
|
|
650
658
|
}
|
|
651
659
|
}
|
|
652
660
|
class CachedWorkspaceConfiguration {
|
|
653
|
-
constructor(configurationCache) {
|
|
661
|
+
constructor(configurationCache, logService) {
|
|
654
662
|
this.configurationCache = configurationCache;
|
|
663
|
+
this.logService = logService;
|
|
655
664
|
this.onDidChange = Event.None;
|
|
656
|
-
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(''));
|
|
657
|
-
this.workspaceSettings =
|
|
665
|
+
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser('', logService));
|
|
666
|
+
this.workspaceSettings = ConfigurationModel.createEmptyModel(logService);
|
|
658
667
|
}
|
|
659
668
|
async load(workspaceIdentifier, configurationParseOptions) {
|
|
660
669
|
try {
|
|
@@ -662,7 +671,7 @@ class CachedWorkspaceConfiguration {
|
|
|
662
671
|
const contents = await this.configurationCache.read(key);
|
|
663
672
|
const parsed = JSON.parse(contents);
|
|
664
673
|
if (parsed.content) {
|
|
665
|
-
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(key.key));
|
|
674
|
+
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser(key.key, this.logService));
|
|
666
675
|
this.workspaceConfigurationModelParser.parse(parsed.content, configurationParseOptions);
|
|
667
676
|
this.consolidate();
|
|
668
677
|
}
|
|
@@ -717,14 +726,15 @@ class CachedWorkspaceConfiguration {
|
|
|
717
726
|
}
|
|
718
727
|
}
|
|
719
728
|
class CachedFolderConfiguration {
|
|
720
|
-
constructor(folder, configFolderRelativePath, configurationParseOptions, configurationCache) {
|
|
729
|
+
constructor(folder, configFolderRelativePath, configurationParseOptions, configurationCache, logService) {
|
|
721
730
|
this.configurationCache = configurationCache;
|
|
731
|
+
this.logService = logService;
|
|
722
732
|
this.onDidChange = Event.None;
|
|
723
733
|
this.key = { type: 'folder', key: ( hash(( joinPath(folder, configFolderRelativePath).toString())).toString(16)) };
|
|
724
|
-
this._folderSettingsModelParser = ( new ConfigurationModelParser('CachedFolderConfiguration'));
|
|
734
|
+
this._folderSettingsModelParser = ( new ConfigurationModelParser('CachedFolderConfiguration', logService));
|
|
725
735
|
this._folderSettingsParseOptions = configurationParseOptions;
|
|
726
736
|
this._standAloneConfigurations = [];
|
|
727
|
-
this.configurationModel =
|
|
737
|
+
this.configurationModel = ConfigurationModel.createEmptyModel(logService);
|
|
728
738
|
}
|
|
729
739
|
async loadConfiguration() {
|
|
730
740
|
try {
|
|
@@ -736,7 +746,7 @@ class CachedFolderConfiguration {
|
|
|
736
746
|
this._folderSettingsModelParser.parse(configurationContents[key], this._folderSettingsParseOptions);
|
|
737
747
|
}
|
|
738
748
|
else {
|
|
739
|
-
const standAloneConfigurationModelParser = ( new StandaloneConfigurationModelParser(key, key));
|
|
749
|
+
const standAloneConfigurationModelParser = ( new StandaloneConfigurationModelParser(key, key, this.logService));
|
|
740
750
|
standAloneConfigurationModelParser.parse(configurationContents[key]);
|
|
741
751
|
this._standAloneConfigurations.push(standAloneConfigurationModelParser.configurationModel);
|
|
742
752
|
}
|
|
@@ -796,7 +806,8 @@ class FolderConfiguration extends Disposable {
|
|
|
796
806
|
workspaceFolder.uri,
|
|
797
807
|
configFolderRelativePath,
|
|
798
808
|
{ scopes: this.scopes, skipRestricted: this.isUntrusted() },
|
|
799
|
-
configurationCache
|
|
809
|
+
configurationCache,
|
|
810
|
+
logService
|
|
800
811
|
));
|
|
801
812
|
if (useCache && this.configurationCache.needsCaching(workspaceFolder.uri)) {
|
|
802
813
|
this.folderConfiguration = this.cachedFolderConfiguration;
|