@codingame/monaco-vscode-configuration-service-override 25.1.2 → 26.0.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.
- package/package.json +3 -3
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +31 -15
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +300 -278
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +44 -30
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.d.ts +4 -3
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +257 -151
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +477 -236
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +31 -13
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +383 -249
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +68 -17
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +137 -86
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +16 -13
- package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js +13 -10
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +93 -59
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +76 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - configuration service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "26.0.1"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -16,22 +16,30 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
|
|
|
16
16
|
this.languageService = languageService;
|
|
17
17
|
this._onDidChangeConfiguration = this._register(( new Emitter()));
|
|
18
18
|
this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
19
|
-
this._register(this.configurationService.onDidChangeConfiguration(
|
|
19
|
+
this._register(this.configurationService.onDidChangeConfiguration(
|
|
20
|
+
e => this._onDidChangeConfiguration.fire(this.toResourceConfigurationChangeEvent(e))
|
|
21
|
+
));
|
|
20
22
|
}
|
|
21
23
|
getValue(resource, arg2, arg3) {
|
|
22
|
-
if (typeof arg3 ===
|
|
24
|
+
if (typeof arg3 === "string") {
|
|
23
25
|
return this._getValue(resource, Position.isIPosition(arg2) ? arg2 : null, arg3);
|
|
24
26
|
}
|
|
25
|
-
return this._getValue(resource, null, typeof arg2 ===
|
|
27
|
+
return this._getValue(resource, null, typeof arg2 === "string" ? arg2 : undefined);
|
|
26
28
|
}
|
|
27
29
|
updateValue(resource, key, value, configurationTarget) {
|
|
28
30
|
const language = resource ? this.getLanguage(resource, null) : null;
|
|
29
|
-
const configurationValue = this.configurationService.inspect(key, {
|
|
31
|
+
const configurationValue = this.configurationService.inspect(key, {
|
|
32
|
+
resource,
|
|
33
|
+
overrideIdentifier: language
|
|
34
|
+
});
|
|
30
35
|
if (configurationTarget === undefined) {
|
|
31
36
|
configurationTarget = this.deriveConfigurationTarget(configurationValue, language);
|
|
32
37
|
}
|
|
33
38
|
const overrideIdentifier = language && configurationValue.overrideIdentifiers?.includes(language) ? language : undefined;
|
|
34
|
-
return this.configurationService.updateValue(key, value, {
|
|
39
|
+
return this.configurationService.updateValue(key, value, {
|
|
40
|
+
resource,
|
|
41
|
+
overrideIdentifier
|
|
42
|
+
}, configurationTarget);
|
|
35
43
|
}
|
|
36
44
|
deriveConfigurationTarget(configurationValue, language) {
|
|
37
45
|
if (language) {
|
|
@@ -67,14 +75,23 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
|
|
|
67
75
|
}
|
|
68
76
|
_getValue(resource, position, section) {
|
|
69
77
|
const language = resource ? this.getLanguage(resource, position) : undefined;
|
|
70
|
-
if (typeof section ===
|
|
71
|
-
return this.configurationService.getValue({
|
|
78
|
+
if (typeof section === "undefined") {
|
|
79
|
+
return this.configurationService.getValue({
|
|
80
|
+
resource,
|
|
81
|
+
overrideIdentifier: language
|
|
82
|
+
});
|
|
72
83
|
}
|
|
73
|
-
return this.configurationService.getValue(section, {
|
|
84
|
+
return this.configurationService.getValue(section, {
|
|
85
|
+
resource,
|
|
86
|
+
overrideIdentifier: language
|
|
87
|
+
});
|
|
74
88
|
}
|
|
75
89
|
inspect(resource, position, section) {
|
|
76
90
|
const language = resource ? this.getLanguage(resource, position) : undefined;
|
|
77
|
-
return this.configurationService.inspect(section, {
|
|
91
|
+
return this.configurationService.inspect(section, {
|
|
92
|
+
resource,
|
|
93
|
+
overrideIdentifier: language
|
|
94
|
+
});
|
|
78
95
|
}
|
|
79
96
|
getLanguage(resource, position) {
|
|
80
97
|
const model = this.modelService.getModel(resource);
|
|
@@ -88,7 +105,10 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
|
|
|
88
105
|
affectedKeys: configurationChangeEvent.affectedKeys,
|
|
89
106
|
affectsConfiguration: (resource, configuration) => {
|
|
90
107
|
const overrideIdentifier = resource ? this.getLanguage(resource, null) : undefined;
|
|
91
|
-
if (configurationChangeEvent.affectsConfiguration(configuration, {
|
|
108
|
+
if (configurationChangeEvent.affectsConfiguration(configuration, {
|
|
109
|
+
resource,
|
|
110
|
+
overrideIdentifier
|
|
111
|
+
})) {
|
|
92
112
|
return true;
|
|
93
113
|
}
|
|
94
114
|
if (overrideIdentifier) {
|
|
@@ -99,10 +119,6 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
|
|
|
99
119
|
};
|
|
100
120
|
}
|
|
101
121
|
};
|
|
102
|
-
TextResourceConfigurationService = ( __decorate([
|
|
103
|
-
( __param(0, IConfigurationService)),
|
|
104
|
-
( __param(1, IModelService)),
|
|
105
|
-
( __param(2, ILanguageService))
|
|
106
|
-
], TextResourceConfigurationService));
|
|
122
|
+
TextResourceConfigurationService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IModelService)), ( __param(2, ILanguageService))], TextResourceConfigurationService));
|
|
107
123
|
|
|
108
124
|
export { TextResourceConfigurationService };
|