@theia/preferences 1.67.0-next.56 → 1.67.0-next.86

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.
Files changed (206) hide show
  1. package/lib/browser/folder-preference-provider.d.ts +23 -0
  2. package/lib/browser/folder-preference-provider.d.ts.map +1 -0
  3. package/lib/browser/folder-preference-provider.js +57 -0
  4. package/lib/browser/folder-preference-provider.js.map +1 -0
  5. package/lib/browser/folders-preferences-provider.d.ts +27 -0
  6. package/lib/browser/folders-preferences-provider.d.ts.map +1 -0
  7. package/lib/browser/folders-preferences-provider.js +237 -0
  8. package/lib/browser/folders-preferences-provider.js.map +1 -0
  9. package/lib/browser/frontend-preference-storage.d.ts +20 -0
  10. package/lib/browser/frontend-preference-storage.d.ts.map +1 -0
  11. package/lib/browser/frontend-preference-storage.js +63 -0
  12. package/lib/browser/frontend-preference-storage.js.map +1 -0
  13. package/lib/browser/index.d.ts +5 -0
  14. package/lib/browser/index.d.ts.map +1 -0
  15. package/lib/browser/index.js +23 -0
  16. package/lib/browser/index.js.map +1 -0
  17. package/lib/browser/monaco-jsonc-editor.d.ts +10 -0
  18. package/lib/browser/monaco-jsonc-editor.d.ts.map +1 -0
  19. package/lib/browser/monaco-jsonc-editor.js +73 -0
  20. package/lib/browser/monaco-jsonc-editor.js.map +1 -0
  21. package/lib/browser/package.spec.d.ts +1 -0
  22. package/lib/browser/package.spec.d.ts.map +1 -0
  23. package/lib/browser/package.spec.js +26 -0
  24. package/lib/browser/package.spec.js.map +1 -0
  25. package/lib/browser/preference-bindings.d.ts +4 -0
  26. package/lib/browser/preference-bindings.d.ts.map +1 -0
  27. package/lib/browser/preference-bindings.js +49 -0
  28. package/lib/browser/preference-bindings.js.map +1 -0
  29. package/lib/browser/preference-frontend-contribution.d.ts +9 -0
  30. package/lib/browser/preference-frontend-contribution.d.ts.map +1 -0
  31. package/lib/browser/preference-frontend-contribution.js +45 -0
  32. package/lib/browser/preference-frontend-contribution.js.map +1 -0
  33. package/lib/browser/preference-frontend-module.d.ts +7 -0
  34. package/lib/browser/preference-frontend-module.d.ts.map +1 -0
  35. package/lib/browser/preference-frontend-module.js +67 -0
  36. package/lib/browser/preference-frontend-module.js.map +1 -0
  37. package/lib/browser/preference-open-handler.d.ts +10 -0
  38. package/lib/browser/preference-open-handler.d.ts.map +1 -0
  39. package/lib/browser/preference-open-handler.js +57 -0
  40. package/lib/browser/preference-open-handler.js.map +1 -0
  41. package/lib/browser/preference-transaction-manager.d.ts +98 -0
  42. package/lib/browser/preference-transaction-manager.d.ts.map +1 -0
  43. package/lib/browser/preference-transaction-manager.js +279 -0
  44. package/lib/browser/preference-transaction-manager.js.map +1 -0
  45. package/lib/browser/preference-tree-model.d.ts +60 -0
  46. package/lib/browser/preference-tree-model.d.ts.map +1 -0
  47. package/lib/browser/preference-tree-model.js +247 -0
  48. package/lib/browser/preference-tree-model.js.map +1 -0
  49. package/lib/browser/preferences-contribution.d.ts +35 -0
  50. package/lib/browser/preferences-contribution.d.ts.map +1 -0
  51. package/lib/browser/preferences-contribution.js +263 -0
  52. package/lib/browser/preferences-contribution.js.map +1 -0
  53. package/lib/browser/preferences-json-schema-contribution.d.ts +17 -0
  54. package/lib/browser/preferences-json-schema-contribution.d.ts.map +1 -0
  55. package/lib/browser/preferences-json-schema-contribution.js +84 -0
  56. package/lib/browser/preferences-json-schema-contribution.js.map +1 -0
  57. package/lib/browser/preferences-monaco-contribution.d.ts +2 -0
  58. package/lib/browser/preferences-monaco-contribution.d.ts.map +1 -0
  59. package/lib/browser/preferences-monaco-contribution.js +28 -0
  60. package/lib/browser/preferences-monaco-contribution.js.map +1 -0
  61. package/lib/browser/util/preference-layout.d.ts +23 -0
  62. package/lib/browser/util/preference-layout.d.ts.map +1 -0
  63. package/lib/browser/util/preference-layout.js +441 -0
  64. package/lib/browser/util/preference-layout.js.map +1 -0
  65. package/lib/browser/util/preference-scope-command-manager.d.ts +18 -0
  66. package/lib/browser/util/preference-scope-command-manager.d.ts.map +1 -0
  67. package/lib/browser/util/preference-scope-command-manager.js +80 -0
  68. package/lib/browser/util/preference-scope-command-manager.js.map +1 -0
  69. package/lib/browser/util/preference-tree-generator.d.ts +48 -0
  70. package/lib/browser/util/preference-tree-generator.d.ts.map +1 -0
  71. package/lib/browser/util/preference-tree-generator.js +277 -0
  72. package/lib/browser/util/preference-tree-generator.js.map +1 -0
  73. package/lib/browser/util/preference-tree-label-provider.d.ts +12 -0
  74. package/lib/browser/util/preference-tree-label-provider.d.ts.map +1 -0
  75. package/lib/browser/util/preference-tree-label-provider.js +74 -0
  76. package/lib/browser/util/preference-tree-label-provider.js.map +1 -0
  77. package/lib/browser/util/preference-tree-label-provider.spec.d.ts +2 -0
  78. package/lib/browser/util/preference-tree-label-provider.spec.d.ts.map +1 -0
  79. package/lib/browser/util/preference-tree-label-provider.spec.js +90 -0
  80. package/lib/browser/util/preference-tree-label-provider.spec.js.map +1 -0
  81. package/lib/browser/util/preference-types.d.ts +69 -0
  82. package/lib/browser/util/preference-types.d.ts.map +1 -0
  83. package/lib/browser/util/preference-types.js +133 -0
  84. package/lib/browser/util/preference-types.js.map +1 -0
  85. package/lib/browser/views/components/preference-array-input.d.ts +29 -0
  86. package/lib/browser/views/components/preference-array-input.d.ts.map +1 -0
  87. package/lib/browser/views/components/preference-array-input.js +176 -0
  88. package/lib/browser/views/components/preference-array-input.js.map +1 -0
  89. package/lib/browser/views/components/preference-boolean-input.d.ts +18 -0
  90. package/lib/browser/views/components/preference-boolean-input.d.ts.map +1 -0
  91. package/lib/browser/views/components/preference-boolean-input.js +75 -0
  92. package/lib/browser/views/components/preference-boolean-input.js.map +1 -0
  93. package/lib/browser/views/components/preference-file-input.d.ts +30 -0
  94. package/lib/browser/views/components/preference-file-input.d.ts.map +1 -0
  95. package/lib/browser/views/components/preference-file-input.js +103 -0
  96. package/lib/browser/views/components/preference-file-input.js.map +1 -0
  97. package/lib/browser/views/components/preference-json-input.d.ts +20 -0
  98. package/lib/browser/views/components/preference-json-input.d.ts.map +1 -0
  99. package/lib/browser/views/components/preference-json-input.js +86 -0
  100. package/lib/browser/views/components/preference-json-input.js.map +1 -0
  101. package/lib/browser/views/components/preference-markdown-renderer.d.ts +15 -0
  102. package/lib/browser/views/components/preference-markdown-renderer.d.ts.map +1 -0
  103. package/lib/browser/views/components/preference-markdown-renderer.js +86 -0
  104. package/lib/browser/views/components/preference-markdown-renderer.js.map +1 -0
  105. package/lib/browser/views/components/preference-node-renderer-creator.d.ts +49 -0
  106. package/lib/browser/views/components/preference-node-renderer-creator.d.ts.map +1 -0
  107. package/lib/browser/views/components/preference-node-renderer-creator.js +122 -0
  108. package/lib/browser/views/components/preference-node-renderer-creator.js.map +1 -0
  109. package/lib/browser/views/components/preference-node-renderer.d.ts +118 -0
  110. package/lib/browser/views/components/preference-node-renderer.d.ts.map +1 -0
  111. package/lib/browser/views/components/preference-node-renderer.js +442 -0
  112. package/lib/browser/views/components/preference-node-renderer.js.map +1 -0
  113. package/lib/browser/views/components/preference-null-input.d.ts +16 -0
  114. package/lib/browser/views/components/preference-null-input.d.ts.map +1 -0
  115. package/lib/browser/views/components/preference-null-input.js +59 -0
  116. package/lib/browser/views/components/preference-null-input.js.map +1 -0
  117. package/lib/browser/views/components/preference-number-input.d.ts +35 -0
  118. package/lib/browser/views/components/preference-number-input.d.ts.map +1 -0
  119. package/lib/browser/views/components/preference-number-input.js +174 -0
  120. package/lib/browser/views/components/preference-number-input.js.map +1 -0
  121. package/lib/browser/views/components/preference-select-input.d.ts +29 -0
  122. package/lib/browser/views/components/preference-select-input.d.ts.map +1 -0
  123. package/lib/browser/views/components/preference-select-input.js +131 -0
  124. package/lib/browser/views/components/preference-select-input.js.map +1 -0
  125. package/lib/browser/views/components/preference-string-input.d.ts +18 -0
  126. package/lib/browser/views/components/preference-string-input.d.ts.map +1 -0
  127. package/lib/browser/views/components/preference-string-input.js +85 -0
  128. package/lib/browser/views/components/preference-string-input.js.map +1 -0
  129. package/lib/browser/views/preference-editor-widget.d.ts +75 -0
  130. package/lib/browser/views/preference-editor-widget.d.ts.map +1 -0
  131. package/lib/browser/views/preference-editor-widget.js +391 -0
  132. package/lib/browser/views/preference-editor-widget.js.map +1 -0
  133. package/lib/browser/views/preference-scope-tabbar-widget.d.ts +55 -0
  134. package/lib/browser/views/preference-scope-tabbar-widget.d.ts.map +1 -0
  135. package/lib/browser/views/preference-scope-tabbar-widget.js +337 -0
  136. package/lib/browser/views/preference-scope-tabbar-widget.js.map +1 -0
  137. package/lib/browser/views/preference-searchbar-widget.d.ts +54 -0
  138. package/lib/browser/views/preference-searchbar-widget.d.ts.map +1 -0
  139. package/lib/browser/views/preference-searchbar-widget.js +163 -0
  140. package/lib/browser/views/preference-searchbar-widget.js.map +1 -0
  141. package/lib/browser/views/preference-tree-widget.d.ts +20 -0
  142. package/lib/browser/views/preference-tree-widget.d.ts.map +1 -0
  143. package/lib/browser/views/preference-tree-widget.js +106 -0
  144. package/lib/browser/views/preference-tree-widget.js.map +1 -0
  145. package/lib/browser/views/preference-widget-bindings.d.ts +4 -0
  146. package/lib/browser/views/preference-widget-bindings.d.ts.map +1 -0
  147. package/lib/browser/views/preference-widget-bindings.js +91 -0
  148. package/lib/browser/views/preference-widget-bindings.js.map +1 -0
  149. package/lib/browser/views/preference-widget.d.ts +38 -0
  150. package/lib/browser/views/preference-widget.d.ts.map +1 -0
  151. package/lib/browser/views/preference-widget.js +120 -0
  152. package/lib/browser/views/preference-widget.js.map +1 -0
  153. package/lib/browser/workspace-file-preference-provider.d.ts +24 -0
  154. package/lib/browser/workspace-file-preference-provider.d.ts.map +1 -0
  155. package/lib/browser/workspace-file-preference-provider.js +103 -0
  156. package/lib/browser/workspace-file-preference-provider.js.map +1 -0
  157. package/lib/browser/workspace-preference-provider.d.ts +36 -0
  158. package/lib/browser/workspace-preference-provider.d.ts.map +1 -0
  159. package/lib/browser/workspace-preference-provider.js +147 -0
  160. package/lib/browser/workspace-preference-provider.js.map +1 -0
  161. package/lib/common/abstract-resource-preference-provider.d.ts +69 -0
  162. package/lib/common/abstract-resource-preference-provider.d.ts.map +1 -0
  163. package/lib/common/abstract-resource-preference-provider.js +207 -0
  164. package/lib/common/abstract-resource-preference-provider.js.map +1 -0
  165. package/lib/common/abstract-resource-preference-provider.spec.d.ts +2 -0
  166. package/lib/common/abstract-resource-preference-provider.spec.d.ts.map +1 -0
  167. package/lib/common/abstract-resource-preference-provider.spec.js +84 -0
  168. package/lib/common/abstract-resource-preference-provider.spec.js.map +1 -0
  169. package/lib/common/cli-preferences.d.ts +6 -0
  170. package/lib/common/cli-preferences.d.ts.map +1 -0
  171. package/lib/common/cli-preferences.js +21 -0
  172. package/lib/common/cli-preferences.js.map +1 -0
  173. package/lib/common/jsonc-editor.d.ts +10 -0
  174. package/lib/common/jsonc-editor.d.ts.map +1 -0
  175. package/lib/common/jsonc-editor.js +68 -0
  176. package/lib/common/jsonc-editor.js.map +1 -0
  177. package/lib/common/section-preference-provider.d.ts +20 -0
  178. package/lib/common/section-preference-provider.d.ts.map +1 -0
  179. package/lib/common/section-preference-provider.js +84 -0
  180. package/lib/common/section-preference-provider.js.map +1 -0
  181. package/lib/common/user-configs-preference-provider.d.ts +24 -0
  182. package/lib/common/user-configs-preference-provider.d.ts.map +1 -0
  183. package/lib/common/user-configs-preference-provider.js +134 -0
  184. package/lib/common/user-configs-preference-provider.js.map +1 -0
  185. package/lib/common/user-preference-provider.d.ts +14 -0
  186. package/lib/common/user-preference-provider.d.ts.map +1 -0
  187. package/lib/common/user-preference-provider.js +37 -0
  188. package/lib/common/user-preference-provider.js.map +1 -0
  189. package/lib/node/backend-preference-storage.d.ts +34 -0
  190. package/lib/node/backend-preference-storage.d.ts.map +1 -0
  191. package/lib/node/backend-preference-storage.js +100 -0
  192. package/lib/node/backend-preference-storage.js.map +1 -0
  193. package/lib/node/preference-backend-module.d.ts +4 -0
  194. package/lib/node/preference-backend-module.d.ts.map +1 -0
  195. package/lib/node/preference-backend-module.js +41 -0
  196. package/lib/node/preference-backend-module.js.map +1 -0
  197. package/lib/node/preference-bindings.d.ts +3 -0
  198. package/lib/node/preference-bindings.d.ts.map +1 -0
  199. package/lib/node/preference-bindings.js +33 -0
  200. package/lib/node/preference-bindings.js.map +1 -0
  201. package/lib/node/preference-cli-contribution.d.ts +11 -0
  202. package/lib/node/preference-cli-contribution.d.ts.map +1 -0
  203. package/lib/node/preference-cli-contribution.js +48 -0
  204. package/lib/node/preference-cli-contribution.js.map +1 -0
  205. package/package.json +8 -8
  206. package/src/browser/style/index.css +29 -28
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 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
+ var PreferencesTreeWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PreferencesTreeWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const browser_1 = require("@theia/core/lib/browser");
23
+ const React = require("@theia/core/shared/react");
24
+ const preference_tree_model_1 = require("../preference-tree-model");
25
+ const preference_types_1 = require("../util/preference-types");
26
+ let PreferencesTreeWidget = PreferencesTreeWidget_1 = class PreferencesTreeWidget extends browser_1.TreeWidget {
27
+ constructor() {
28
+ super(...arguments);
29
+ this.shouldFireSelectionEvents = true;
30
+ }
31
+ init() {
32
+ super.init();
33
+ this.id = PreferencesTreeWidget_1.ID;
34
+ this.toDispose.pushAll([
35
+ this.model.onFilterChanged(() => {
36
+ this.updateRows();
37
+ }),
38
+ ]);
39
+ }
40
+ doUpdateRows() {
41
+ this.rows = new Map();
42
+ let index = 0;
43
+ for (const [id, nodeRow] of this.model.currentRows.entries()) {
44
+ if (nodeRow.visibleChildren > 0 && this.isVisibleNode(nodeRow.node)) {
45
+ this.rows.set(id, { ...nodeRow, index: index++ });
46
+ }
47
+ }
48
+ this.updateScrollToRow();
49
+ }
50
+ isVisibleNode(node) {
51
+ if (preference_types_1.Preference.TreeNode.isTopLevel(node)) {
52
+ return true;
53
+ }
54
+ else {
55
+ return browser_1.ExpandableTreeNode.isExpanded(node.parent) && preference_types_1.Preference.TreeNode.is(node.parent) && this.isVisibleNode(node.parent);
56
+ }
57
+ }
58
+ doRenderNodeRow({ depth, visibleChildren, node, isExpansible }) {
59
+ return this.renderNode(node, { depth, visibleChildren, isExpansible });
60
+ }
61
+ renderNode(node, props) {
62
+ if (!browser_1.TreeNode.isVisible(node)) {
63
+ return undefined;
64
+ }
65
+ const attributes = this.createNodeAttributes(node, props);
66
+ const content = React.createElement("div", { className: browser_1.TREE_NODE_CONTENT_CLASS },
67
+ this.renderExpansionToggle(node, props),
68
+ this.renderCaption(node, props));
69
+ return React.createElement('div', attributes, content);
70
+ }
71
+ renderExpansionToggle(node, props) {
72
+ if (browser_1.ExpandableTreeNode.is(node) && !props.isExpansible) {
73
+ return React.createElement("div", { className: 'preferences-tree-spacer' });
74
+ }
75
+ return super.renderExpansionToggle(node, props);
76
+ }
77
+ toNodeName(node) {
78
+ var _a;
79
+ const visibleChildren = (_a = this.model.currentRows.get(node.id)) === null || _a === void 0 ? void 0 : _a.visibleChildren;
80
+ const baseName = this.labelProvider.getName(node);
81
+ const printedNameWithVisibleChildren = this.model.isFiltered && visibleChildren !== undefined
82
+ ? `${baseName} (${visibleChildren})`
83
+ : baseName;
84
+ return printedNameWithVisibleChildren;
85
+ }
86
+ };
87
+ exports.PreferencesTreeWidget = PreferencesTreeWidget;
88
+ PreferencesTreeWidget.ID = 'preferences.tree';
89
+ tslib_1.__decorate([
90
+ (0, inversify_1.inject)(preference_tree_model_1.PreferenceTreeModel),
91
+ tslib_1.__metadata("design:type", preference_tree_model_1.PreferenceTreeModel)
92
+ ], PreferencesTreeWidget.prototype, "model", void 0);
93
+ tslib_1.__decorate([
94
+ (0, inversify_1.inject)(browser_1.TreeProps),
95
+ tslib_1.__metadata("design:type", Object)
96
+ ], PreferencesTreeWidget.prototype, "treeProps", void 0);
97
+ tslib_1.__decorate([
98
+ (0, inversify_1.postConstruct)(),
99
+ tslib_1.__metadata("design:type", Function),
100
+ tslib_1.__metadata("design:paramtypes", []),
101
+ tslib_1.__metadata("design:returntype", void 0)
102
+ ], PreferencesTreeWidget.prototype, "init", null);
103
+ exports.PreferencesTreeWidget = PreferencesTreeWidget = PreferencesTreeWidget_1 = tslib_1.__decorate([
104
+ (0, inversify_1.injectable)()
105
+ ], PreferencesTreeWidget);
106
+ //# sourceMappingURL=preference-tree-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-tree-widget.js","sourceRoot":"","sources":["../../../src/browser/views/preference-tree-widget.tsx"],"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,4DAAiF;AACjF,qDAMiC;AACjC,kDAAmD;AACnD,oEAA+G;AAC/G,+DAAsD;AAG/C,IAAM,qBAAqB,6BAA3B,MAAM,qBAAsB,SAAQ,oBAAU;IAA9C;;QAGO,8BAAyB,GAAY,IAAI,CAAC;IAqExD,CAAC;IA9DY,IAAI;QACT,KAAK,CAAC,IAAI,EAAE,CAAC;QACb,IAAI,CAAC,EAAE,GAAG,uBAAqB,CAAC,EAAE,CAAC;Q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B;AACvB,wBAAE,GAAG,kBAAkB,AAArB,CAAsB;AAKgB;IAA9C,IAAA,kBAAM,EAAC,2CAAmB,CAAC;sCAA0B,2CAAmB;oDAAC;AACpC;IAArC,IAAA,kBAAM,EAAC,mBAAS,CAAC;;wDAAyC;AAGlD;IADR,IAAA,yBAAa,GAAE;;;;iDASf;gCAlBQ,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAwEjC"}
@@ -0,0 +1,4 @@
1
+ import { Container, interfaces } from '@theia/core/shared/inversify';
2
+ export declare function bindPreferencesWidgets(bind: interfaces.Bind): void;
3
+ export declare function createPreferencesWidgetContainer(parent: interfaces.Container): Container;
4
+ //# sourceMappingURL=preference-widget-bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-widget-bindings.d.ts","sourceRoot":"","sources":["../../../src/browser/views/preference-widget-bindings.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAuBrE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAyClE;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,GAAG,SAAS,CAqBxF"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPreferencesWidgetContainer = exports.bindPreferencesWidgets = void 0;
4
+ // *****************************************************************************
5
+ // Copyright (C) 2020 Ericsson and others.
6
+ //
7
+ // This program and the accompanying materials are made available under the
8
+ // terms of the Eclipse Public License v. 2.0 which is available at
9
+ // http://www.eclipse.org/legal/epl-2.0.
10
+ //
11
+ // This Source Code may also be made available under the following Secondary
12
+ // Licenses when the conditions for such availability set forth in the Eclipse
13
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ // with the GNU Classpath Exception which is available at
15
+ // https://www.gnu.org/software/classpath/license.html.
16
+ //
17
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
18
+ // *****************************************************************************
19
+ const browser_1 = require("@theia/core/lib/browser");
20
+ const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
21
+ const preference_tree_model_1 = require("../preference-tree-model");
22
+ const preference_tree_label_provider_1 = require("../util/preference-tree-label-provider");
23
+ const preference_array_input_1 = require("./components/preference-array-input");
24
+ const preference_boolean_input_1 = require("./components/preference-boolean-input");
25
+ const preference_file_input_1 = require("./components/preference-file-input");
26
+ const preference_json_input_1 = require("./components/preference-json-input");
27
+ const preference_node_renderer_1 = require("./components/preference-node-renderer");
28
+ const preference_node_renderer_creator_1 = require("./components/preference-node-renderer-creator");
29
+ const preference_number_input_1 = require("./components/preference-number-input");
30
+ const preference_select_input_1 = require("./components/preference-select-input");
31
+ const preference_string_input_1 = require("./components/preference-string-input");
32
+ const preference_markdown_renderer_1 = require("./components/preference-markdown-renderer");
33
+ const preference_editor_widget_1 = require("./preference-editor-widget");
34
+ const preference_scope_tabbar_widget_1 = require("./preference-scope-tabbar-widget");
35
+ const preference_searchbar_widget_1 = require("./preference-searchbar-widget");
36
+ const preference_tree_widget_1 = require("./preference-tree-widget");
37
+ const preference_widget_1 = require("./preference-widget");
38
+ const preference_null_input_1 = require("./components/preference-null-input");
39
+ function bindPreferencesWidgets(bind) {
40
+ bind(preference_tree_label_provider_1.PreferenceTreeLabelProvider).toSelf().inSingletonScope();
41
+ bind(browser_1.LabelProviderContribution).toService(preference_tree_label_provider_1.PreferenceTreeLabelProvider);
42
+ bind(preference_widget_1.PreferencesWidget)
43
+ .toDynamicValue(({ container }) => createPreferencesWidgetContainer(container).get(preference_widget_1.PreferencesWidget))
44
+ .inSingletonScope();
45
+ bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
46
+ id: preference_widget_1.PreferencesWidget.ID,
47
+ createWidget: () => container.get(preference_widget_1.PreferencesWidget)
48
+ })).inSingletonScope();
49
+ (0, contribution_provider_1.bindContributionProvider)(bind, preference_node_renderer_creator_1.PreferenceNodeRendererContribution);
50
+ bind(preference_select_input_1.PreferenceSelectInputRenderer).toSelf();
51
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_select_input_1.PreferenceSelectInputRendererContribution).inSingletonScope();
52
+ bind(preference_array_input_1.PreferenceArrayInputRenderer).toSelf();
53
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_array_input_1.PreferenceArrayInputRendererContribution).inSingletonScope();
54
+ bind(preference_string_input_1.PreferenceStringInputRenderer).toSelf();
55
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_string_input_1.PreferenceStringInputRendererContribution).inSingletonScope();
56
+ bind(preference_null_input_1.PreferenceNullInputRenderer).toSelf();
57
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_null_input_1.PreferenceNullRendererContribution).inSingletonScope();
58
+ bind(preference_boolean_input_1.PreferenceBooleanInputRenderer).toSelf();
59
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_boolean_input_1.PreferenceBooleanInputRendererContribution).inSingletonScope();
60
+ bind(preference_number_input_1.PreferenceNumberInputRenderer).toSelf();
61
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_number_input_1.PreferenceNumberInputRendererContribution).inSingletonScope();
62
+ bind(preference_json_input_1.PreferenceJSONLinkRenderer).toSelf();
63
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_json_input_1.PreferenceJSONLinkRendererContribution).inSingletonScope();
64
+ bind(preference_node_renderer_1.PreferenceHeaderRenderer).toSelf();
65
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_node_renderer_creator_1.PreferenceHeaderRendererContribution).inSingletonScope();
66
+ bind(preference_file_input_1.PreferenceSingleFilePathInputRenderer).toSelf();
67
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererContribution).to(preference_file_input_1.PreferenceSingleFilePathInputRendererContribution).inSingletonScope();
68
+ bind(preference_node_renderer_creator_1.DefaultPreferenceNodeRendererCreatorRegistry).toSelf().inSingletonScope();
69
+ bind(preference_node_renderer_creator_1.PreferenceNodeRendererCreatorRegistry).toService(preference_node_renderer_creator_1.DefaultPreferenceNodeRendererCreatorRegistry);
70
+ }
71
+ exports.bindPreferencesWidgets = bindPreferencesWidgets;
72
+ function createPreferencesWidgetContainer(parent) {
73
+ const child = (0, browser_1.createTreeContainer)(parent, {
74
+ model: preference_tree_model_1.PreferenceTreeModel,
75
+ widget: preference_tree_widget_1.PreferencesTreeWidget,
76
+ props: { search: false }
77
+ });
78
+ child.bind(preference_editor_widget_1.PreferencesEditorWidget).toSelf();
79
+ child.bind(preference_searchbar_widget_1.PreferencesSearchbarWidget).toSelf();
80
+ child.bind(preference_scope_tabbar_widget_1.PreferencesScopeTabBar).toSelf();
81
+ child.bind(preference_widget_1.PreferencesWidget).toSelf();
82
+ child.bind(preference_node_renderer_1.PreferenceNodeRendererFactory).toFactory(({ container }) => (node) => {
83
+ const registry = container.get(preference_node_renderer_creator_1.PreferenceNodeRendererCreatorRegistry);
84
+ const creator = registry.getPreferenceNodeRendererCreator(node);
85
+ return creator.createRenderer(node, container);
86
+ });
87
+ child.bind(preference_markdown_renderer_1.PreferenceMarkdownRenderer).toSelf().inSingletonScope();
88
+ return child;
89
+ }
90
+ exports.createPreferencesWidgetContainer = createPreferencesWidgetContainer;
91
+ //# sourceMappingURL=preference-widget-bindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-widget-bindings.js","sourceRoot":"","sources":["../../../src/browser/views/preference-widget-bindings.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,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AC,SAAS,CAAC,+EAA4C,CAAC,CAAC;AACxG,CAAC;AAzCD,wDAyCC;AAED,SAAgB,gCAAgC,CAAC,MAA4B;IACzE,MAAM,KAAK,GAAG,IAAA,6BAAmB,EAAC,MAAM,EAAE;QACtC,KAAK,EAAE,2CAAmB;QAC1B,MAAM,EAAE,8CAAqB;QAC7B,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;KAC3B,CAAC,CAAC;IACH,KAAK,CAAC,IAAI,CAAC,kDAAuB,CAAC,CAAC,MAAM,EAAE,CAAC;IAE7C,KAAK,CAAC,IAAI,CAAC,wDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC;IAChD,KAAK,CAAC,IAAI,CAAC,uDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5C,KAAK,CAAC,IAAI,CAAC,qCAAiB,CAAC,CAAC,MAAM,EAAE,CAAC;IAEvC,KAAK,CAAC,IAAI,CAAC,wDAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,IAAyB,EAAE,EAAE;QACjG,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAwC,wEAAqC,CAAC,CAAC;QAC7G,MAAM,OAAO,GAAG,QAAQ,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC;QAChE,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,IAAI,CAAC,yDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEnE,OAAO,KAAK,CAAC;AACjB,CAAC;AArBD,4EAqBC"}
@@ -0,0 +1,38 @@
1
+ import { Panel, Widget, Message, StatefulWidget } from '@theia/core/lib/browser';
2
+ import { PreferencesEditorState, PreferencesEditorWidget } from './preference-editor-widget';
3
+ import { PreferencesTreeWidget } from './preference-tree-widget';
4
+ import { PreferencesSearchbarState, PreferencesSearchbarWidget } from './preference-searchbar-widget';
5
+ import { PreferencesScopeTabBar, PreferencesScopeTabBarState } from './preference-scope-tabbar-widget';
6
+ import { Preference } from '../util/preference-types';
7
+ import URI from '@theia/core/lib/common/uri';
8
+ import { PreferenceScope } from '@theia/core';
9
+ interface PreferencesWidgetState {
10
+ scopeTabBarState: PreferencesScopeTabBarState;
11
+ editorState: PreferencesEditorState;
12
+ searchbarWidgetState: PreferencesSearchbarState;
13
+ }
14
+ export declare class PreferencesWidget extends Panel implements StatefulWidget {
15
+ /**
16
+ * The widget `id`.
17
+ */
18
+ static readonly ID = "settings_widget";
19
+ /**
20
+ * The widget `label` which is used for display purposes.
21
+ */
22
+ static readonly LABEL: string;
23
+ protected readonly editorWidget: PreferencesEditorWidget;
24
+ protected readonly treeWidget: PreferencesTreeWidget;
25
+ protected readonly searchbarWidget: PreferencesSearchbarWidget;
26
+ protected readonly tabBarWidget: PreferencesScopeTabBar;
27
+ get currentScope(): Preference.SelectedScopeDetails;
28
+ setSearchTerm(query: string): Promise<void>;
29
+ setScope(scope: PreferenceScope.User | PreferenceScope.Workspace | URI): void;
30
+ protected onResize(msg: Widget.ResizeMessage): void;
31
+ protected onActivateRequest(msg: Message): void;
32
+ protected init(): void;
33
+ getPreviewNode(): Node | undefined;
34
+ storeState(): PreferencesWidgetState;
35
+ restoreState(state: PreferencesWidgetState): void;
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=preference-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/views/preference-widget.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAW,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EA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C,KAAK,EAAE,sBAAsB,GAAG,IAAI;CAKpD"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 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
+ var PreferencesWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PreferencesWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const browser_1 = require("@theia/core/lib/browser");
23
+ const preference_editor_widget_1 = require("./preference-editor-widget");
24
+ const preference_tree_widget_1 = require("./preference-tree-widget");
25
+ const preference_searchbar_widget_1 = require("./preference-searchbar-widget");
26
+ const preference_scope_tabbar_widget_1 = require("./preference-scope-tabbar-widget");
27
+ const nls_1 = require("@theia/core/lib/common/nls");
28
+ let PreferencesWidget = PreferencesWidget_1 = class PreferencesWidget extends browser_1.Panel {
29
+ get currentScope() {
30
+ return this.tabBarWidget.currentScope;
31
+ }
32
+ setSearchTerm(query) {
33
+ return this.searchbarWidget.updateSearchTerm(query);
34
+ }
35
+ setScope(scope) {
36
+ this.tabBarWidget.setScope(scope);
37
+ }
38
+ onResize(msg) {
39
+ super.onResize(msg);
40
+ if (msg.width < 600 && this.treeWidget && !this.treeWidget.isHidden) {
41
+ this.treeWidget.hide();
42
+ this.editorWidget.addClass('full-pane');
43
+ }
44
+ else if (msg.width >= 600 && this.treeWidget && this.treeWidget.isHidden) {
45
+ this.treeWidget.show();
46
+ this.editorWidget.removeClass('full-pane');
47
+ }
48
+ }
49
+ onActivateRequest(msg) {
50
+ super.onActivateRequest(msg);
51
+ this.searchbarWidget.focus();
52
+ }
53
+ init() {
54
+ this.id = PreferencesWidget_1.ID;
55
+ this.title.label = PreferencesWidget_1.LABEL;
56
+ this.title.caption = PreferencesWidget_1.LABEL;
57
+ this.title.closable = true;
58
+ this.addClass('theia-settings-container');
59
+ this.title.iconClass = (0, browser_1.codicon)('settings');
60
+ this.searchbarWidget.addClass('preferences-searchbar-widget');
61
+ this.addWidget(this.searchbarWidget);
62
+ this.tabBarWidget.addClass('preferences-tabbar-widget');
63
+ this.addWidget(this.tabBarWidget);
64
+ this.treeWidget.addClass('preferences-tree-widget');
65
+ this.addWidget(this.treeWidget);
66
+ this.editorWidget.addClass('preferences-editor-widget');
67
+ this.addWidget(this.editorWidget);
68
+ this.update();
69
+ }
70
+ getPreviewNode() {
71
+ return this.node;
72
+ }
73
+ storeState() {
74
+ return {
75
+ scopeTabBarState: this.tabBarWidget.storeState(),
76
+ editorState: this.editorWidget.storeState(),
77
+ searchbarWidgetState: this.searchbarWidget.storeState(),
78
+ };
79
+ }
80
+ restoreState(state) {
81
+ this.tabBarWidget.restoreState(state.scopeTabBarState);
82
+ this.editorWidget.restoreState(state.editorState);
83
+ this.searchbarWidget.restoreState(state.searchbarWidgetState);
84
+ }
85
+ };
86
+ exports.PreferencesWidget = PreferencesWidget;
87
+ /**
88
+ * The widget `id`.
89
+ */
90
+ PreferencesWidget.ID = 'settings_widget';
91
+ /**
92
+ * The widget `label` which is used for display purposes.
93
+ */
94
+ PreferencesWidget.LABEL = nls_1.nls.localizeByDefault('Settings');
95
+ tslib_1.__decorate([
96
+ (0, inversify_1.inject)(preference_editor_widget_1.PreferencesEditorWidget),
97
+ tslib_1.__metadata("design:type", preference_editor_widget_1.PreferencesEditorWidget)
98
+ ], PreferencesWidget.prototype, "editorWidget", void 0);
99
+ tslib_1.__decorate([
100
+ (0, inversify_1.inject)(preference_tree_widget_1.PreferencesTreeWidget),
101
+ tslib_1.__metadata("design:type", preference_tree_widget_1.PreferencesTreeWidget)
102
+ ], PreferencesWidget.prototype, "treeWidget", void 0);
103
+ tslib_1.__decorate([
104
+ (0, inversify_1.inject)(preference_searchbar_widget_1.PreferencesSearchbarWidget),
105
+ tslib_1.__metadata("design:type", preference_searchbar_widget_1.PreferencesSearchbarWidget)
106
+ ], PreferencesWidget.prototype, "searchbarWidget", void 0);
107
+ tslib_1.__decorate([
108
+ (0, inversify_1.inject)(preference_scope_tabbar_widget_1.PreferencesScopeTabBar),
109
+ tslib_1.__metadata("design:type", preference_scope_tabbar_widget_1.PreferencesScopeTabBar)
110
+ ], PreferencesWidget.prototype, "tabBarWidget", void 0);
111
+ tslib_1.__decorate([
112
+ (0, inversify_1.postConstruct)(),
113
+ tslib_1.__metadata("design:type", Function),
114
+ tslib_1.__metadata("design:paramtypes", []),
115
+ tslib_1.__metadata("design:returntype", void 0)
116
+ ], PreferencesWidget.prototype, "init", null);
117
+ exports.PreferencesWidget = PreferencesWidget = PreferencesWidget_1 = tslib_1.__decorate([
118
+ (0, inversify_1.injectable)()
119
+ ], PreferencesWidget);
120
+ //# sourceMappingURL=preference-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-widget.js","sourceRoot":"","sources":["../../../src/browser/views/preference-widget.tsx"],"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,4DAAiF;AACjF,qDAA0F;AAC1F,yEAA6F;AAC7F,qEAAiE;AACjE,+EAAsG;AACtG,qFAAuG;AAGvG,oDAAiD;AAU1C,IAAM,iBAAiB,yBAAvB,MAAM,i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C,CAAC;IAClE,CAAC;;AAnFQ,8CAAiB;AAC1B;;GAEG;AACa,oBAAE,GAAG,iBAAiB,AAApB,CAAqB;AACvC;;GAEG;AACa,uBAAK,GAAG,SAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,AAApC,CAAqC;AAEN;IAAnD,IAAA,kBAAM,EAAC,kDAAuB,CAAC;sCAAkC,kDAAuB;uDAAC;AACxC;IAAjD,IAAA,kBAAM,EAAC,8CAAqB,CAAC;sCAAgC,8CAAqB;qDAAC;AAC7B;IAAtD,IAAA,kBAAM,EAAC,wDAA0B,CAAC;sCAAqC,wDAA0B;0DAAC;AAChD;IAAlD,IAAA,kBAAM,EAAC,uDAAsB,CAAC;sCAAkC,uDAAsB;uDAAC;AA+B9E;IADT,IAAA,yBAAa,GAAE;;;;6CAsBf;4BAjEQ,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CAoF7B"}
@@ -0,0 +1,24 @@
1
+ import URI from '@theia/core/lib/common/uri';
2
+ import { PreferenceScope } from '@theia/core/lib/common/preferences';
3
+ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
4
+ import { AbstractResourcePreferenceProvider } from '../common/abstract-resource-preference-provider';
5
+ export declare class WorkspaceFilePreferenceProviderOptions {
6
+ workspaceUri: URI;
7
+ }
8
+ export declare const WorkspaceFilePreferenceProviderFactory: unique symbol;
9
+ export type WorkspaceFilePreferenceProviderFactory = (options: WorkspaceFilePreferenceProviderOptions) => WorkspaceFilePreferenceProvider;
10
+ export declare class WorkspaceFilePreferenceProvider extends AbstractResourcePreferenceProvider {
11
+ protected readonly workspaceService: WorkspaceService;
12
+ protected readonly options: WorkspaceFilePreferenceProviderOptions;
13
+ protected sectionsInsideSettings: Set<string>;
14
+ protected getUri(): URI;
15
+ protected parse(content: string): any;
16
+ protected getPath(preferenceName: string): string[];
17
+ /**
18
+ * @returns `true` if `firstSegment` is a section name (e.g. `tasks`, `launch`)
19
+ */
20
+ protected belongsInSection(firstSegment: string, remainder: string): boolean;
21
+ getScope(): PreferenceScope;
22
+ getDomain(): string[];
23
+ }
24
+ //# sourceMappingURL=workspace-file-preference-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-file-preference-provider.d.ts","sourceRoot":"","sources":["../../src/browser/workspace-file-preference-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AAErG,qBACa,sCAAsC;IAC/C,YAAY,EAAE,GAAG,CAAC;CACrB;AAED,eAAO,MAAM,sCAAsC,eAAmD,CAAC;AACvG,MAAM,MAAM,sCAAsC,GAAG,CAAC,OAAO,EAAE,sCAAsC,KAAK,+BAA+B,CAAC;AAE1I,qBACa,+BAAgC,SAAQ,kCAAkC;IAGnF,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,sCAAsC,CAAC;IAEnE,SAAS,CAAC,sBAAsB,cAAqB;IAErD,SAAS,CAAC,MAAM,IAAI,GAAG;cAKJ,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG;cAoB3B,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE;IAkB5D;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAI5E,QAAQ,IAAI,eAAe;IAIlB,SAAS,IAAI,MAAM,EAAE;CAIjC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 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.WorkspaceFilePreferenceProvider = exports.WorkspaceFilePreferenceProviderFactory = exports.WorkspaceFilePreferenceProviderOptions = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const preferences_1 = require("@theia/core/lib/common/preferences");
22
+ const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
23
+ const abstract_resource_preference_provider_1 = require("../common/abstract-resource-preference-provider");
24
+ let WorkspaceFilePreferenceProviderOptions = class WorkspaceFilePreferenceProviderOptions {
25
+ };
26
+ exports.WorkspaceFilePreferenceProviderOptions = WorkspaceFilePreferenceProviderOptions;
27
+ exports.WorkspaceFilePreferenceProviderOptions = WorkspaceFilePreferenceProviderOptions = tslib_1.__decorate([
28
+ (0, inversify_1.injectable)()
29
+ ], WorkspaceFilePreferenceProviderOptions);
30
+ exports.WorkspaceFilePreferenceProviderFactory = Symbol('WorkspaceFilePreferenceProviderFactory');
31
+ let WorkspaceFilePreferenceProvider = class WorkspaceFilePreferenceProvider extends abstract_resource_preference_provider_1.AbstractResourcePreferenceProvider {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.sectionsInsideSettings = new Set();
35
+ }
36
+ getUri() {
37
+ return this.options.workspaceUri;
38
+ }
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ parse(content) {
41
+ const data = super.parse(content);
42
+ if (workspace_service_1.WorkspaceData.is(data)) {
43
+ const settings = { ...data.settings };
44
+ for (const key of this.configurations.getSectionNames().filter(name => name !== 'settings')) {
45
+ // If the user has written configuration inside the "settings" object, we will respect that.
46
+ if (settings[key]) {
47
+ this.sectionsInsideSettings.add(key);
48
+ }
49
+ // Favor sections outside the "settings" object to agree with VSCode behavior
50
+ if (data[key]) {
51
+ settings[key] = data[key];
52
+ this.sectionsInsideSettings.delete(key);
53
+ }
54
+ }
55
+ return settings;
56
+ }
57
+ return {};
58
+ }
59
+ getPath(preferenceName) {
60
+ var _a;
61
+ const firstSegment = preferenceName.split('.', 1)[0];
62
+ const remainder = preferenceName.slice(firstSegment.length + 1);
63
+ if (this.belongsInSection(firstSegment, remainder)) {
64
+ // Default to writing sections outside the "settings" object.
65
+ const path = [firstSegment];
66
+ if (remainder) {
67
+ path.push(remainder);
68
+ }
69
+ // If the user has already written this section inside the "settings" object, modify it there.
70
+ if (this.sectionsInsideSettings.has(firstSegment)) {
71
+ path.unshift('settings');
72
+ }
73
+ return path;
74
+ }
75
+ return ['settings'].concat((_a = super.getPath(preferenceName)) !== null && _a !== void 0 ? _a : []);
76
+ }
77
+ /**
78
+ * @returns `true` if `firstSegment` is a section name (e.g. `tasks`, `launch`)
79
+ */
80
+ belongsInSection(firstSegment, remainder) {
81
+ return this.configurations.isSectionName(firstSegment);
82
+ }
83
+ getScope() {
84
+ return preferences_1.PreferenceScope.Workspace;
85
+ }
86
+ getDomain() {
87
+ // workspace file is treated as part of the workspace
88
+ return this.workspaceService.tryGetRoots().map(r => r.resource.toString()).concat([this.options.workspaceUri.toString()]);
89
+ }
90
+ };
91
+ exports.WorkspaceFilePreferenceProvider = WorkspaceFilePreferenceProvider;
92
+ tslib_1.__decorate([
93
+ (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
94
+ tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
95
+ ], WorkspaceFilePreferenceProvider.prototype, "workspaceService", void 0);
96
+ tslib_1.__decorate([
97
+ (0, inversify_1.inject)(WorkspaceFilePreferenceProviderOptions),
98
+ tslib_1.__metadata("design:type", WorkspaceFilePreferenceProviderOptions)
99
+ ], WorkspaceFilePreferenceProvider.prototype, "options", void 0);
100
+ exports.WorkspaceFilePreferenceProvider = WorkspaceFilePreferenceProvider = tslib_1.__decorate([
101
+ (0, inversify_1.injectable)()
102
+ ], WorkspaceFilePreferenceProvider);
103
+ //# sourceMappingURL=workspace-file-preference-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-file-preference-provider.js","sourceRoot":"","sources":["../../src/browser/workspace-file-preference-provider.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,oEAAqE;AACrE,sFAAiG;AACjG,2GAAqG;AAG9F,IAAM,sCAAsC,GAA5C,MAAM,sCAAsC;CAElD,CAAA;AAFY,wFAAsC;iDAAtC,sCAAsC;IADlD,IAAA,sBAAU,GAAE;GACA,sCAAsC,CAElD;AAEY,QAAA,sCAAsC,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAIhG,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,0EAAkC;IAAhF;;QAQO,2BAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;IA4DzD,CAAC;IA1Da,MAAM;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;IACrC,CAAC;IAED,8DAA8D;IAC3C,KAAK,CAAC,OAAe;QACpC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,iCAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAA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AO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,mCAAI,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACO,gBAAgB,CAAC,YAAoB,EAAE,SAAiB;QAC9D,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC3D,CAAC;IAED,QAAQ;QACJ,OAAO,6BAAe,CAAC,SAAS,CAAC;IACrC,CAAC;IAEQ,SAAS;QACd,qDAAqD;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC9H,CAAC;CACJ,CAAA;AApEY,0EAA+B;AAGrB;IADlB,IAAA,kBAAM,EAAC,oCAAgB,CAAC;sCACY,oCAAgB;yEAAC;AAGnC;IADlB,IAAA,kBAAM,EAAC,sCAAsC,CAAC;sCACnB,sCAAsC;gEAAC;0CAN1D,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAoE3C"}
@@ -0,0 +1,36 @@
1
+ import URI from '@theia/core/lib/common/uri';
2
+ import { DisposableCollection } from '@theia/core/lib/common/disposable';
3
+ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
4
+ import { WorkspaceFilePreferenceProviderFactory } from './workspace-file-preference-provider';
5
+ import { Deferred } from '@theia/core/lib/common/promise-util';
6
+ import { Emitter, Event, PreferenceProvider, PreferenceProviderDataChanges, PreferenceProviderProvider, PreferenceScope } from '@theia/core';
7
+ import { JSONObject } from '@theia/core/shared/@lumino/coreutils';
8
+ export declare class WorkspacePreferenceProvider implements PreferenceProvider {
9
+ protected readonly workspaceService: WorkspaceService;
10
+ protected readonly workspaceFileProviderFactory: WorkspaceFilePreferenceProviderFactory;
11
+ protected readonly preferenceProviderProvider: PreferenceProviderProvider;
12
+ protected readonly onDidPreferencesChangedEmitter: Emitter<PreferenceProviderDataChanges>;
13
+ readonly onDidPreferencesChanged: Event<PreferenceProviderDataChanges>;
14
+ protected readonly toDisposeOnEnsureDelegateUpToDate: DisposableCollection;
15
+ protected _ready: Deferred<void>;
16
+ readonly ready: Promise<void>;
17
+ protected readonly disposables: DisposableCollection;
18
+ protected init(): void;
19
+ dispose(): void;
20
+ canHandleScope(scope: PreferenceScope): boolean;
21
+ getConfigUri(resourceUri?: string | undefined, sectionName?: string): URI | undefined;
22
+ getContainingConfigUri(resourceUri?: string | undefined, sectionName?: string): URI | undefined;
23
+ protected _delegate: PreferenceProvider | undefined;
24
+ protected get delegate(): PreferenceProvider | undefined;
25
+ protected ensureDelegateUpToDate(): void;
26
+ protected createDelegate(): PreferenceProvider | undefined;
27
+ get<T>(preferenceName: string, resourceUri?: string | undefined): T | undefined;
28
+ resolve<T>(preferenceName: string, resourceUri?: string | undefined): {
29
+ value?: T;
30
+ configUri?: URI;
31
+ };
32
+ setPreference(preferenceName: string, value: any, resourceUri?: string | undefined): Promise<boolean>;
33
+ getPreferences(resourceUri?: string | undefined): JSONObject;
34
+ protected ensureResourceUri(): string | undefined;
35
+ }
36
+ //# sourceMappingURL=workspace-preference-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-preference-provider.d.ts","sourceRoot":"","sources":["../../src/browser/workspace-preference-provider.ts"],"names":[],"mappings":"AAmBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,sCAAsC,EAAmC,MAAM,sCAAsC,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OA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