@kieler/klighd-core
Version:
Core KLighD diagram visualization with Sprotty
46 lines • 2.52 kB
JavaScript
;
/*
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
* Copyright 2021 by
* + Kiel University
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.optionsModule = void 0;
const inversify_1 = require("inversify");
const sprotty_1 = require("sprotty");
const di_symbols_1 = require("../di.symbols");
const actions_1 = require("./actions");
const options_panel_1 = require("./options-panel");
const options_registry_1 = require("./options-registry");
const options_renderer_1 = require("./options-renderer");
const general_panel_1 = require("./general-panel");
const render_options_registry_1 = require("./render-options-registry");
const options_persistence_1 = require("./options-persistence");
/** Module that configures option related panels and registries. */
exports.optionsModule = new inversify_1.ContainerModule((bind, _, isBound) => {
bind(options_panel_1.OptionsPanel).toSelf().inSingletonScope();
bind(di_symbols_1.DISymbol.SidebarPanel).toService(options_panel_1.OptionsPanel);
bind(general_panel_1.GeneralPanel).toSelf().inSingletonScope();
bind(di_symbols_1.DISymbol.SidebarPanel).toService(general_panel_1.GeneralPanel);
bind(di_symbols_1.DISymbol.OptionsRenderer).to(options_renderer_1.OptionsRenderer);
bind(di_symbols_1.DISymbol.OptionsRegistry).to(options_registry_1.OptionsRegistry).inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(di_symbols_1.DISymbol.OptionsRegistry);
bind(di_symbols_1.DISymbol.RenderOptionsRegistry).to(render_options_registry_1.RenderOptionsRegistry).inSingletonScope();
bind(options_persistence_1.OptionsPersistence).toSelf().inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(options_persistence_1.OptionsPersistence);
const ctx = { bind, isBound };
(0, sprotty_1.configureActionHandler)(ctx, actions_1.SetRenderOptionAction.KIND, di_symbols_1.DISymbol.RenderOptionsRegistry);
(0, sprotty_1.configureActionHandler)(ctx, actions_1.ResetRenderOptionsAction.KIND, di_symbols_1.DISymbol.RenderOptionsRegistry);
});
//# sourceMappingURL=options-module.js.map