@eclipse-glsp/client
Version:
A sprotty-based client for GLSP
49 lines • 3.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.boundsModule = void 0;
/********************************************************************************
* Copyright (c) 2022-2024 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
const sprotty_1 = require("@eclipse-glsp/sprotty");
const move_element_action_1 = require("../change-bounds/move-element-action");
const move_element_handler_1 = require("../change-bounds/move-element-handler");
const position_snapper_1 = require("../change-bounds/position-snapper");
const freeform_layout_1 = require("./freeform-layout");
const glsp_hidden_bounds_updater_1 = require("./glsp-hidden-bounds-updater");
const hbox_layout_1 = require("./hbox-layout");
const layouter_1 = require("./layouter");
const local_bounds_1 = require("./local-bounds");
const set_bounds_feedback_command_1 = require("./set-bounds-feedback-command");
const vbox_layout_1 = require("./vbox-layout");
exports.boundsModule = new sprotty_1.FeatureModule((bind, _unbind, isBound, _rebind) => {
const context = { bind, isBound };
(0, sprotty_1.configureCommand)(context, sprotty_1.SetBoundsCommand);
(0, sprotty_1.configureCommand)(context, sprotty_1.RequestBoundsCommand);
bind(sprotty_1.HiddenBoundsUpdater).toSelf().inSingletonScope();
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.HiddenVNodePostprocessor, glsp_hidden_bounds_updater_1.GLSPHiddenBoundsUpdater);
(0, sprotty_1.configureCommand)(context, local_bounds_1.LocalComputedBoundsCommand);
(0, sprotty_1.configureCommand)(context, set_bounds_feedback_command_1.SetBoundsFeedbackCommand);
bind(sprotty_1.TYPES.Layouter).to(layouter_1.LayouterExt).inSingletonScope();
bind(sprotty_1.TYPES.LayoutRegistry).to(sprotty_1.LayoutRegistry).inSingletonScope();
(0, sprotty_1.configureLayout)(context, sprotty_1.VBoxLayouter.KIND, vbox_layout_1.VBoxLayouterExt);
(0, sprotty_1.configureLayout)(context, sprotty_1.HBoxLayouter.KIND, hbox_layout_1.HBoxLayouterExt);
(0, sprotty_1.configureLayout)(context, freeform_layout_1.FreeFormLayouter.KIND, freeform_layout_1.FreeFormLayouter);
bind(move_element_handler_1.MoveElementHandler).toSelf().inSingletonScope();
(0, sprotty_1.configureActionHandler)(context, move_element_action_1.MoveElementRelativeAction.KIND, move_element_handler_1.MoveElementHandler);
// backwards compatibility
// eslint-disable-next-line deprecation/deprecation
bind(position_snapper_1.PositionSnapper).toSelf();
}, { featureId: Symbol('bounds') });
//# sourceMappingURL=bounds-module.js.map