@codingame/monaco-vscode-configuration-service-override 11.1.2 → 12.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/index.d.ts +29 -2
- package/index.js +138 -1
- package/package.json +27 -8
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.d.ts +26 -0
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +13 -11
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +82 -79
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +31 -32
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.d.ts +130 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +18 -16
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +144 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +182 -186
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.d.ts +16 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +3 -1
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.d.ts +86 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +219 -194
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.d.ts +43 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.d.ts +37 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +30 -26
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.d.ts +13 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +3 -1
- package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.d.ts +16 -0
- package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js +8 -5
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.d.ts +64 -0
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +54 -53
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.d.ts +39 -0
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +15 -11
- package/configuration.js +0 -138
- package/tools.js +0 -44
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { Event, Emitter } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
5
|
+
import { ConfigurationModel, ConfigurationParseOptions, UserSettings } from "vscode/vscode/vs/platform/configuration/common/configurationModels";
|
|
6
|
+
import { IConfigurationCache } from "@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common/vscode/vs/workbench/services/configuration/common/configuration";
|
|
7
|
+
import { IStoredWorkspaceFolder } from "@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/platform/workspaces/common/workspaces";
|
|
8
|
+
import { WorkbenchState, IWorkspaceFolder, IWorkspaceIdentifier } from "vscode/vscode/vs/platform/workspace/common/workspace";
|
|
9
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
10
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
11
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
12
|
+
import { IStringDictionary } from "vscode/vscode/vs/base/common/collections";
|
|
13
|
+
import { IBrowserWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
14
|
+
import { DefaultConfiguration as BaseDefaultConfiguration } from "vscode/vscode/vs/platform/configuration/common/configurations";
|
|
15
|
+
import { IJSONEditingService } from "vscode/vscode/vs/workbench/services/configuration/common/jsonEditing.service";
|
|
16
|
+
import { IUserDataProfilesService } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
17
|
+
export declare class DefaultConfiguration extends BaseDefaultConfiguration {
|
|
18
|
+
private readonly configurationCache;
|
|
19
|
+
static readonly DEFAULT_OVERRIDES_CACHE_EXISTS_KEY = "DefaultOverridesCacheExists";
|
|
20
|
+
private readonly configurationRegistry;
|
|
21
|
+
private cachedConfigurationDefaultsOverrides;
|
|
22
|
+
private readonly cacheKey;
|
|
23
|
+
private updateCache;
|
|
24
|
+
constructor(configurationCache: IConfigurationCache, environmentService: IBrowserWorkbenchEnvironmentService, logService: ILogService);
|
|
25
|
+
protected getConfigurationDefaultOverrides(): IStringDictionary<any>;
|
|
26
|
+
initialize(): Promise<ConfigurationModel>;
|
|
27
|
+
reload(): ConfigurationModel;
|
|
28
|
+
hasCachedConfigurationDefaultsOverrides(): boolean;
|
|
29
|
+
private initiaizeCachedConfigurationDefaultsOverridesPromise;
|
|
30
|
+
private initializeCachedConfigurationDefaultsOverrides;
|
|
31
|
+
protected onDidUpdateConfiguration(properties: string[], defaultsOverrides?: boolean): void;
|
|
32
|
+
private updateCachedConfigurationDefaultsOverrides;
|
|
33
|
+
}
|
|
34
|
+
export declare class ApplicationConfiguration extends UserSettings {
|
|
35
|
+
private readonly _onDidChangeConfiguration;
|
|
36
|
+
readonly onDidChangeConfiguration: Event<ConfigurationModel>;
|
|
37
|
+
private readonly reloadConfigurationScheduler;
|
|
38
|
+
constructor(userDataProfilesService: IUserDataProfilesService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService);
|
|
39
|
+
initialize(): Promise<ConfigurationModel>;
|
|
40
|
+
loadConfiguration(): Promise<ConfigurationModel>;
|
|
41
|
+
}
|
|
42
|
+
export declare class UserConfiguration extends Disposable {
|
|
43
|
+
private settingsResource;
|
|
44
|
+
private tasksResource;
|
|
45
|
+
private configurationParseOptions;
|
|
46
|
+
private readonly fileService;
|
|
47
|
+
private readonly uriIdentityService;
|
|
48
|
+
private readonly logService;
|
|
49
|
+
private readonly _onDidChangeConfiguration;
|
|
50
|
+
readonly onDidChangeConfiguration: Event<ConfigurationModel>;
|
|
51
|
+
private readonly userConfiguration;
|
|
52
|
+
private readonly userConfigurationChangeDisposable;
|
|
53
|
+
private readonly reloadConfigurationScheduler;
|
|
54
|
+
get hasTasksLoaded(): boolean;
|
|
55
|
+
constructor(settingsResource: URI, tasksResource: URI | undefined, configurationParseOptions: ConfigurationParseOptions, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService);
|
|
56
|
+
reset(settingsResource: URI, tasksResource: URI | undefined, configurationParseOptions: ConfigurationParseOptions): Promise<ConfigurationModel>;
|
|
57
|
+
private doReset;
|
|
58
|
+
initialize(): Promise<ConfigurationModel>;
|
|
59
|
+
reload(settingsConfiguration?: ConfigurationModel): Promise<ConfigurationModel>;
|
|
60
|
+
reparse(parseOptions?: Partial<ConfigurationParseOptions>): ConfigurationModel;
|
|
61
|
+
getRestrictedSettings(): string[];
|
|
62
|
+
}
|
|
63
|
+
export declare class RemoteUserConfiguration extends Disposable {
|
|
64
|
+
private readonly _cachedConfiguration;
|
|
65
|
+
private readonly _fileService;
|
|
66
|
+
private _userConfiguration;
|
|
67
|
+
private _userConfigurationInitializationPromise;
|
|
68
|
+
private readonly _onDidChangeConfiguration;
|
|
69
|
+
readonly onDidChangeConfiguration: Event<ConfigurationModel>;
|
|
70
|
+
private readonly _onDidInitialize;
|
|
71
|
+
readonly onDidInitialize: Event<ConfigurationModel>;
|
|
72
|
+
constructor(remoteAuthority: string, configurationCache: IConfigurationCache, fileService: IFileService, uriIdentityService: IUriIdentityService, remoteAgentService: IRemoteAgentService, logService: ILogService);
|
|
73
|
+
initialize(): Promise<ConfigurationModel>;
|
|
74
|
+
reload(): Promise<ConfigurationModel>;
|
|
75
|
+
reparse(): ConfigurationModel;
|
|
76
|
+
getRestrictedSettings(): string[];
|
|
77
|
+
private onDidUserConfigurationChange;
|
|
78
|
+
private updateCache;
|
|
79
|
+
}
|
|
80
|
+
export declare class WorkspaceConfiguration extends Disposable {
|
|
81
|
+
private readonly configurationCache;
|
|
82
|
+
private readonly fileService;
|
|
83
|
+
private readonly uriIdentityService;
|
|
84
|
+
private readonly logService;
|
|
85
|
+
private readonly _cachedConfiguration;
|
|
86
|
+
private _workspaceConfiguration;
|
|
87
|
+
private readonly _workspaceConfigurationDisposables;
|
|
88
|
+
private _workspaceIdentifier;
|
|
89
|
+
private _isWorkspaceTrusted;
|
|
90
|
+
private readonly _onDidUpdateConfiguration;
|
|
91
|
+
readonly onDidUpdateConfiguration: Event<boolean>;
|
|
92
|
+
private _initialized;
|
|
93
|
+
get initialized(): boolean;
|
|
94
|
+
constructor(configurationCache: IConfigurationCache, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService);
|
|
95
|
+
initialize(workspaceIdentifier: IWorkspaceIdentifier, workspaceTrusted: boolean): Promise<void>;
|
|
96
|
+
reload(): Promise<void>;
|
|
97
|
+
getFolders(): IStoredWorkspaceFolder[];
|
|
98
|
+
setFolders(folders: IStoredWorkspaceFolder[], jsonEditingService: IJSONEditingService): Promise<void>;
|
|
99
|
+
isTransient(): boolean;
|
|
100
|
+
getConfiguration(): ConfigurationModel;
|
|
101
|
+
updateWorkspaceTrust(trusted: boolean): ConfigurationModel;
|
|
102
|
+
reparseWorkspaceSettings(): ConfigurationModel;
|
|
103
|
+
getRestrictedSettings(): string[];
|
|
104
|
+
private waitAndInitialize;
|
|
105
|
+
private doInitialize;
|
|
106
|
+
private isUntrusted;
|
|
107
|
+
private onDidWorkspaceConfigurationChange;
|
|
108
|
+
private updateCache;
|
|
109
|
+
}
|
|
110
|
+
export declare class FolderConfiguration extends Disposable {
|
|
111
|
+
readonly workspaceFolder: IWorkspaceFolder;
|
|
112
|
+
private readonly workbenchState;
|
|
113
|
+
private workspaceTrusted;
|
|
114
|
+
private readonly configurationCache;
|
|
115
|
+
protected readonly _onDidChange: Emitter<void>;
|
|
116
|
+
readonly onDidChange: Event<void>;
|
|
117
|
+
private folderConfiguration;
|
|
118
|
+
private readonly scopes;
|
|
119
|
+
private readonly configurationFolder;
|
|
120
|
+
private cachedFolderConfiguration;
|
|
121
|
+
constructor(useCache: boolean, workspaceFolder: IWorkspaceFolder, configFolderRelativePath: string, workbenchState: WorkbenchState, workspaceTrusted: boolean, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, configurationCache: IConfigurationCache);
|
|
122
|
+
loadConfiguration(): Promise<ConfigurationModel>;
|
|
123
|
+
updateWorkspaceTrust(trusted: boolean): ConfigurationModel;
|
|
124
|
+
reparse(): ConfigurationModel;
|
|
125
|
+
getRestrictedSettings(): string[];
|
|
126
|
+
private isUntrusted;
|
|
127
|
+
private onDidFolderConfigurationChange;
|
|
128
|
+
private createFileServiceBasedConfiguration;
|
|
129
|
+
private updateCache;
|
|
130
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
|
|
1
2
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
2
3
|
import { getErrorMessage } from 'vscode/vscode/vs/base/common/errors';
|
|
3
4
|
import { Disposable, MutableDisposable, combinedDisposable, toDisposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
5
|
-
import { whenProviderRegistered } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
|
+
import { FileOperationResult, FileChangeType, FileOperation, whenProviderRegistered } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
7
|
import { UserSettings, ConfigurationModelParser, ConfigurationModel } from 'vscode/vscode/vs/platform/configuration/common/configurationModels';
|
|
7
8
|
import { StandaloneConfigurationModelParser, WorkspaceConfigurationModelParser } from '../common/configurationModels.js';
|
|
8
|
-
import { APPLY_ALL_PROFILES_SETTING, TASKS_CONFIGURATION_KEY, REMOTE_MACHINE_SCOPES, WORKSPACE_SCOPES, FOLDER_SETTINGS_NAME, FOLDER_SCOPES, LAUNCH_CONFIGURATION_KEY } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
9
|
-
import {
|
|
9
|
+
import { APPLY_ALL_PROFILES_SETTING, TASKS_CONFIGURATION_KEY, REMOTE_MACHINE_SCOPES, WORKSPACE_SCOPES, FOLDER_SETTINGS_NAME, FOLDER_SCOPES, LAUNCH_CONFIGURATION_KEY } from '@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common/vscode/vs/workbench/services/configuration/common/configuration';
|
|
10
|
+
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
11
|
+
import { Extensions, OVERRIDE_PROPERTY_REGEX, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
10
12
|
import { equals } from 'vscode/vscode/vs/base/common/objects';
|
|
11
13
|
import { hash } from 'vscode/vscode/vs/base/common/hash';
|
|
12
14
|
import { joinPath } from 'vscode/vscode/vs/base/common/resources';
|
|
@@ -92,7 +94,7 @@ class DefaultConfiguration extends DefaultConfiguration$1 {
|
|
|
92
94
|
}
|
|
93
95
|
class ApplicationConfiguration extends UserSettings {
|
|
94
96
|
constructor(userDataProfilesService, fileService, uriIdentityService, logService) {
|
|
95
|
-
super(userDataProfilesService.defaultProfile.settingsResource, { scopes: [
|
|
97
|
+
super(userDataProfilesService.defaultProfile.settingsResource, { scopes: [ConfigurationScope.APPLICATION], skipUnregistered: true }, uriIdentityService.extUri, fileService, logService);
|
|
96
98
|
this._onDidChangeConfiguration = this._register(( new Emitter()));
|
|
97
99
|
this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
|
98
100
|
this._register(this.onDidChange(() => this.reloadConfigurationScheduler.schedule()));
|
|
@@ -204,8 +206,8 @@ class FileServiceBasedConfiguration extends Disposable {
|
|
|
204
206
|
}
|
|
205
207
|
catch (error) {
|
|
206
208
|
this.logService.trace(`Error while resolving configuration file '${( resource.toString())}': ${getErrorMessage(error)}`);
|
|
207
|
-
if (error.fileOperationResult !==
|
|
208
|
-
&& error.fileOperationResult !==
|
|
209
|
+
if (error.fileOperationResult !== FileOperationResult.FILE_NOT_FOUND
|
|
210
|
+
&& error.fileOperationResult !== FileOperationResult.FILE_NOT_DIRECTORY) {
|
|
209
211
|
this.logService.error(error);
|
|
210
212
|
}
|
|
211
213
|
}
|
|
@@ -258,20 +260,20 @@ class FileServiceBasedConfiguration extends Disposable {
|
|
|
258
260
|
return true;
|
|
259
261
|
}
|
|
260
262
|
if (( this.allResources.some(
|
|
261
|
-
resource => event.contains(this.uriIdentityService.extUri.dirname(resource),
|
|
263
|
+
resource => event.contains(this.uriIdentityService.extUri.dirname(resource), FileChangeType.DELETED)
|
|
262
264
|
))) {
|
|
263
265
|
return true;
|
|
264
266
|
}
|
|
265
267
|
return false;
|
|
266
268
|
}
|
|
267
269
|
handleFileOperationEvent(event) {
|
|
268
|
-
if ((event.isOperation(
|
|
270
|
+
if ((event.isOperation(FileOperation.CREATE) || event.isOperation(FileOperation.COPY) || event.isOperation(FileOperation.DELETE) || event.isOperation(FileOperation.WRITE))
|
|
269
271
|
&& ( this.allResources.some(
|
|
270
272
|
resource => this.uriIdentityService.extUri.isEqual(event.resource, resource)
|
|
271
273
|
))) {
|
|
272
274
|
return true;
|
|
273
275
|
}
|
|
274
|
-
if (event.isOperation(
|
|
276
|
+
if (event.isOperation(FileOperation.DELETE) && ( this.allResources.some(
|
|
275
277
|
resource => this.uriIdentityService.extUri.isEqual(event.resource, this.uriIdentityService.extUri.dirname(resource))
|
|
276
278
|
))) {
|
|
277
279
|
return true;
|
|
@@ -344,7 +346,7 @@ class RemoteUserConfiguration extends Disposable {
|
|
|
344
346
|
content = await this._userConfiguration.resolveContent();
|
|
345
347
|
}
|
|
346
348
|
catch (error) {
|
|
347
|
-
if (error.fileOperationResult !==
|
|
349
|
+
if (error.fileOperationResult !== FileOperationResult.FILE_NOT_FOUND) {
|
|
348
350
|
return;
|
|
349
351
|
}
|
|
350
352
|
}
|
|
@@ -418,15 +420,15 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable {
|
|
|
418
420
|
}
|
|
419
421
|
handleFileChangesEvent(event) {
|
|
420
422
|
let affectedByChanges = false;
|
|
421
|
-
if (event.contains(this.configurationResource,
|
|
423
|
+
if (event.contains(this.configurationResource, FileChangeType.ADDED)) {
|
|
422
424
|
affectedByChanges = true;
|
|
423
425
|
this.onResourceExists(true);
|
|
424
426
|
}
|
|
425
|
-
else if (event.contains(this.configurationResource,
|
|
427
|
+
else if (event.contains(this.configurationResource, FileChangeType.DELETED)) {
|
|
426
428
|
affectedByChanges = true;
|
|
427
429
|
this.onResourceExists(false);
|
|
428
430
|
}
|
|
429
|
-
else if (event.contains(this.configurationResource,
|
|
431
|
+
else if (event.contains(this.configurationResource, FileChangeType.UPDATED)) {
|
|
430
432
|
affectedByChanges = true;
|
|
431
433
|
}
|
|
432
434
|
if (affectedByChanges) {
|
|
@@ -434,7 +436,7 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable {
|
|
|
434
436
|
}
|
|
435
437
|
}
|
|
436
438
|
handleFileOperationEvent(event) {
|
|
437
|
-
if ((event.isOperation(
|
|
439
|
+
if ((event.isOperation(FileOperation.CREATE) || event.isOperation(FileOperation.COPY) || event.isOperation(FileOperation.DELETE) || event.isOperation(FileOperation.WRITE))
|
|
438
440
|
&& this.uriIdentityService.extUri.isEqual(event.resource, this.configurationResource)) {
|
|
439
441
|
this.reloadConfigurationScheduler.schedule();
|
|
440
442
|
}
|
|
@@ -602,7 +604,7 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable {
|
|
|
602
604
|
this.onDidChange = this._onDidChange.event;
|
|
603
605
|
this.workspaceConfigurationModelParser = ( new WorkspaceConfigurationModelParser('', logService));
|
|
604
606
|
this.workspaceSettings = ConfigurationModel.createEmptyModel(logService);
|
|
605
|
-
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(
|
|
607
|
+
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(FileOperation.CREATE) || e.isOperation(FileOperation.COPY) || e.isOperation(FileOperation.DELETE) || e.isOperation(FileOperation.WRITE)) && uriIdentityService.extUri.isEqual(e.resource, this._workspaceIdentifier.configPath)))(() => this.reloadConfigurationScheduler.schedule()));
|
|
606
608
|
this.reloadConfigurationScheduler = this._register(( new RunOnceScheduler(() => this._onDidChange.fire(), 50)));
|
|
607
609
|
this.workspaceConfigWatcher = this._register(this.watchWorkspaceConfigurationFile());
|
|
608
610
|
}
|
|
@@ -803,7 +805,7 @@ class FolderConfiguration extends Disposable {
|
|
|
803
805
|
this.configurationCache = configurationCache;
|
|
804
806
|
this._onDidChange = this._register(( new Emitter()));
|
|
805
807
|
this.onDidChange = this._onDidChange.event;
|
|
806
|
-
this.scopes =
|
|
808
|
+
this.scopes = WorkbenchState.WORKSPACE === this.workbenchState ? FOLDER_SCOPES : WORKSPACE_SCOPES;
|
|
807
809
|
this.configurationFolder = uriIdentityService.extUri.joinPath(workspaceFolder.uri, configFolderRelativePath);
|
|
808
810
|
this.cachedFolderConfiguration = ( new CachedFolderConfiguration(
|
|
809
811
|
workspaceFolder.uri,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { Event, Emitter } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { Workspace as BaseWorkspace, WorkbenchState, IWorkspaceFolder, IWorkspaceFoldersChangeEvent, IWorkspaceFoldersWillChangeEvent, ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier, IAnyWorkspaceIdentifier } from "vscode/vscode/vs/platform/workspace/common/workspace";
|
|
5
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
import { ConfigurationModel } from "vscode/vscode/vs/platform/configuration/common/configurationModels";
|
|
7
|
+
import { IConfigurationChangeEvent, ConfigurationTarget, IConfigurationOverrides, IConfigurationData, IConfigurationValue, IConfigurationUpdateOverrides, IConfigurationUpdateOptions } from "vscode/vscode/vs/platform/configuration/common/configuration";
|
|
8
|
+
import { IConfigurationCache, RestrictedSettings } from "@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common/vscode/vs/workbench/services/configuration/common/configuration";
|
|
9
|
+
import { IWorkbenchConfigurationService } from "@codingame/monaco-vscode-422642f2-7e3a-5c1c-9e1e-1d3ef1817346-common/vscode/vs/workbench/services/configuration/common/configuration.service";
|
|
10
|
+
import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/platform/workspaces/common/workspaces";
|
|
11
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
12
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
13
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
14
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
15
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
16
|
+
import { IUserDataProfileService } from "vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
17
|
+
import { IPolicyService } from "vscode/vscode/vs/platform/policy/common/policy.service";
|
|
18
|
+
import { IUserDataProfilesService } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
19
|
+
import { IBrowserWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
20
|
+
declare class Workspace extends BaseWorkspace {
|
|
21
|
+
initialized: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class WorkspaceService extends Disposable implements IWorkbenchConfigurationService, IWorkspaceContextService {
|
|
24
|
+
private readonly userDataProfileService;
|
|
25
|
+
private readonly userDataProfilesService;
|
|
26
|
+
private readonly fileService;
|
|
27
|
+
private readonly remoteAgentService;
|
|
28
|
+
private readonly uriIdentityService;
|
|
29
|
+
private readonly logService;
|
|
30
|
+
_serviceBrand: undefined;
|
|
31
|
+
private workspace;
|
|
32
|
+
private initRemoteUserConfigurationBarrier;
|
|
33
|
+
private completeWorkspaceBarrier;
|
|
34
|
+
private readonly configurationCache;
|
|
35
|
+
private _configuration;
|
|
36
|
+
private initialized;
|
|
37
|
+
private readonly defaultConfiguration;
|
|
38
|
+
private readonly policyConfiguration;
|
|
39
|
+
private applicationConfiguration;
|
|
40
|
+
private readonly applicationConfigurationDisposables;
|
|
41
|
+
private readonly localUserConfiguration;
|
|
42
|
+
private readonly remoteUserConfiguration;
|
|
43
|
+
private readonly workspaceConfiguration;
|
|
44
|
+
private cachedFolderConfigs;
|
|
45
|
+
private readonly workspaceEditingQueue;
|
|
46
|
+
private readonly _onDidChangeConfiguration;
|
|
47
|
+
readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
|
48
|
+
protected readonly _onWillChangeWorkspaceFolders: Emitter<IWorkspaceFoldersWillChangeEvent>;
|
|
49
|
+
readonly onWillChangeWorkspaceFolders: Event<IWorkspaceFoldersWillChangeEvent>;
|
|
50
|
+
private readonly _onDidChangeWorkspaceFolders;
|
|
51
|
+
readonly onDidChangeWorkspaceFolders: Event<IWorkspaceFoldersChangeEvent>;
|
|
52
|
+
private readonly _onDidChangeWorkspaceName;
|
|
53
|
+
readonly onDidChangeWorkspaceName: Event<void>;
|
|
54
|
+
private readonly _onDidChangeWorkbenchState;
|
|
55
|
+
readonly onDidChangeWorkbenchState: Event<WorkbenchState>;
|
|
56
|
+
private isWorkspaceTrusted;
|
|
57
|
+
private _restrictedSettings;
|
|
58
|
+
get restrictedSettings(): RestrictedSettings;
|
|
59
|
+
private readonly _onDidChangeRestrictedSettings;
|
|
60
|
+
readonly onDidChangeRestrictedSettings: Event<RestrictedSettings>;
|
|
61
|
+
private readonly configurationRegistry;
|
|
62
|
+
private instantiationService;
|
|
63
|
+
private configurationEditing;
|
|
64
|
+
constructor({ remoteAuthority, configurationCache }: {
|
|
65
|
+
remoteAuthority?: string;
|
|
66
|
+
configurationCache: IConfigurationCache;
|
|
67
|
+
}, environmentService: IBrowserWorkbenchEnvironmentService, userDataProfileService: IUserDataProfileService, userDataProfilesService: IUserDataProfilesService, fileService: IFileService, remoteAgentService: IRemoteAgentService, uriIdentityService: IUriIdentityService, logService: ILogService, policyService: IPolicyService);
|
|
68
|
+
private createApplicationConfiguration;
|
|
69
|
+
getCompleteWorkspace(): Promise<Workspace>;
|
|
70
|
+
getWorkspace(): Workspace;
|
|
71
|
+
getWorkbenchState(): WorkbenchState;
|
|
72
|
+
getWorkspaceFolder(resource: URI): IWorkspaceFolder | null;
|
|
73
|
+
addFolders(foldersToAdd: IWorkspaceFolderCreationData[], index?: number): Promise<void>;
|
|
74
|
+
removeFolders(foldersToRemove: URI[]): Promise<void>;
|
|
75
|
+
updateFolders(foldersToAdd: IWorkspaceFolderCreationData[], foldersToRemove: URI[], index?: number): Promise<void>;
|
|
76
|
+
isInsideWorkspace(resource: URI): boolean;
|
|
77
|
+
isCurrentWorkspace(workspaceIdOrFolder: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI): boolean;
|
|
78
|
+
private doUpdateFolders;
|
|
79
|
+
private setFolders;
|
|
80
|
+
private contains;
|
|
81
|
+
getConfigurationData(): IConfigurationData;
|
|
82
|
+
getValue<T>(): T;
|
|
83
|
+
getValue<T>(section: string): T;
|
|
84
|
+
getValue<T>(overrides: IConfigurationOverrides): T;
|
|
85
|
+
getValue<T>(section: string, overrides: IConfigurationOverrides): T;
|
|
86
|
+
updateValue(key: string, value: any): Promise<void>;
|
|
87
|
+
updateValue(key: string, value: any, overrides: IConfigurationOverrides | IConfigurationUpdateOverrides): Promise<void>;
|
|
88
|
+
updateValue(key: string, value: any, target: ConfigurationTarget): Promise<void>;
|
|
89
|
+
updateValue(key: string, value: any, overrides: IConfigurationOverrides | IConfigurationUpdateOverrides, target: ConfigurationTarget, options?: IConfigurationUpdateOptions): Promise<void>;
|
|
90
|
+
reloadConfiguration(target?: ConfigurationTarget | IWorkspaceFolder): Promise<void>;
|
|
91
|
+
hasCachedConfigurationDefaultsOverrides(): boolean;
|
|
92
|
+
inspect<T>(key: string, overrides?: IConfigurationOverrides): IConfigurationValue<T>;
|
|
93
|
+
keys(): {
|
|
94
|
+
default: string[];
|
|
95
|
+
user: string[];
|
|
96
|
+
workspace: string[];
|
|
97
|
+
workspaceFolder: string[];
|
|
98
|
+
};
|
|
99
|
+
whenRemoteConfigurationLoaded(): Promise<void>;
|
|
100
|
+
initialize(arg: IAnyWorkspaceIdentifier): Promise<void>;
|
|
101
|
+
updateWorkspaceTrust(trusted: boolean): void;
|
|
102
|
+
acquireInstantiationService(instantiationService: IInstantiationService): void;
|
|
103
|
+
isSettingAppliedForAllProfiles(key: string): boolean;
|
|
104
|
+
private createWorkspace;
|
|
105
|
+
private createMultiFolderWorkspace;
|
|
106
|
+
private createSingleFolderWorkspace;
|
|
107
|
+
private createEmptyWorkspace;
|
|
108
|
+
private checkAndMarkWorkspaceComplete;
|
|
109
|
+
private updateWorkspaceAndInitializeConfiguration;
|
|
110
|
+
private compareFolders;
|
|
111
|
+
private initializeConfiguration;
|
|
112
|
+
private reloadDefaultConfiguration;
|
|
113
|
+
private reloadApplicationConfiguration;
|
|
114
|
+
private reloadUserConfiguration;
|
|
115
|
+
reloadLocalUserConfiguration(donotTrigger?: boolean, settingsConfiguration?: ConfigurationModel): Promise<ConfigurationModel>;
|
|
116
|
+
private reloadRemoteUserConfiguration;
|
|
117
|
+
private reloadWorkspaceConfiguration;
|
|
118
|
+
private reloadWorkspaceFolderConfiguration;
|
|
119
|
+
private loadConfiguration;
|
|
120
|
+
private getWorkspaceConfigurationModel;
|
|
121
|
+
private onUserDataProfileChanged;
|
|
122
|
+
private onDefaultConfigurationChanged;
|
|
123
|
+
private onPolicyConfigurationChanged;
|
|
124
|
+
private onApplicationConfigurationChanged;
|
|
125
|
+
private onLocalUserConfigurationChanged;
|
|
126
|
+
private onRemoteUserConfigurationChanged;
|
|
127
|
+
private onWorkspaceConfigurationChanged;
|
|
128
|
+
private updateRestrictedSettings;
|
|
129
|
+
private updateWorkspaceConfiguration;
|
|
130
|
+
private handleWillChangeWorkspaceFolders;
|
|
131
|
+
private onWorkspaceFolderConfigurationChanged;
|
|
132
|
+
private onFoldersChanged;
|
|
133
|
+
private loadFolderConfigurations;
|
|
134
|
+
private validateWorkspaceFoldersAndReload;
|
|
135
|
+
private toValidWorkspaceFolders;
|
|
136
|
+
private writeConfigurationValue;
|
|
137
|
+
private createConfigurationEditingService;
|
|
138
|
+
private getConfigurationModelForEditableConfigurationTarget;
|
|
139
|
+
getConfigurationModel(target: ConfigurationTarget, resource?: URI | null): ConfigurationModel | undefined;
|
|
140
|
+
private deriveConfigurationTargets;
|
|
141
|
+
private triggerConfigurationChange;
|
|
142
|
+
private toEditableConfigurationTarget;
|
|
143
|
+
}
|
|
144
|
+
export {};
|