@eclipse-glsp-examples/workflow-server 0.9.0-next.5ce3b9a.1 → 0.9.0-next.66aad6e.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.d.ts.map +1 -1
- package/lib/app.js +4 -1
- package/lib/app.js.map +1 -1
- package/lib/layout/workflow-layout-configurator.d.ts +22 -0
- package/lib/layout/workflow-layout-configurator.d.ts.map +1 -0
- package/lib/layout/workflow-layout-configurator.js +38 -0
- package/lib/layout/workflow-layout-configurator.js.map +1 -0
- package/lib/workflow-diagram-module.d.ts +1 -2
- package/lib/workflow-diagram-module.d.ts.map +1 -1
- package/lib/workflow-diagram-module.js +1 -2
- package/lib/workflow-diagram-module.js.map +1 -1
- package/package.json +4 -6
- package/src/app.ts +4 -1
- package/src/layout/workflow-layout-configurator.ts +28 -0
- package/src/workflow-diagram-module.ts +2 -2
package/lib/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAqBA,wBAAgB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAa5C"}
|
package/lib/app.js
CHANGED
|
@@ -16,8 +16,10 @@ exports.launch = void 0;
|
|
|
16
16
|
*
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
|
+
const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
19
20
|
const server_node_1 = require("@eclipse-glsp/server-node");
|
|
20
21
|
const inversify_1 = require("inversify");
|
|
22
|
+
const workflow_layout_configurator_1 = require("./layout/workflow-layout-configurator");
|
|
21
23
|
const workflow_diagram_module_1 = require("./workflow-diagram-module");
|
|
22
24
|
function launch(argv) {
|
|
23
25
|
const options = server_node_1.createSocketCliParser().parse(argv);
|
|
@@ -25,7 +27,8 @@ function launch(argv) {
|
|
|
25
27
|
appContainer.load(server_node_1.createAppModule(options));
|
|
26
28
|
const logger = appContainer.get(server_node_1.LoggerFactory)('WorkflowServerApp');
|
|
27
29
|
const launcher = appContainer.resolve(server_node_1.SocketServerLauncher);
|
|
28
|
-
const
|
|
30
|
+
const elkLayoutModule = layout_elk_1.configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
|
|
31
|
+
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(), elkLayoutModule);
|
|
29
32
|
const errorHandler = (error) => logger.error('Error in workflow server launcher:', error);
|
|
30
33
|
launcher.configure(serverModule);
|
|
31
34
|
server_node_1.resolveAndCatch(() => launcher.start({ port: options.port, host: options.host }), errorHandler);
|
package/lib/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2DAAyI;AACzI,yCAAsC;AACtC,uEAAwF;AAExF,SAAgB,MAAM,CAAC,IAAe;IAClC,MAAM,OAAO,GAAG,mCAAqB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,6BAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAgB,2BAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACnF,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,kCAAoB,CAAC,CAAC;IAC5D,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAAC,IAAI,+CAAqB,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yDAAoE;AACpE,2DAAyI;AACzI,yCAAsC;AACtC,wFAAmF;AACnF,uEAAwF;AAExF,SAAgB,MAAM,CAAC,IAAe;IAClC,MAAM,OAAO,GAAG,mCAAqB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,6BAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAgB,2BAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACnF,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,kCAAoB,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,qCAAwB,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;IAC9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAAC,IAAI,+CAAqB,EAAE,EAAE,eAAe,CAAC,CAAC;IAErH,MAAM,YAAY,GAAG,CAAC,KAAU,EAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;IACrG,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACjC,6BAAe,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;AACpG,CAAC;AAbD,wBAaC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { GlspLayoutConfigurator, SModelIndex } from '@eclipse-glsp/layout-elk';
|
|
17
|
+
import { GGraph } from '@eclipse-glsp/server-node';
|
|
18
|
+
import { LayoutOptions } from 'elkjs';
|
|
19
|
+
export declare class WorkflowLayoutConfigurator extends GlspLayoutConfigurator {
|
|
20
|
+
protected graphOptions(sgraph: GGraph, index: SModelIndex): LayoutOptions | undefined;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=workflow-layout-configurator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-layout-configurator.d.ts","sourceRoot":"","sources":["../../src/layout/workflow-layout-configurator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,qBACa,0BAA2B,SAAQ,sBAAsB;IAClE,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS;CAKxF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WorkflowLayoutConfigurator = void 0;
|
|
10
|
+
/********************************************************************************
|
|
11
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
12
|
+
*
|
|
13
|
+
* This program and the accompanying materials are made available under the
|
|
14
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
15
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
16
|
+
*
|
|
17
|
+
* This Source Code may also be made available under the following Secondary
|
|
18
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
19
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
20
|
+
* with the GNU Classpath Exception which is available at
|
|
21
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
22
|
+
*
|
|
23
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
|
+
********************************************************************************/
|
|
25
|
+
const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
let WorkflowLayoutConfigurator = class WorkflowLayoutConfigurator extends layout_elk_1.GlspLayoutConfigurator {
|
|
28
|
+
graphOptions(sgraph, index) {
|
|
29
|
+
return {
|
|
30
|
+
'elk.algorithm': 'layered'
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
WorkflowLayoutConfigurator = __decorate([
|
|
35
|
+
inversify_1.injectable()
|
|
36
|
+
], WorkflowLayoutConfigurator);
|
|
37
|
+
exports.WorkflowLayoutConfigurator = WorkflowLayoutConfigurator;
|
|
38
|
+
//# sourceMappingURL=workflow-layout-configurator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-layout-configurator.js","sourceRoot":"","sources":["../../src/layout/workflow-layout-configurator.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yDAA+E;AAG/E,yCAAuC;AAGvC,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,mCAAsB;IACxD,YAAY,CAAC,MAAc,EAAE,KAAkB;QACrD,OAAO;YACH,eAAe,EAAE,SAAS;SAC7B,CAAC;IACN,CAAC;CACJ,CAAA;AANY,0BAA0B;IADtC,sBAAU,EAAE;GACA,0BAA0B,CAMtC;AANY,gEAA0B"}
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { ClassMultiBinding, GModelDiagramModule, InstanceMultiBinding, OperationHandlerConstructor, ServerModule } from '@eclipse-glsp/server-node';
|
|
17
|
-
import { NavigationTargetProvider } from '@eclipse-glsp/server-node/lib/features/navigation/navigation-target-provider';
|
|
16
|
+
import { ClassMultiBinding, GModelDiagramModule, InstanceMultiBinding, NavigationTargetProvider, OperationHandlerConstructor, ServerModule } from '@eclipse-glsp/server-node';
|
|
18
17
|
import { interfaces } from 'inversify';
|
|
19
18
|
export declare class WorkflowServerModule extends ServerModule {
|
|
20
19
|
configure(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,iBAAiB,EAMjB,mBAAmB,EAEnB,oBAAoB,EAIpB,2BAA2B,EAE3B,YAAY,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,iBAAiB,EAMjB,mBAAmB,EAEnB,oBAAoB,EAIpB,wBAAwB,EAExB,2BAA2B,EAE3B,YAAY,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAc,UAAU,EAAE,MAAM,WAAW,CAAC;AAuBnD,qBACa,oBAAqB,SAAQ,YAAY;IAClD,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI;CAM5H;AAED,qBACa,qBAAsB,SAAQ,mBAAmB;IAC1D,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI;IAanI,SAAS,CAAC,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAatG,SAAS,CAAC,kCAAkC,CAAC,OAAO,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,IAAI;CAM3G"}
|
|
@@ -23,7 +23,6 @@ exports.WorkflowDiagramModule = exports.WorkflowServerModule = void 0;
|
|
|
23
23
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
24
|
********************************************************************************/
|
|
25
25
|
const server_node_1 = require("@eclipse-glsp/server-node");
|
|
26
|
-
const navigation_target_resolver_1 = require("@eclipse-glsp/server-node/lib/features/navigation/navigation-target-resolver");
|
|
27
26
|
const inversify_1 = require("inversify");
|
|
28
27
|
const create_automated_task_handler_1 = require("./handler/create-automated-task-handler");
|
|
29
28
|
const create_category_handler_1 = require("./handler/create-category-handler");
|
|
@@ -65,7 +64,7 @@ let WorkflowDiagramModule = class WorkflowDiagramModule extends server_node_1.GM
|
|
|
65
64
|
configure(bind, unbind, isBound, rebind) {
|
|
66
65
|
super.configure(bind, unbind, isBound, rebind);
|
|
67
66
|
bind(server_node_1.DiagramConfiguration).to(workflow_diagram_configuration_1.WorkflowDiagramConfiguration).inSingletonScope();
|
|
68
|
-
bind(
|
|
67
|
+
bind(server_node_1.NavigationTargetResolver).to(workflow_navigation_target_resolver_1.WorkflowNavigationTargetResolver).inSingletonScope();
|
|
69
68
|
bind(server_node_1.ContextMenuItemProvider).to(workflow_context_menu_item_provider_1.WorkflowContextMenuItemProvider).inSingletonScope();
|
|
70
69
|
bind(server_node_1.CommandPaletteActionProvider).to(workflow_command_palette_action_provider_1.WorkflowCommandPaletteActionProvider).inSingletonScope();
|
|
71
70
|
bind(server_node_1.LabelEditValidator).to(workflow_label_edit_validator_1.WorkflowLabelEditValidator).inSingletonScope();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;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C;QACvC,OAAO,CAAC,GAAG,CAAC,+CAAqB,CAAC,CAAC;IACvC,CAAC;IAES,kCAAkC,CAAC,OAAoD;QAC7F,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,uEAAgC,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,+EAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,yFAAyC,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AArCY,qBAAqB;IADjC,sBAAU,EAAE;GACA,qBAAqB,CAqCjC;AArCY,sDAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server",
|
|
3
|
-
"version": "0.9.0-next.
|
|
3
|
+
"version": "0.9.0-next.66aad6e.3+66aad6e",
|
|
4
4
|
"description": "GLSP node server for the workflow example",
|
|
5
5
|
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
6
6
|
"keywords": [
|
|
@@ -37,12 +37,10 @@
|
|
|
37
37
|
"src"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eclipse-glsp/
|
|
40
|
+
"@eclipse-glsp/layout-elk": "0.9.0-next.66aad6e.3+66aad6e",
|
|
41
|
+
"@eclipse-glsp/server-node": "0.9.0-next.66aad6e.3+66aad6e"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@types/node": "12.x",
|
|
44
|
-
"reflect-metadata": "^0.1.13",
|
|
45
|
-
"ts-node": "^10.4.0",
|
|
46
44
|
"typescript": "^3.9.2"
|
|
47
45
|
},
|
|
48
46
|
"scripts": {
|
|
@@ -59,5 +57,5 @@
|
|
|
59
57
|
},
|
|
60
58
|
"main": "lib/index",
|
|
61
59
|
"types": "lib/index",
|
|
62
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "66aad6e0e10892b1041522ac165d07f1d3220730"
|
|
63
61
|
}
|
package/src/app.ts
CHANGED
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
16
17
|
import { createAppModule, createSocketCliParser, LoggerFactory, resolveAndCatch, SocketServerLauncher } from '@eclipse-glsp/server-node';
|
|
17
18
|
import { Container } from 'inversify';
|
|
19
|
+
import { WorkflowLayoutConfigurator } from './layout/workflow-layout-configurator';
|
|
18
20
|
import { WorkflowDiagramModule, WorkflowServerModule } from './workflow-diagram-module';
|
|
19
21
|
|
|
20
22
|
export function launch(argv?: string[]): void {
|
|
@@ -24,7 +26,8 @@ export function launch(argv?: string[]): void {
|
|
|
24
26
|
|
|
25
27
|
const logger = appContainer.get<LoggerFactory>(LoggerFactory)('WorkflowServerApp');
|
|
26
28
|
const launcher = appContainer.resolve(SocketServerLauncher);
|
|
27
|
-
const
|
|
29
|
+
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
30
|
+
const serverModule = new WorkflowServerModule().configureDiagramModule(new WorkflowDiagramModule(), elkLayoutModule);
|
|
28
31
|
|
|
29
32
|
const errorHandler = (error: any): void => logger.error('Error in workflow server launcher:', error);
|
|
30
33
|
launcher.configure(serverModule);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { GlspLayoutConfigurator, SModelIndex } from '@eclipse-glsp/layout-elk';
|
|
17
|
+
import { GGraph } from '@eclipse-glsp/server-node';
|
|
18
|
+
import { LayoutOptions } from 'elkjs';
|
|
19
|
+
import { injectable } from 'inversify';
|
|
20
|
+
|
|
21
|
+
@injectable()
|
|
22
|
+
export class WorkflowLayoutConfigurator extends GlspLayoutConfigurator {
|
|
23
|
+
protected graphOptions(sgraph: GGraph, index: SModelIndex): LayoutOptions | undefined {
|
|
24
|
+
return {
|
|
25
|
+
'elk.algorithm': 'layered'
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
JsonRpcGLSPServer,
|
|
27
27
|
LabelEditValidator,
|
|
28
28
|
ModelValidator,
|
|
29
|
+
NavigationTargetProvider,
|
|
30
|
+
NavigationTargetResolver,
|
|
29
31
|
OperationHandlerConstructor,
|
|
30
32
|
PopupModelFactory,
|
|
31
33
|
ServerModule,
|
|
32
34
|
ToolPaletteItemProvider
|
|
33
35
|
} from '@eclipse-glsp/server-node';
|
|
34
|
-
import { NavigationTargetProvider } from '@eclipse-glsp/server-node/lib/features/navigation/navigation-target-provider';
|
|
35
|
-
import { NavigationTargetResolver } from '@eclipse-glsp/server-node/lib/features/navigation/navigation-target-resolver';
|
|
36
36
|
import { injectable, interfaces } from 'inversify';
|
|
37
37
|
import { CreateAutomatedTaskHandler } from './handler/create-automated-task-handler';
|
|
38
38
|
import { CreateCategoryHandler } from './handler/create-category-handler';
|