-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdi.config.ts
More file actions
44 lines (40 loc) · 1.56 KB
/
Copy pathdi.config.ts
File metadata and controls
44 lines (40 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/********************************************************************************
* Copyright (c) 2022-2023 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
* https://www.eclipse.org/legal/epl-2.0, or the MIT License which is
* available at https://opensource.org/licenses/MIT.
*
* SPDX-License-Identifier: EPL-2.0 OR MIT
********************************************************************************/
import {
configureDefaultModelElements,
ConsoleLogger,
ContainerConfiguration,
initializeDiagramContainer,
LogLevel,
overrideViewerOptions,
TYPES
} from '@eclipse-glsp/client';
import { Container, ContainerModule } from '@theia/core/shared/inversify';
import '../css/diagram.css';
const tasklistDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
const context = { bind, unbind, isBound, rebind };
configureDefaultModelElements(context);
});
export default function initializeTaskListDiagramContainer(
container: Container,
widgetId: string,
...containerConfiguration: ContainerConfiguration
): Container {
initializeDiagramContainer(container, tasklistDiagramModule, ...containerConfiguration);
overrideViewerOptions(container, {
baseDiv: widgetId,
hiddenDiv: widgetId + '_hidden',
needsClientLayout: true
});
return container;
}