UNPKG

2.27 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2024 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// *****************************************************************************
17Object.defineProperty(exports, "__esModule", { value: true });
18exports.bindTreePreferences = exports.TreePreferences = exports.TreeConfiguration = exports.treePreferencesSchema = exports.PREFERENCE_NAME_TREE_INDENT = void 0;
19const preferences_1 = require("../preferences");
20const injectable_preference_proxy_1 = require("../preferences/injectable-preference-proxy");
21const nls_1 = require("../../common/nls");
22exports.PREFERENCE_NAME_TREE_INDENT = 'workbench.tree.indent';
23exports.treePreferencesSchema = {
24 type: 'object',
25 properties: {
26 [exports.PREFERENCE_NAME_TREE_INDENT]: {
27 description: nls_1.nls.localizeByDefault('Controls tree indentation in pixels.'),
28 type: 'number',
29 default: 8,
30 minimum: 4,
31 maximum: 40
32 },
33 }
34};
35class TreeConfiguration {
36}
37exports.TreeConfiguration = TreeConfiguration;
38exports.TreePreferences = Symbol('treePreferences');
39function bindTreePreferences(bind) {
40 bind(exports.TreePreferences).toDynamicValue(ctx => {
41 const factory = ctx.container.get(injectable_preference_proxy_1.PreferenceProxyFactory);
42 return factory(exports.treePreferencesSchema);
43 }).inSingletonScope();
44 bind(preferences_1.PreferenceContribution).toConstantValue({ schema: exports.treePreferencesSchema });
45}
46exports.bindTreePreferences = bindTreePreferences;
47//# sourceMappingURL=tree-preference.js.map
\No newline at end of file