@theia/preferences 1.67.0-next.56 → 1.67.0-next.59
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/lib/browser/folder-preference-provider.d.ts +23 -0
- package/lib/browser/folder-preference-provider.d.ts.map +1 -0
- package/lib/browser/folder-preference-provider.js +57 -0
- package/lib/browser/folder-preference-provider.js.map +1 -0
- package/lib/browser/folders-preferences-provider.d.ts +27 -0
- package/lib/browser/folders-preferences-provider.d.ts.map +1 -0
- package/lib/browser/folders-preferences-provider.js +237 -0
- package/lib/browser/folders-preferences-provider.js.map +1 -0
- package/lib/browser/frontend-preference-storage.d.ts +20 -0
- package/lib/browser/frontend-preference-storage.d.ts.map +1 -0
- package/lib/browser/frontend-preference-storage.js +63 -0
- package/lib/browser/frontend-preference-storage.js.map +1 -0
- package/lib/browser/index.d.ts +5 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +23 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/monaco-jsonc-editor.d.ts +10 -0
- package/lib/browser/monaco-jsonc-editor.d.ts.map +1 -0
- package/lib/browser/monaco-jsonc-editor.js +73 -0
- package/lib/browser/monaco-jsonc-editor.js.map +1 -0
- package/lib/browser/package.spec.d.ts +1 -0
- package/lib/browser/package.spec.d.ts.map +1 -0
- package/lib/browser/package.spec.js +26 -0
- package/lib/browser/package.spec.js.map +1 -0
- package/lib/browser/preference-bindings.d.ts +4 -0
- package/lib/browser/preference-bindings.d.ts.map +1 -0
- package/lib/browser/preference-bindings.js +49 -0
- package/lib/browser/preference-bindings.js.map +1 -0
- package/lib/browser/preference-frontend-contribution.d.ts +9 -0
- package/lib/browser/preference-frontend-contribution.d.ts.map +1 -0
- package/lib/browser/preference-frontend-contribution.js +45 -0
- package/lib/browser/preference-frontend-contribution.js.map +1 -0
- package/lib/browser/preference-frontend-module.d.ts +7 -0
- package/lib/browser/preference-frontend-module.d.ts.map +1 -0
- package/lib/browser/preference-frontend-module.js +67 -0
- package/lib/browser/preference-frontend-module.js.map +1 -0
- package/lib/browser/preference-open-handler.d.ts +10 -0
- package/lib/browser/preference-open-handler.d.ts.map +1 -0
- package/lib/browser/preference-open-handler.js +57 -0
- package/lib/browser/preference-open-handler.js.map +1 -0
- package/lib/browser/preference-transaction-manager.d.ts +98 -0
- package/lib/browser/preference-transaction-manager.d.ts.map +1 -0
- package/lib/browser/preference-transaction-manager.js +279 -0
- package/lib/browser/preference-transaction-manager.js.map +1 -0
- package/lib/browser/preference-tree-model.d.ts +60 -0
- package/lib/browser/preference-tree-model.d.ts.map +1 -0
- package/lib/browser/preference-tree-model.js +247 -0
- package/lib/browser/preference-tree-model.js.map +1 -0
- package/lib/browser/preferences-contribution.d.ts +35 -0
- package/lib/browser/preferences-contribution.d.ts.map +1 -0
- package/lib/browser/preferences-contribution.js +263 -0
- package/lib/browser/preferences-contribution.js.map +1 -0
- package/lib/browser/preferences-json-schema-contribution.d.ts +17 -0
- package/lib/browser/preferences-json-schema-contribution.d.ts.map +1 -0
- package/lib/browser/preferences-json-schema-contribution.js +84 -0
- package/lib/browser/preferences-json-schema-contribution.js.map +1 -0
- package/lib/browser/preferences-monaco-contribution.d.ts +2 -0
- package/lib/browser/preferences-monaco-contribution.d.ts.map +1 -0
- package/lib/browser/preferences-monaco-contribution.js +28 -0
- package/lib/browser/preferences-monaco-contribution.js.map +1 -0
- package/lib/browser/util/preference-layout.d.ts +23 -0
- package/lib/browser/util/preference-layout.d.ts.map +1 -0
- package/lib/browser/util/preference-layout.js +441 -0
- package/lib/browser/util/preference-layout.js.map +1 -0
- package/lib/browser/util/preference-scope-command-manager.d.ts +18 -0
- package/lib/browser/util/preference-scope-command-manager.d.ts.map +1 -0
- package/lib/browser/util/preference-scope-command-manager.js +80 -0
- package/lib/browser/util/preference-scope-command-manager.js.map +1 -0
- package/lib/browser/util/preference-tree-generator.d.ts +48 -0
- package/lib/browser/util/preference-tree-generator.d.ts.map +1 -0
- package/lib/browser/util/preference-tree-generator.js +277 -0
- package/lib/browser/util/preference-tree-generator.js.map +1 -0
- package/lib/browser/util/preference-tree-label-provider.d.ts +12 -0
- package/lib/browser/util/preference-tree-label-provider.d.ts.map +1 -0
- package/lib/browser/util/preference-tree-label-provider.js +74 -0
- package/lib/browser/util/preference-tree-label-provider.js.map +1 -0
- package/lib/browser/util/preference-tree-label-provider.spec.d.ts +2 -0
- package/lib/browser/util/preference-tree-label-provider.spec.d.ts.map +1 -0
- package/lib/browser/util/preference-tree-label-provider.spec.js +90 -0
- package/lib/browser/util/preference-tree-label-provider.spec.js.map +1 -0
- package/lib/browser/util/preference-types.d.ts +69 -0
- package/lib/browser/util/preference-types.d.ts.map +1 -0
- package/lib/browser/util/preference-types.js +133 -0
- package/lib/browser/util/preference-types.js.map +1 -0
- package/lib/browser/views/components/preference-array-input.d.ts +29 -0
- package/lib/browser/views/components/preference-array-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-array-input.js +176 -0
- package/lib/browser/views/components/preference-array-input.js.map +1 -0
- package/lib/browser/views/components/preference-boolean-input.d.ts +18 -0
- package/lib/browser/views/components/preference-boolean-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-boolean-input.js +75 -0
- package/lib/browser/views/components/preference-boolean-input.js.map +1 -0
- package/lib/browser/views/components/preference-file-input.d.ts +30 -0
- package/lib/browser/views/components/preference-file-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-file-input.js +103 -0
- package/lib/browser/views/components/preference-file-input.js.map +1 -0
- package/lib/browser/views/components/preference-json-input.d.ts +20 -0
- package/lib/browser/views/components/preference-json-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-json-input.js +86 -0
- package/lib/browser/views/components/preference-json-input.js.map +1 -0
- package/lib/browser/views/components/preference-markdown-renderer.d.ts +15 -0
- package/lib/browser/views/components/preference-markdown-renderer.d.ts.map +1 -0
- package/lib/browser/views/components/preference-markdown-renderer.js +86 -0
- package/lib/browser/views/components/preference-markdown-renderer.js.map +1 -0
- package/lib/browser/views/components/preference-node-renderer-creator.d.ts +49 -0
- package/lib/browser/views/components/preference-node-renderer-creator.d.ts.map +1 -0
- package/lib/browser/views/components/preference-node-renderer-creator.js +122 -0
- package/lib/browser/views/components/preference-node-renderer-creator.js.map +1 -0
- package/lib/browser/views/components/preference-node-renderer.d.ts +118 -0
- package/lib/browser/views/components/preference-node-renderer.d.ts.map +1 -0
- package/lib/browser/views/components/preference-node-renderer.js +442 -0
- package/lib/browser/views/components/preference-node-renderer.js.map +1 -0
- package/lib/browser/views/components/preference-null-input.d.ts +16 -0
- package/lib/browser/views/components/preference-null-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-null-input.js +59 -0
- package/lib/browser/views/components/preference-null-input.js.map +1 -0
- package/lib/browser/views/components/preference-number-input.d.ts +35 -0
- package/lib/browser/views/components/preference-number-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-number-input.js +174 -0
- package/lib/browser/views/components/preference-number-input.js.map +1 -0
- package/lib/browser/views/components/preference-select-input.d.ts +29 -0
- package/lib/browser/views/components/preference-select-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-select-input.js +131 -0
- package/lib/browser/views/components/preference-select-input.js.map +1 -0
- package/lib/browser/views/components/preference-string-input.d.ts +18 -0
- package/lib/browser/views/components/preference-string-input.d.ts.map +1 -0
- package/lib/browser/views/components/preference-string-input.js +85 -0
- package/lib/browser/views/components/preference-string-input.js.map +1 -0
- package/lib/browser/views/preference-editor-widget.d.ts +75 -0
- package/lib/browser/views/preference-editor-widget.d.ts.map +1 -0
- package/lib/browser/views/preference-editor-widget.js +391 -0
- package/lib/browser/views/preference-editor-widget.js.map +1 -0
- package/lib/browser/views/preference-scope-tabbar-widget.d.ts +55 -0
- package/lib/browser/views/preference-scope-tabbar-widget.d.ts.map +1 -0
- package/lib/browser/views/preference-scope-tabbar-widget.js +337 -0
- package/lib/browser/views/preference-scope-tabbar-widget.js.map +1 -0
- package/lib/browser/views/preference-searchbar-widget.d.ts +54 -0
- package/lib/browser/views/preference-searchbar-widget.d.ts.map +1 -0
- package/lib/browser/views/preference-searchbar-widget.js +163 -0
- package/lib/browser/views/preference-searchbar-widget.js.map +1 -0
- package/lib/browser/views/preference-tree-widget.d.ts +20 -0
- package/lib/browser/views/preference-tree-widget.d.ts.map +1 -0
- package/lib/browser/views/preference-tree-widget.js +106 -0
- package/lib/browser/views/preference-tree-widget.js.map +1 -0
- package/lib/browser/views/preference-widget-bindings.d.ts +4 -0
- package/lib/browser/views/preference-widget-bindings.d.ts.map +1 -0
- package/lib/browser/views/preference-widget-bindings.js +91 -0
- package/lib/browser/views/preference-widget-bindings.js.map +1 -0
- package/lib/browser/views/preference-widget.d.ts +38 -0
- package/lib/browser/views/preference-widget.d.ts.map +1 -0
- package/lib/browser/views/preference-widget.js +120 -0
- package/lib/browser/views/preference-widget.js.map +1 -0
- package/lib/browser/workspace-file-preference-provider.d.ts +24 -0
- package/lib/browser/workspace-file-preference-provider.d.ts.map +1 -0
- package/lib/browser/workspace-file-preference-provider.js +103 -0
- package/lib/browser/workspace-file-preference-provider.js.map +1 -0
- package/lib/browser/workspace-preference-provider.d.ts +36 -0
- package/lib/browser/workspace-preference-provider.d.ts.map +1 -0
- package/lib/browser/workspace-preference-provider.js +147 -0
- package/lib/browser/workspace-preference-provider.js.map +1 -0
- package/lib/common/abstract-resource-preference-provider.d.ts +69 -0
- package/lib/common/abstract-resource-preference-provider.d.ts.map +1 -0
- package/lib/common/abstract-resource-preference-provider.js +207 -0
- package/lib/common/abstract-resource-preference-provider.js.map +1 -0
- package/lib/common/abstract-resource-preference-provider.spec.d.ts +2 -0
- package/lib/common/abstract-resource-preference-provider.spec.d.ts.map +1 -0
- package/lib/common/abstract-resource-preference-provider.spec.js +84 -0
- package/lib/common/abstract-resource-preference-provider.spec.js.map +1 -0
- package/lib/common/cli-preferences.d.ts +6 -0
- package/lib/common/cli-preferences.d.ts.map +1 -0
- package/lib/common/cli-preferences.js +21 -0
- package/lib/common/cli-preferences.js.map +1 -0
- package/lib/common/jsonc-editor.d.ts +10 -0
- package/lib/common/jsonc-editor.d.ts.map +1 -0
- package/lib/common/jsonc-editor.js +68 -0
- package/lib/common/jsonc-editor.js.map +1 -0
- package/lib/common/section-preference-provider.d.ts +20 -0
- package/lib/common/section-preference-provider.d.ts.map +1 -0
- package/lib/common/section-preference-provider.js +84 -0
- package/lib/common/section-preference-provider.js.map +1 -0
- package/lib/common/user-configs-preference-provider.d.ts +24 -0
- package/lib/common/user-configs-preference-provider.d.ts.map +1 -0
- package/lib/common/user-configs-preference-provider.js +134 -0
- package/lib/common/user-configs-preference-provider.js.map +1 -0
- package/lib/common/user-preference-provider.d.ts +14 -0
- package/lib/common/user-preference-provider.d.ts.map +1 -0
- package/lib/common/user-preference-provider.js +37 -0
- package/lib/common/user-preference-provider.js.map +1 -0
- package/lib/node/backend-preference-storage.d.ts +34 -0
- package/lib/node/backend-preference-storage.d.ts.map +1 -0
- package/lib/node/backend-preference-storage.js +100 -0
- package/lib/node/backend-preference-storage.js.map +1 -0
- package/lib/node/preference-backend-module.d.ts +4 -0
- package/lib/node/preference-backend-module.d.ts.map +1 -0
- package/lib/node/preference-backend-module.js +41 -0
- package/lib/node/preference-backend-module.js.map +1 -0
- package/lib/node/preference-bindings.d.ts +3 -0
- package/lib/node/preference-bindings.d.ts.map +1 -0
- package/lib/node/preference-bindings.js +33 -0
- package/lib/node/preference-bindings.js.map +1 -0
- package/lib/node/preference-cli-contribution.d.ts +11 -0
- package/lib/node/preference-cli-contribution.d.ts.map +1 -0
- package/lib/node/preference-cli-contribution.js +48 -0
- package/lib/node/preference-cli-contribution.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 Ericsson and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
/* note: this bogus test file is required so that
|
|
17
|
+
we are able to run mocha unit tests on this
|
|
18
|
+
package, without having any actual unit tests in it.
|
|
19
|
+
This way a coverage report will be generated,
|
|
20
|
+
showing 0% coverage, instead of no report.
|
|
21
|
+
This file can be removed once we have real unit
|
|
22
|
+
tests in place. */
|
|
23
|
+
describe('preferences package', () => {
|
|
24
|
+
it('should support code coverage statistics', () => true);
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=package.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../../src/browser/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF;;;;;;qBAMqB;AAErB,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAEjC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
export declare function bindWorkspaceFilePreferenceProvider(bind: interfaces.Bind): void;
|
|
3
|
+
export declare function bindPreferenceProviders(bind: interfaces.Bind, unbind: interfaces.Unbind): void;
|
|
4
|
+
//# sourceMappingURL=preference-bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-bindings.d.ts","sourceRoot":"","sources":["../../src/browser/preference-bindings.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAa,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAWrE,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAQ/E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAQ9F"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 STMicroelectronics and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.bindPreferenceProviders = exports.bindWorkspaceFilePreferenceProvider = void 0;
|
|
19
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
20
|
+
const user_preference_provider_1 = require("../common/user-preference-provider");
|
|
21
|
+
const workspace_preference_provider_1 = require("./workspace-preference-provider");
|
|
22
|
+
const workspace_file_preference_provider_1 = require("./workspace-file-preference-provider");
|
|
23
|
+
const folders_preferences_provider_1 = require("./folders-preferences-provider");
|
|
24
|
+
const folder_preference_provider_1 = require("./folder-preference-provider");
|
|
25
|
+
const section_preference_provider_1 = require("../common/section-preference-provider");
|
|
26
|
+
const core_1 = require("@theia/core");
|
|
27
|
+
const browser_1 = require("@theia/userstorage/lib/browser");
|
|
28
|
+
const user_configs_preference_provider_1 = require("../common/user-configs-preference-provider");
|
|
29
|
+
function bindWorkspaceFilePreferenceProvider(bind) {
|
|
30
|
+
bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderFactory).toFactory(ctx => (options) => {
|
|
31
|
+
const child = new inversify_1.Container({ defaultScope: 'Singleton' });
|
|
32
|
+
child.parent = ctx.container;
|
|
33
|
+
child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider).toSelf();
|
|
34
|
+
child.bind(workspace_file_preference_provider_1.WorkspaceFilePreferenceProviderOptions).toConstantValue(options);
|
|
35
|
+
return child.get(workspace_file_preference_provider_1.WorkspaceFilePreferenceProvider);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.bindWorkspaceFilePreferenceProvider = bindWorkspaceFilePreferenceProvider;
|
|
39
|
+
function bindPreferenceProviders(bind, unbind) {
|
|
40
|
+
bind(core_1.PreferenceProvider).to(user_configs_preference_provider_1.UserConfigsPreferenceProvider).inSingletonScope().whenTargetNamed(core_1.PreferenceScope.User);
|
|
41
|
+
bind(core_1.PreferenceProvider).to(workspace_preference_provider_1.WorkspacePreferenceProvider).inSingletonScope().whenTargetNamed(core_1.PreferenceScope.Workspace);
|
|
42
|
+
bind(core_1.PreferenceProvider).to(folders_preferences_provider_1.FoldersPreferencesProvider).inSingletonScope().whenTargetNamed(core_1.PreferenceScope.Folder);
|
|
43
|
+
bindWorkspaceFilePreferenceProvider(bind);
|
|
44
|
+
bind(user_configs_preference_provider_1.UserStorageLocationProvider).toConstantValue(() => browser_1.UserStorageUri);
|
|
45
|
+
(0, core_1.bindFactory)(bind, user_preference_provider_1.UserPreferenceProviderFactory, user_preference_provider_1.UserPreferenceProvider, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection);
|
|
46
|
+
(0, core_1.bindFactory)(bind, folder_preference_provider_1.FolderPreferenceProviderFactory, folder_preference_provider_1.FolderPreferenceProvider, section_preference_provider_1.SectionPreferenceProviderUri, section_preference_provider_1.SectionPreferenceProviderSection, folder_preference_provider_1.FolderPreferenceProviderFolder);
|
|
47
|
+
}
|
|
48
|
+
exports.bindPreferenceProviders = bindPreferenceProviders;
|
|
49
|
+
//# sourceMappingURL=preference-bindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-bindings.js","sourceRoot":"","sources":["../../src/browser/preference-bindings.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,4DAAqE;AACrE,iFAA2G;AAC3G,mFAA8E;AAC9E,6FAAuK;AACvK,iFAA4E;AAC5E,6EAAyI;AACzI,uFAAuH;AACvH,sCAA+E;AAC/E,4DAAgE;AAChE,iGAAwH;AAExH,SAAgB,mCAAmC,CAAC,IAAqB;IACrE,IAAI,CAAC,2EAAsC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAA+C,EAAE,EAAE;QAC9G,MAAM,KAAK,GAAG,IAAI,qBAAS,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3D,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,oEAA+B,CAAC,CAAC,MAAM,EAAE,CAAC;QACrD,KAAK,CAAC,IAAI,CAAC,2EAAsC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC5E,OAAO,KAAK,CAAC,GAAG,CAAC,oEAA+B,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC;AARD,kFAQC;AAED,SAAgB,uBAAuB,CAAC,IAAqB,EAAE,MAAyB;IACpF,IAAI,CAAC,yBAAkB,CAAC,CAAC,EAAE,CAAC,gEAA6B,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,sBAAe,CAAC,IAAI,CAAC,CAAC;IACpH,IAAI,CAAC,yBAAkB,CAAC,CAAC,EAAE,CAAC,2DAA2B,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,sBAAe,CAAC,SAAS,CAAC,CAAC;IACvH,IAAI,CAAC,yBAAkB,CAAC,CAAC,EAAE,CAAC,yDAA0B,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,sBAAe,CAAC,MAAM,CAAC,CAAC;IACnH,mCAAmC,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,8DAA2B,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,wBAAc,CAAC,CAAC;IACxE,IAAA,kBAAW,EAAC,IAAI,EAAE,wDAA6B,EAAE,iDAAsB,EAAE,0DAA4B,EAAE,8DAAgC,CAAC,CAAC;IACzI,IAAA,kBAAW,EAAC,IAAI,EAAE,4DAA+B,EAAE,qDAAwB,EAAE,0DAA4B,EAAE,8DAAgC,EAAE,2DAA8B,CAAC,CAAC;AACjL,CAAC;AARD,0DAQC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
2
|
+
import { CliPreferences } from '../common/cli-preferences';
|
|
3
|
+
import { PreferenceService } from '@theia/core/lib/common/preferences';
|
|
4
|
+
export declare class PreferenceFrontendContribution implements FrontendApplicationContribution {
|
|
5
|
+
protected readonly CliPreferences: CliPreferences;
|
|
6
|
+
protected readonly preferenceService: PreferenceService;
|
|
7
|
+
onStart(): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=preference-frontend-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-frontend-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/preference-frontend-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAmB,MAAM,oCAAoC,CAAC;AAExF,qBACa,8BAA+B,YAAW,+BAA+B;IAElF,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAExD,OAAO,IAAI,IAAI;CAQlB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2024 Typefox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PreferenceFrontendContribution = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const cli_preferences_1 = require("../common/cli-preferences");
|
|
22
|
+
const preferences_1 = require("@theia/core/lib/common/preferences");
|
|
23
|
+
let PreferenceFrontendContribution = class PreferenceFrontendContribution {
|
|
24
|
+
onStart() {
|
|
25
|
+
this.CliPreferences.getPreferences().then(async (preferences) => {
|
|
26
|
+
await this.preferenceService.ready;
|
|
27
|
+
for (const [key, value] of preferences) {
|
|
28
|
+
this.preferenceService.set(key, value, preferences_1.PreferenceScope.User);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.PreferenceFrontendContribution = PreferenceFrontendContribution;
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, inversify_1.inject)(cli_preferences_1.CliPreferences),
|
|
36
|
+
tslib_1.__metadata("design:type", Object)
|
|
37
|
+
], PreferenceFrontendContribution.prototype, "CliPreferences", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, inversify_1.inject)(preferences_1.PreferenceService),
|
|
40
|
+
tslib_1.__metadata("design:type", Object)
|
|
41
|
+
], PreferenceFrontendContribution.prototype, "preferenceService", void 0);
|
|
42
|
+
exports.PreferenceFrontendContribution = PreferenceFrontendContribution = tslib_1.__decorate([
|
|
43
|
+
(0, inversify_1.injectable)()
|
|
44
|
+
], PreferenceFrontendContribution);
|
|
45
|
+
//# sourceMappingURL=preference-frontend-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-frontend-contribution.js","sourceRoot":"","sources":["../../src/browser/preference-frontend-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,+DAA2D;AAC3D,oEAAwF;AAGjF,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAOvC,OAAO;QACH,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,KAAK,EAAC,WAAW,EAAC,EAAE;YAC1D,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;YACnC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;gBACrC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,6BAAe,CAAC,IAAI,CAAC,CAAC;YACjE,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAfY,wEAA8B;AAEpB;IADlB,IAAA,kBAAM,EAAC,gCAAc,CAAC;;sEAC2B;AAG/B;IADlB,IAAA,kBAAM,EAAC,+BAAiB,CAAC;;yEAC8B;yCAL/C,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAe1C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../../src/browser/style/index.css';
|
|
2
|
+
import './preferences-monaco-contribution';
|
|
3
|
+
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
4
|
+
export declare function bindPreferences(bind: interfaces.Bind, unbind: interfaces.Unbind): void;
|
|
5
|
+
declare const _default: ContainerModule;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=preference-frontend-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/preference-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAuB3E,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAiCtF;;AAED,wBAEG"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 Ericsson and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.bindPreferences = void 0;
|
|
19
|
+
require("../../src/browser/style/index.css");
|
|
20
|
+
require("./preferences-monaco-contribution");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
23
|
+
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
24
|
+
const preference_tree_generator_1 = require("./util/preference-tree-generator");
|
|
25
|
+
const preference_bindings_1 = require("./preference-bindings");
|
|
26
|
+
const preference_widget_bindings_1 = require("./views/preference-widget-bindings");
|
|
27
|
+
const preferences_contribution_1 = require("./preferences-contribution");
|
|
28
|
+
const preference_scope_command_manager_1 = require("./util/preference-scope-command-manager");
|
|
29
|
+
const json_schema_store_1 = require("@theia/core/lib/browser/json-schema-store");
|
|
30
|
+
const preferences_json_schema_contribution_1 = require("./preferences-json-schema-contribution");
|
|
31
|
+
const monaco_jsonc_editor_1 = require("./monaco-jsonc-editor");
|
|
32
|
+
const preference_transaction_manager_1 = require("./preference-transaction-manager");
|
|
33
|
+
const preference_open_handler_1 = require("./preference-open-handler");
|
|
34
|
+
const cli_preferences_1 = require("../common/cli-preferences");
|
|
35
|
+
const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
|
|
36
|
+
const preference_frontend_contribution_1 = require("./preference-frontend-contribution");
|
|
37
|
+
const preference_layout_1 = require("./util/preference-layout");
|
|
38
|
+
const preference_widget_1 = require("./views/preference-widget");
|
|
39
|
+
const abstract_resource_preference_provider_1 = require("../common/abstract-resource-preference-provider");
|
|
40
|
+
const frontend_preference_storage_1 = require("./frontend-preference-storage");
|
|
41
|
+
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
42
|
+
function bindPreferences(bind, unbind) {
|
|
43
|
+
(0, preference_bindings_1.bindPreferenceProviders)(bind, unbind);
|
|
44
|
+
(0, preference_widget_bindings_1.bindPreferencesWidgets)(bind);
|
|
45
|
+
bind(preference_tree_generator_1.PreferenceTreeGenerator).toSelf().inSingletonScope();
|
|
46
|
+
bind(preference_layout_1.PreferenceLayoutProvider).toSelf().inSingletonScope();
|
|
47
|
+
(0, browser_1.bindViewContribution)(bind, preferences_contribution_1.PreferencesContribution);
|
|
48
|
+
bind(preference_open_handler_1.PreferenceOpenHandler).toSelf().inSingletonScope();
|
|
49
|
+
bind(browser_1.OpenHandler).toService(preference_open_handler_1.PreferenceOpenHandler);
|
|
50
|
+
bind(preference_scope_command_manager_1.PreferenceScopeCommandManager).toSelf().inSingletonScope();
|
|
51
|
+
bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(preferences_contribution_1.PreferencesContribution);
|
|
52
|
+
bind(preferences_json_schema_contribution_1.PreferencesJsonSchemaContribution).toSelf().inSingletonScope();
|
|
53
|
+
bind(json_schema_store_1.JsonSchemaContribution).toService(preferences_json_schema_contribution_1.PreferencesJsonSchemaContribution);
|
|
54
|
+
bind(monaco_jsonc_editor_1.MonacoJSONCEditor).toSelf().inSingletonScope();
|
|
55
|
+
bind(preference_transaction_manager_1.PreferenceTransaction).toSelf();
|
|
56
|
+
bind(preference_transaction_manager_1.PreferenceTransactionFactory).toFactory(preference_transaction_manager_1.preferenceTransactionFactoryCreator);
|
|
57
|
+
bind(abstract_resource_preference_provider_1.PreferenceStorageFactory).toFactory(({ container }) => (uri, scope) => new frontend_preference_storage_1.FrontendPreferenceStorage(container.get(preference_transaction_manager_1.PreferenceTransactionFactory), container.get(file_service_1.FileService), uri, scope));
|
|
58
|
+
bind(cli_preferences_1.CliPreferences).toDynamicValue(ctx => service_connection_provider_1.ServiceConnectionProvider.createProxy(ctx.container, cli_preferences_1.CliPreferencesPath)).inSingletonScope();
|
|
59
|
+
bind(preference_frontend_contribution_1.PreferenceFrontendContribution).toSelf().inSingletonScope();
|
|
60
|
+
bind(browser_1.FrontendApplicationContribution).toService(preference_frontend_contribution_1.PreferenceFrontendContribution);
|
|
61
|
+
bind(browser_1.WidgetStatusBarContribution).toConstantValue((0, browser_1.noopWidgetStatusBarContribution)(preference_widget_1.PreferencesWidget));
|
|
62
|
+
}
|
|
63
|
+
exports.bindPreferences = bindPreferences;
|
|
64
|
+
exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
65
|
+
bindPreferences(bind, unbind);
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=preference-frontend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-frontend-module.js","sourceRoot":"","sources":["../../src/browser/preference-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE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theia/core/lib/browser';
|
|
2
|
+
import URI from '@theia/core/lib/common/uri';
|
|
3
|
+
import { PreferencesContribution } from './preferences-contribution';
|
|
4
|
+
export declare class PreferenceOpenHandler implements OpenHandler {
|
|
5
|
+
readonly id = "preference";
|
|
6
|
+
protected readonly preferencesContribution: PreferencesContribution;
|
|
7
|
+
canHandle(uri: URI): number;
|
|
8
|
+
open(uri: URI): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=preference-open-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-open-handler.d.ts","sourceRoot":"","sources":["../../src/browser/preference-open-handler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAkB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,qBACa,qBAAsB,YAAW,WAAW;IAErD,QAAQ,CAAC,EAAE,gBAAgB;IAG3B,SAAS,CAAC,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAEpE,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;IAIrB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;CAmBzC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2022 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PreferenceOpenHandler = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const preferences_contribution_1 = require("./preferences-contribution");
|
|
23
|
+
let PreferenceOpenHandler = class PreferenceOpenHandler {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.id = 'preference';
|
|
26
|
+
}
|
|
27
|
+
canHandle(uri) {
|
|
28
|
+
return uri.scheme === this.id ? 500 : -1;
|
|
29
|
+
}
|
|
30
|
+
async open(uri) {
|
|
31
|
+
const preferencesWidget = await this.preferencesContribution.openView();
|
|
32
|
+
const selector = `li[data-pref-id="${uri.path.toString()}"]:not([data-node-id^="commonly-used@"])`;
|
|
33
|
+
const element = document.querySelector(selector);
|
|
34
|
+
if (element instanceof HTMLElement) {
|
|
35
|
+
if (element.classList.contains('hidden')) {
|
|
36
|
+
// We clear the search term as we have clicked on a hidden preference
|
|
37
|
+
await preferencesWidget.setSearchTerm('');
|
|
38
|
+
await (0, browser_1.animationFrame)();
|
|
39
|
+
}
|
|
40
|
+
element.scrollIntoView({
|
|
41
|
+
block: 'center'
|
|
42
|
+
});
|
|
43
|
+
element.focus();
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.PreferenceOpenHandler = PreferenceOpenHandler;
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, inversify_1.inject)(preferences_contribution_1.PreferencesContribution),
|
|
52
|
+
tslib_1.__metadata("design:type", preferences_contribution_1.PreferencesContribution)
|
|
53
|
+
], PreferenceOpenHandler.prototype, "preferencesContribution", void 0);
|
|
54
|
+
exports.PreferenceOpenHandler = PreferenceOpenHandler = tslib_1.__decorate([
|
|
55
|
+
(0, inversify_1.injectable)()
|
|
56
|
+
], PreferenceOpenHandler);
|
|
57
|
+
//# sourceMappingURL=preference-open-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-open-handler.js","sourceRoot":"","sources":["../../src/browser/preference-open-handler.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,qDAAsE;AAEtE,4DAAkE;AAClE,yEAAqE;AAG9D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAA3B;QAEM,OAAE,GAAG,YAAY,CAAC;IA4B/B,CAAC;IAvBG,SAAS,CAAC,GAAQ;QACd,OAAO,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAQ;QACf,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC;QACxE,MAAM,QAAQ,GAAG,oBAAoB,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,0CAA0C,CAAC;QACnG,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,OAAO,YAAY,WAAW,EAAE,CAAC;YACjC,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACvC,qEAAqE;gBACrE,MAAM,iBAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;gBAC1C,MAAM,IAAA,wBAAc,GAAE,CAAC;YAC3B,CAAC;YACD,OAAO,CAAC,cAAc,CAAC;gBACnB,KAAK,EAAE,QAAQ;aAClB,CAAC,CAAC;YACH,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ,CAAA;AA9BY,sDAAqB;AAKX;IADlB,IAAA,kBAAM,EAAC,kDAAuB,CAAC;sCACY,kDAAuB;sEAAC;gCAL3D,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA8BjC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Listener, ListenerList, MaybePromise, MessageService } from '@theia/core';
|
|
2
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
3
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
4
|
+
import { PreferenceScope } from '@theia/core/lib/common/preferences/preference-scope';
|
|
5
|
+
import URI from '@theia/core/lib/common/uri';
|
|
6
|
+
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
|
|
7
|
+
import { Mutex } from 'async-mutex';
|
|
8
|
+
import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
|
|
9
|
+
import { MonacoJSONCEditor } from './monaco-jsonc-editor';
|
|
10
|
+
import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
|
11
|
+
import { IReference } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
|
|
12
|
+
export declare abstract class Transaction<Arguments extends unknown[], Result = unknown, Status = unknown> {
|
|
13
|
+
protected _open: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the transaction is still accepting new interactions.
|
|
16
|
+
* Enqueueing an action when the Transaction is no longer open will throw an error.
|
|
17
|
+
*/
|
|
18
|
+
get open(): boolean;
|
|
19
|
+
protected _result: Deferred<false | Result>;
|
|
20
|
+
/**
|
|
21
|
+
* The status of the transaction when complete.
|
|
22
|
+
*/
|
|
23
|
+
get result(): Promise<Result | false>;
|
|
24
|
+
/**
|
|
25
|
+
* The transaction will self-dispose when the queue is empty, once at least one action has been processed.
|
|
26
|
+
*/
|
|
27
|
+
protected readonly queue: Mutex;
|
|
28
|
+
protected readonly onWillConcludeListeners: ListenerList<false | Status, Promise<void>>;
|
|
29
|
+
/**
|
|
30
|
+
* An event fired when the transaction is wrapping up.
|
|
31
|
+
* Consumers can call `waitUntil` on the event to delay the resolution of the `result` Promise.
|
|
32
|
+
*/
|
|
33
|
+
onWillConclude: Listener.Registration<false | Status, Promise<void>>;
|
|
34
|
+
protected status: Deferred<Status>;
|
|
35
|
+
/**
|
|
36
|
+
* Whether any actions have been added to the transaction.
|
|
37
|
+
* The Transaction will not self-dispose until at least one action has been performed.
|
|
38
|
+
*/
|
|
39
|
+
protected inUse: boolean;
|
|
40
|
+
protected init(): void;
|
|
41
|
+
protected doInit(): Promise<void>;
|
|
42
|
+
waitFor(delay?: Promise<unknown>, disposeIfRejected?: boolean): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* @returns a promise reflecting the result of performing an action. Typically the promise will not resolve until the whole transaction is complete.
|
|
45
|
+
*/
|
|
46
|
+
enqueueAction(...args: Arguments): Promise<Result | false>;
|
|
47
|
+
protected disposeWhenDone(): void;
|
|
48
|
+
protected conclude(): Promise<void>;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Runs any code necessary to initialize the batch of interactions. No interaction will be run until the setup is complete.
|
|
52
|
+
*
|
|
53
|
+
* @returns a representation of the success of setup specific to a given transaction implementation.
|
|
54
|
+
*/
|
|
55
|
+
protected abstract setUp(): MaybePromise<Status>;
|
|
56
|
+
/**
|
|
57
|
+
* Performs a single interaction
|
|
58
|
+
*
|
|
59
|
+
* @returns the result of that interaction, specific to a given transaction type.
|
|
60
|
+
*/
|
|
61
|
+
protected abstract act(...args: Arguments): MaybePromise<Result>;
|
|
62
|
+
/**
|
|
63
|
+
* Runs any code necessary to complete a transaction and release any resources it holds.
|
|
64
|
+
*
|
|
65
|
+
* @returns implementation-specific information about the success of the transaction. Will be used as the final status of the transaction.
|
|
66
|
+
*/
|
|
67
|
+
protected abstract tearDown(): MaybePromise<Result>;
|
|
68
|
+
}
|
|
69
|
+
export interface PreferenceContext {
|
|
70
|
+
getConfigUri(): URI;
|
|
71
|
+
getScope(): PreferenceScope;
|
|
72
|
+
}
|
|
73
|
+
export declare const PreferenceContext: unique symbol;
|
|
74
|
+
export declare const PreferenceTransactionPreludeProvider: unique symbol;
|
|
75
|
+
export type PreferenceTransactionPreludeProvider = () => Promise<unknown>;
|
|
76
|
+
export declare class PreferenceTransaction extends Transaction<[string, string[], unknown], boolean, boolean> {
|
|
77
|
+
reference: IReference<MonacoEditorModel> | undefined;
|
|
78
|
+
protected readonly context: PreferenceContext;
|
|
79
|
+
protected readonly prelude?: PreferenceTransactionPreludeProvider;
|
|
80
|
+
protected readonly textModelService: MonacoTextModelService;
|
|
81
|
+
protected readonly jsoncEditor: MonacoJSONCEditor;
|
|
82
|
+
protected readonly messageService: MessageService;
|
|
83
|
+
protected readonly editorManager: EditorManager;
|
|
84
|
+
protected doInit(): Promise<void>;
|
|
85
|
+
protected setUp(): Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* @returns whether the setting operation in progress, and any others started in the meantime, should continue.
|
|
88
|
+
*/
|
|
89
|
+
protected handleDirtyEditor(): Promise<boolean>;
|
|
90
|
+
protected act(key: string, path: string[], value: unknown): Promise<boolean>;
|
|
91
|
+
protected tearDown(): Promise<boolean>;
|
|
92
|
+
}
|
|
93
|
+
export interface PreferenceTransactionFactory {
|
|
94
|
+
(context: PreferenceContext, waitFor?: Promise<unknown>): PreferenceTransaction;
|
|
95
|
+
}
|
|
96
|
+
export declare const PreferenceTransactionFactory: unique symbol;
|
|
97
|
+
export declare const preferenceTransactionFactoryCreator: interfaces.FactoryCreator<PreferenceTransaction>;
|
|
98
|
+
//# sourceMappingURL=preference-transaction-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-transaction-manager.d.ts","sourceRoot":"","sources":["../../src/browser/preference-transaction-manager.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAqB,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAsB,UAAU,EAAiB,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,KAAK,EAAkB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,8BAIsB,WAAW,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO;IAC7F,SAAS,CAAC,KAAK,UAAQ;IACvB;;;OAGG;IACH,IAAI,IAAI,IAAI,OAAO,CAElB;IACD,SAAS,CAAC,OAAO,2BAAkC;IACnD;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAEpC;IACD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,KAAK,QAAsC;IAC9D,SAAS,CAAC,QAAQ,CAAC,uBAAuB,8CAAuD;IACjG;;;OAGG;IACH,cAAc,uDAA6C;IAE3D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