@kieler/klighd-core
Version:
Core KLighD diagram visualization with Sprotty
46 lines • 2.51 kB
JavaScript
;
/*
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
* Copyright 2022 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.proxyViewModule = void 0;
const inversify_1 = require("inversify");
const sprotty_1 = require("sprotty");
const di_symbols_1 = require("../di.symbols");
const proxy_view_filters_1 = require("./filters/proxy-view-filters");
const proxy_view_semantic_filters_1 = require("./filters/proxy-view-semantic-filters");
const proxy_view_1 = require("./proxy-view");
const proxy_view_actions_1 = require("./proxy-view-actions");
const proxy_view_util_1 = require("./proxy-view-util");
exports.proxyViewModule = new inversify_1.ContainerModule((bind) => {
// Make sure the selection handler is registered before the proxy view,
// as that one depends on it.
bind(proxy_view_util_1.SelectedElementsUtilActionHandler).toSelf().inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(proxy_view_util_1.SelectedElementsUtilActionHandler);
// The class needs to be bound to itself and
// we have to let Sprotty know our service is a UIExtension
// Using a symbol for binding helps mitigate other problems
bind(di_symbols_1.DISymbol.ProxyView).to(proxy_view_1.ProxyView).inSingletonScope();
bind(sprotty_1.TYPES.IUIExtension).toService(di_symbols_1.DISymbol.ProxyView);
bind(proxy_view_actions_1.ProxyViewActionHandler).toSelf().inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(proxy_view_actions_1.ProxyViewActionHandler);
bind(sprotty_1.TYPES.MouseListener).toService(proxy_view_actions_1.ProxyViewActionHandler);
bind(proxy_view_filters_1.ProxyFilterHandler).toSelf().inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(proxy_view_filters_1.ProxyFilterHandler);
bind(proxy_view_semantic_filters_1.ProxySemanticFilterHandler).toSelf().inSingletonScope();
bind(sprotty_1.TYPES.IActionHandlerInitializer).toService(proxy_view_semantic_filters_1.ProxySemanticFilterHandler);
});
//# sourceMappingURL=proxy-view-module.js.map