@eclipse-glsp-examples/workflow-glsp 2.3.0-next.322 → 2.3.0-next.366

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.
Files changed (43) hide show
  1. package/lib/direct-task-editing/direct-task-editor.d.ts +3 -3
  2. package/lib/direct-task-editing/direct-task-editor.d.ts.map +1 -1
  3. package/lib/direct-task-editing/direct-task-editor.js +2 -2
  4. package/lib/direct-task-editing/direct-task-editor.js.map +1 -1
  5. package/lib/direct-task-editing/{di.config.d.ts → task-editor-module.d.ts} +3 -3
  6. package/lib/direct-task-editing/task-editor-module.d.ts.map +1 -0
  7. package/lib/direct-task-editing/{di.config.js → task-editor-module.js} +5 -5
  8. package/lib/direct-task-editing/task-editor-module.js.map +1 -0
  9. package/lib/index.d.ts +4 -1
  10. package/lib/index.d.ts.map +1 -1
  11. package/lib/index.js +4 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/model.d.ts +7 -3
  14. package/lib/model.d.ts.map +1 -1
  15. package/lib/model.js +11 -4
  16. package/lib/model.js.map +1 -1
  17. package/lib/workflow-diagram-module.d.ts +3 -3
  18. package/lib/workflow-diagram-module.d.ts.map +1 -1
  19. package/lib/workflow-diagram-module.js +14 -17
  20. package/lib/workflow-diagram-module.js.map +1 -1
  21. package/lib/workflow-snapper.d.ts +20 -0
  22. package/lib/workflow-snapper.d.ts.map +1 -0
  23. package/lib/workflow-snapper.js +40 -0
  24. package/lib/workflow-snapper.js.map +1 -0
  25. package/lib/workflow-startup.d.ts +23 -0
  26. package/lib/workflow-startup.d.ts.map +1 -0
  27. package/lib/workflow-startup.js +48 -0
  28. package/lib/workflow-startup.js.map +1 -0
  29. package/lib/workflow-views.d.ts +3 -2
  30. package/lib/workflow-views.d.ts.map +1 -1
  31. package/lib/workflow-views.js +6 -7
  32. package/lib/workflow-views.js.map +1 -1
  33. package/package.json +5 -6
  34. package/src/direct-task-editing/direct-task-editor.ts +4 -4
  35. package/src/direct-task-editing/{di.config.ts → task-editor-module.ts} +7 -4
  36. package/src/index.ts +4 -1
  37. package/src/model.ts +18 -13
  38. package/src/workflow-diagram-module.ts +55 -44
  39. package/src/workflow-snapper.ts +29 -0
  40. package/src/workflow-startup.ts +30 -0
  41. package/src/workflow-views.tsx +8 -12
  42. package/lib/direct-task-editing/di.config.d.ts.map +0 -1
  43. package/lib/direct-task-editing/di.config.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2023 EclipseSource and others.
2
+ * Copyright (c) 2020-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,7 +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 { AbstractUIExtension, Action, AutoCompleteWidget, DOMHelper, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, Operation, GModelRoot, ValidationStatus, ViewerOptions } from '@eclipse-glsp/client';
16
+ import { Action, AutoCompleteWidget, DOMHelper, EditorContextService, GLSPAbstractUIExtension, GLSPActionDispatcher, GModelRoot, ILogger, LabeledAction, Operation, ValidationStatus, ViewerOptions } from '@eclipse-glsp/client';
17
17
  import { TaskNode } from '../model';
18
18
  /**
19
19
  * Is send from the {@link TaskEditor} to the GLSP server
@@ -43,7 +43,7 @@ export declare namespace EditTaskOperation {
43
43
  value: string;
44
44
  }): EditTaskOperation;
45
45
  }
46
- export declare class TaskEditor extends AbstractUIExtension {
46
+ export declare class TaskEditor extends GLSPAbstractUIExtension {
47
47
  static readonly ID = "task-editor";
48
48
  readonly autoSuggestionSettings: {
49
49
  noSuggestionsMessage: string;
@@ -1 +1 @@
1
- {"version":3,"file":"direct-task-editor.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,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AS,CAAC,WAAW,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;cAe1C,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;cAU5D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAUvE,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI;IAI/E,SAAS,CAAC,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAc9C,IAAI,IAAI,IAAI;CAIxB"}
@@ -12,7 +12,7 @@ var TaskEditor_1;
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.TaskEditor = exports.EditTaskOperation = void 0;
14
14
  /********************************************************************************
15
- * Copyright (c) 2020-2023 EclipseSource and others.
15
+ * Copyright (c) 2020-2024 EclipseSource and others.
16
16
  *
17
17
  * This program and the accompanying materials are made available under the
18
18
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -44,7 +44,7 @@ var EditTaskOperation;
44
44
  }
45
45
  EditTaskOperation.create = create;
46
46
  })(EditTaskOperation || (exports.EditTaskOperation = EditTaskOperation = {}));
47
- let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExtension {
47
+ let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.GLSPAbstractUIExtension {
48
48
  constructor() {
49
49
  super(...arguments);
50
50
  this.autoSuggestionSettings = {
@@ -1 +1 @@
1
- {"version":3,"file":"direct-task-editor.js","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAuB8B;AAC9B,yCAA+C;AAC/C,oCAAgD;AAyBhD,IAAiB,iBAAiB,CAmBjC;AAnBD,WAAiB,iBAAiB;IACjB,sBAAI,GAAG,UAAU,CAAC;IAE/B,SAAgB,EAAE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AC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;YAC9F,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,KAAK,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;IAEQ,IAAI;QACT,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC;;AAvHQ,gCAAU;AACH,aAAE,GAAG,aAAa,AAAhB,CAAiB;AASzB;IADT,IAAA,kBAAM,EAAC,cAAK,CAAC,iBAAiB,CAAC;8BACJ,6BAAoB;oDAAC;AAGvC;IADT,IAAA,kBAAM,EAAC,6BAAoB,CAAC;8BACG,6BAAoB;wDAAC;AAG3C;IADT,IAAA,kBAAM,EAAC,cAAK,CAAC,aAAa,CAAC;;iDACW;AAG7B;IADT,IAAA,kBAAM,EAAC,cAAK,CAAC,SAAS,CAAC;8BACH,kBAAS;6CAAC;AAGZ;IADlB,IAAA,kBAAM,EAAC,cAAK,CAAC,OAAO,CAAC;;0CACa;qBAtB1B,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CAwHtB;AAED,SAAS,OAAO,CAAC,GAAa,EAAE,KAAqB;IACjD,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,IAAI,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAe,CAAC;AAC5G,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,5 +14,5 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { FeatureModule } from '@eclipse-glsp/client';
17
- export declare const directTaskEditor: FeatureModule;
18
- //# sourceMappingURL=di.config.d.ts.map
17
+ export declare const taskEditorModule: FeatureModule;
18
+ //# sourceMappingURL=task-editor-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-editor-module.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/task-editor-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAiB,aAAa,EAAS,MAAM,sBAAsB,CAAC;AAG3E,eAAO,MAAM,gBAAgB,eAK5B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.directTaskEditor = void 0;
3
+ exports.taskEditorModule = void 0;
4
4
  /********************************************************************************
5
- * Copyright (c) 2019-2023 EclipseSource and others.
5
+ * Copyright (c) 2019-2024 EclipseSource and others.
6
6
  *
7
7
  * This program and the accompanying materials are made available under the
8
8
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -18,7 +18,7 @@ exports.directTaskEditor = void 0;
18
18
  ********************************************************************************/
19
19
  const client_1 = require("@eclipse-glsp/client");
20
20
  const direct_task_editor_1 = require("./direct-task-editor");
21
- exports.directTaskEditor = new client_1.FeatureModule((bind, _unbind, _isBound) => {
21
+ exports.taskEditorModule = new client_1.FeatureModule((bind, _unbind, _isBound) => {
22
22
  (0, client_1.bindAsService)(bind, client_1.TYPES.IUIExtension, direct_task_editor_1.TaskEditor);
23
- });
24
- //# sourceMappingURL=di.config.js.map
23
+ }, { featureId: Symbol('taskEditorModule') });
24
+ //# sourceMappingURL=task-editor-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-editor-module.js","sourceRoot":"","sources":["../../src/direct-task-editing/task-editor-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA2E;AAC3E,6DAAkD;AAErC,QAAA,gBAAgB,GAAG,IAAI,sBAAa,CAC7C,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IACxB,IAAA,sBAAa,EAAC,IAAI,EAAE,cAAK,CAAC,YAAY,EAAE,+BAAU,CAAC,CAAC;AACxD,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,EAAE,CAC5C,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,7 +14,10 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  export * from './direct-task-editing/direct-task-editor';
17
+ export * from './direct-task-editing/task-editor-module';
17
18
  export * from './model';
18
19
  export * from './workflow-diagram-module';
20
+ export * from './workflow-snapper';
21
+ export * from './workflow-startup';
19
22
  export * from './workflow-views';
20
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,0CAA0C,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
package/lib/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /********************************************************************************
18
- * Copyright (c) 2019-2023 EclipseSource and others.
18
+ * Copyright (c) 2024 EclipseSource and others.
19
19
  *
20
20
  * This program and the accompanying materials are made available under the
21
21
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -30,7 +30,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
31
31
  ********************************************************************************/
32
32
  __exportStar(require("./direct-task-editing/direct-task-editor"), exports);
33
+ __exportStar(require("./direct-task-editing/task-editor-module"), exports);
33
34
  __exportStar(require("./model"), exports);
34
35
  __exportStar(require("./workflow-diagram-module"), exports);
36
+ __exportStar(require("./workflow-snapper"), exports);
37
+ __exportStar(require("./workflow-startup"), exports);
35
38
  __exportStar(require("./workflow-views"), exports);
36
39
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2EAAyD;AACzD,0CAAwB;AACxB,4DAA0C;AAC1C,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2EAAyD;AACzD,2EAAyD;AACzD,0CAAwB;AACxB,4DAA0C;AAC1C,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC"}
package/lib/model.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2023 EclipseSource and others.
2
+ * Copyright (c) 2020-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,7 +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 { DiamondNode, EditableLabel, GEdge, LayoutContainer, Nameable, RectangularNode, GChildElement, GModelElement, GShapeElement, WithEditableLabel } from '@eclipse-glsp/client';
16
+ import { DiamondNode, EditableLabel, GChildElement, GEdge, GModelElement, GShapeElement, LayoutContainer, Nameable, RectangularNode, ResizableModelElement, WithEditableLabel } from '@eclipse-glsp/client';
17
17
  export declare class TaskNode extends RectangularNode implements Nameable, WithEditableLabel {
18
18
  static readonly DEFAULT_FEATURES: symbol[];
19
19
  duration?: number;
@@ -26,7 +26,7 @@ export declare function isTaskNode(element: GModelElement): element is TaskNode;
26
26
  export declare class WeightedEdge extends GEdge {
27
27
  probability?: string;
28
28
  }
29
- export declare class ActivityNode extends DiamondNode {
29
+ export declare class ControlNode extends DiamondNode implements ResizableModelElement {
30
30
  nodeType: string;
31
31
  size: {
32
32
  width: number;
@@ -34,6 +34,10 @@ export declare class ActivityNode extends DiamondNode {
34
34
  };
35
35
  strokeWidth: number;
36
36
  }
37
+ export declare class BranchingNode extends ControlNode {
38
+ }
39
+ export declare class SynchronizationNode extends ControlNode {
40
+ }
37
41
  export declare namespace ActivityNode {
38
42
  namespace Type {
39
43
  const INITIAL = "initialNode";
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAIH,WAAW,EACX,aAAa,EAEb,KAAK,EAIL,eAAe,EAGf,QAAQ,EAGR,eAAe,EACf,aAAa,EAEb,aAAa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CAAC;QAC1B,MAAM,IAAI,aAAa,CAAC;QACxB,MAAM,IAAI,aAAa,CAAC;QACxB,MAAM,SAAS,cAAc,CAAC;KACxC;CACJ;AAED,qBAAa,IAAK,SAAQ,aAAc,YAAW,eAAe;IAC9D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAAgF;IAEhH,MAAM,EAAE,MAAM,CAAC;IACN,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC7D,IAAI;;;MAGX;CACL;AAED,qBAAa,YAAa,SAAQ,eAAgB,YAAW,QAAQ,EAAE,iBAAiB;IACpF,gBAAyB,gBAAgB,WAWvC;IAEF,IAAI,SAAM;IAEV,IAAI,aAAa,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,SAAS,CAM/D;CACJ"}
package/lib/model.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CategoryNode = exports.Icon = exports.ActivityNode = exports.WeightedEdge = exports.isTaskNode = exports.TaskNode = void 0;
3
+ exports.CategoryNode = exports.Icon = exports.ActivityNode = exports.SynchronizationNode = exports.BranchingNode = exports.ControlNode = exports.WeightedEdge = exports.isTaskNode = exports.TaskNode = void 0;
4
4
  /********************************************************************************
5
- * Copyright (c) 2020-2023 EclipseSource and others.
5
+ * Copyright (c) 2020-2024 EclipseSource and others.
6
6
  *
7
7
  * This program and the accompanying materials are made available under the
8
8
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -52,7 +52,7 @@ exports.isTaskNode = isTaskNode;
52
52
  class WeightedEdge extends client_1.GEdge {
53
53
  }
54
54
  exports.WeightedEdge = WeightedEdge;
55
- class ActivityNode extends client_1.DiamondNode {
55
+ class ControlNode extends client_1.DiamondNode {
56
56
  constructor() {
57
57
  super(...arguments);
58
58
  this.nodeType = ActivityNode.Type.UNDEFINED;
@@ -63,7 +63,14 @@ class ActivityNode extends client_1.DiamondNode {
63
63
  this.strokeWidth = 1;
64
64
  }
65
65
  }
66
- exports.ActivityNode = ActivityNode;
66
+ exports.ControlNode = ControlNode;
67
+ class BranchingNode extends ControlNode {
68
+ }
69
+ exports.BranchingNode = BranchingNode;
70
+ class SynchronizationNode extends ControlNode {
71
+ }
72
+ exports.SynchronizationNode = SynchronizationNode;
73
+ var ActivityNode;
67
74
  (function (ActivityNode) {
68
75
  let Type;
69
76
  (function (Type) {
package/lib/model.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAwB8B;AAE9B,MAAa,QAAS,SAAQ,wBAAe;IAkBzC,IAAI,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;QAC9E,IAAI,KAAK,IAAI,IAAA,wBAAe,EAAC,KAAK,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,IAAI;;QACJ,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,aAAa,0CAAE,IAAI,CAAC;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/C,CAAC;;AA7BL,4BA8BC;AA7B4B,yBAAgB,GAAG;IACxC,2BAAkB;IAClB,yBAAgB;IAChB,sBAAa;IACb,sBAAa;IACb,oBAAW;IACX,+BAAsB;IACtB,oBAAW;IACX,6BAAoB;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,CAAC;AAmBN,SAAgB,UAAU,CAAC,OAAsB;IAC7C,OAAO,OAAO,YAAY,QAAQ,IAAI,KAAK,CAAC;AAChD,CAAC;AAFD,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ClC,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;;AAtBL,oCAuBC;AAtB4B,6BAAgB,GAAG;IACxC,yBAAgB;IAChB,sBAAa;IACb,sBAAa;IACb,oBAAW;IACX,+BAAsB;IACtB,oBAAW;IACX,6BAAoB;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,AAXwC,CAWvC"}
@@ -13,12 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { ContainerConfiguration } from '@eclipse-glsp/client';
16
+ import { ContainerConfiguration, FeatureModule } from '@eclipse-glsp/client';
17
17
  import 'balloon-css/balloon.min.css';
18
- import { Container, ContainerModule } from 'inversify';
18
+ import { Container } from 'inversify';
19
19
  import 'sprotty/css/edit-label.css';
20
20
  import '../css/diagram.css';
21
- export declare const workflowDiagramModule: ContainerModule;
21
+ export declare const workflowDiagramModule: FeatureModule;
22
22
  export declare function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container;
23
23
  export declare function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container;
24
24
  //# sourceMappingURL=workflow-diagram-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,sBAAsB,EA4BzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAK5B,eAAO,MAAM,qBAAqB,iBAuChC,CAAC;AAEH,wBAAgB,8BAA8B,CAAC,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE3G;AAED,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAErI"}
1
+ {"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,sBAAsB,EAKtB,aAAa,EAyBhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAO5B,eAAO,MAAM,qBAAqB,eAsCjC,CAAC;AAEF,wBAAgB,8BAA8B,CAAC,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE3G;AAED,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAUrI"}
@@ -21,14 +21,15 @@ require("balloon-css/balloon.min.css");
21
21
  const inversify_1 = require("inversify");
22
22
  require("sprotty/css/edit-label.css");
23
23
  require("../css/diagram.css");
24
- const di_config_1 = require("./direct-task-editing/di.config");
24
+ const task_editor_module_1 = require("./direct-task-editing/task-editor-module");
25
25
  const model_1 = require("./model");
26
+ const workflow_snapper_1 = require("./workflow-snapper");
27
+ const workflow_startup_1 = require("./workflow-startup");
26
28
  const workflow_views_1 = require("./workflow-views");
27
- exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
29
+ exports.workflowDiagramModule = new client_1.FeatureModule((bind, unbind, isBound, rebind) => {
28
30
  const context = { bind, unbind, isBound, rebind };
29
31
  (0, client_1.bindOrRebind)(context, client_1.TYPES.ILogger).to(client_1.ConsoleLogger).inSingletonScope();
30
32
  (0, client_1.bindOrRebind)(context, client_1.TYPES.LogLevel).toConstantValue(client_1.LogLevel.warn);
31
- bind(client_1.TYPES.ISnapper).to(client_1.GridSnapper);
32
33
  (0, client_1.bindAsService)(context, client_1.TYPES.ICommandPaletteActionProvider, client_1.RevealNamedElementActionProvider);
33
34
  (0, client_1.bindAsService)(context, client_1.TYPES.IContextMenuItemProvider, client_1.DeleteElementContextMenuItemProvider);
34
35
  (0, client_1.configureDefaultModelElements)(context);
@@ -36,36 +37,32 @@ exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, i
36
37
  (0, client_1.configureModelElement)(context, 'task:manual', model_1.TaskNode, client_1.RoundedCornerNodeView);
37
38
  (0, client_1.configureModelElement)(context, 'label:heading', client_1.GLabel, client_1.GLabelView, { enable: [client_1.editLabelFeature] });
38
39
  (0, client_1.configureModelElement)(context, 'comp:comp', client_1.GCompartment, client_1.GCompartmentView);
39
- (0, client_1.configureModelElement)(context, 'comp:header', client_1.GCompartment, client_1.GCompartmentView);
40
40
  (0, client_1.configureModelElement)(context, 'label:icon', client_1.GLabel, client_1.GLabelView);
41
- (0, client_1.configureModelElement)(context, client_1.DefaultTypes.EDGE, client_1.GEdge, workflow_views_1.WorkflowEdgeView);
41
+ (0, client_1.overrideModelElement)(context, client_1.DefaultTypes.EDGE, client_1.GEdge, workflow_views_1.WorkflowEdgeView);
42
42
  (0, client_1.configureModelElement)(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WorkflowEdgeView);
43
43
  (0, client_1.configureModelElement)(context, 'icon', model_1.Icon, workflow_views_1.IconView);
44
- (0, client_1.configureModelElement)(context, 'activityNode:merge', model_1.ActivityNode, client_1.DiamondNodeView);
45
- (0, client_1.configureModelElement)(context, 'activityNode:decision', model_1.ActivityNode, client_1.DiamondNodeView);
46
- (0, client_1.configureModelElement)(context, 'activityNode:fork', model_1.ActivityNode, client_1.RectangularNodeView);
47
- (0, client_1.configureModelElement)(context, 'activityNode:join', model_1.ActivityNode, client_1.RectangularNodeView);
48
- (0, client_1.configureModelElement)(context, client_1.DefaultTypes.GRAPH, client_1.GGraph, client_1.GLSPProjectionView);
44
+ (0, client_1.configureModelElement)(context, 'activityNode:merge', model_1.BranchingNode, client_1.DiamondNodeView);
45
+ (0, client_1.configureModelElement)(context, 'activityNode:decision', model_1.BranchingNode, client_1.DiamondNodeView);
46
+ (0, client_1.configureModelElement)(context, 'activityNode:fork', model_1.SynchronizationNode, client_1.RectangularNodeView);
47
+ (0, client_1.configureModelElement)(context, 'activityNode:join', model_1.SynchronizationNode, client_1.RectangularNodeView);
48
+ (0, client_1.overrideModelElement)(context, client_1.DefaultTypes.GRAPH, client_1.GGraph, client_1.GLSPProjectionView);
49
49
  (0, client_1.configureModelElement)(context, 'category', model_1.CategoryNode, client_1.RoundedCornerNodeView);
50
50
  (0, client_1.configureModelElement)(context, 'struct', client_1.GCompartment, client_1.StructureCompartmentView);
51
51
  bind(client_1.TYPES.IHelperLineOptions).toDynamicValue(ctx => {
52
52
  const options = {};
53
- // the user needs to use twice the force (double the distance) to break through a helper line compared to moving on the grid
54
- const snapper = ctx.container.get(client_1.TYPES.ISnapper);
55
- if (snapper instanceof client_1.GridSnapper) {
56
- options.minimumMoveDelta = { x: snapper.grid.x * 2, y: snapper.grid.y * 2 };
57
- }
58
53
  // skip icons for alignment as well as compartments which are only used for structure
59
54
  options.alignmentElementFilter = element => (0, client_1.DEFAULT_ALIGNABLE_ELEMENT_FILTER)(element) && !(element instanceof model_1.Icon) && !(element instanceof client_1.GCompartment);
60
55
  return options;
61
56
  });
62
- });
57
+ (0, client_1.bindAsService)(context, client_1.TYPES.IDiagramStartup, workflow_startup_1.WorkflowStartup);
58
+ (0, client_1.bindOrRebind)(context, client_1.TYPES.ISnapper).to(workflow_snapper_1.WorkflowSnapper);
59
+ }, { featureId: Symbol('workflowDiagram') });
63
60
  function createWorkflowDiagramContainer(...containerConfiguration) {
64
61
  return initializeWorkflowDiagramContainer(new inversify_1.Container(), ...containerConfiguration);
65
62
  }
66
63
  exports.createWorkflowDiagramContainer = createWorkflowDiagramContainer;
67
64
  function initializeWorkflowDiagramContainer(container, ...containerConfiguration) {
68
- return (0, client_1.initializeDiagramContainer)(container, exports.workflowDiagramModule, di_config_1.directTaskEditor, client_1.helperLineModule, ...containerConfiguration);
65
+ return (0, client_1.initializeDiagramContainer)(container, task_editor_module_1.taskEditorModule, client_1.helperLineModule, client_1.gridModule, client_1.debugModule, exports.workflowDiagramModule, ...containerConfiguration);
69
66
  }
70
67
  exports.initializeWorkflowDiagramContainer = initializeWorkflowDiagramContainer;
71
68
  //# sourceMappingURL=workflow-diagram-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDA8B8B;AAC9B,uCAAqC;AACrC,yCAAuD;AACvD,sCAAoC;AACpC,8BAA4B;AAC5B,+DAAmE;AACnE,mCAAmF;AACnF,qDAA8D;AAEjD,QAAA,qBAAqB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACvF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElD,IAAA,qBAAY,EAAC,OAAO,EAAE,cAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,sBAAa,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC1E,IAAA,qBAAY,EAAC,OAAO,EAAE,cAAK,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;IACrE,IAAI,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,oBAAW,CAAC,CAAC;IACrC,IAAA,sBAAa,EAAC,OAAO,EAAE,cAAK,CAAC,6BAA6B,EAAE,yCAAgC,CAAC,CAAC;IAC9F,IAAA,sBAAa,EAAC,OAAO,EAAE,cAAK,CAAC,wBAAwB,EAAE,6CAAoC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AqF;QACrF,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,EAAE,CACvC,IAAA,yCAAgC,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,YAAY,YAAI,CAAC,IAAI,CAAC,CAAC,OAAO,YAAY,qBAAY,CAAC,CAAC;QAClH,OAAO,OAAO,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,IAAA,sBAAa,EAAC,OAAO,EAAE,cAAK,CAAC,eAAe,EAAE,kCAAe,CAAC,CAAC;IAC/D,IAAA,qBAAY,EAAC,OAAO,EAAE,cAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,kCAAe,CAAC,CAAC;AAC9D,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAC3C,CAAC;AAEF,SAAgB,8BAA8B,CAAC,GAAG,sBAA8C;IAC5F,OAAO,kCAAkC,CAAC,IAAI,qBAAS,EAAE,EAAE,GAAG,sBAAsB,CAAC,CAAC;AAC1F,CAAC;AAFD,wEAEC;AAED,SAAgB,kCAAkC,CAAC,SAAoB,EAAE,GAAG,sBAA8C;IACtH,OAAO,IAAA,mCAA0B,EAC7B,SAAS,EACT,qCAAgB,EAChB,yBAAgB,EAChB,mBAAU,EACV,oBAAW,EACX,6BAAqB,EACrB,GAAG,sBAAsB,CAC5B,CAAC;AACN,CAAC;AAVD,gFAUC"}
@@ -0,0 +1,20 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2024 EclipseSource 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 { GModelElement, GridSnapper, Point } from '@eclipse-glsp/client';
17
+ export declare class WorkflowSnapper extends GridSnapper {
18
+ snap(position: Point, element: GModelElement): Point;
19
+ }
20
+ //# sourceMappingURL=workflow-snapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-snapper.d.ts","sourceRoot":"","sources":["../src/workflow-snapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAkB,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGzF,qBACa,eAAgB,SAAQ,WAAW;IACnC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;CAOhE"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2024 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ 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;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.WorkflowSnapper = void 0;
25
+ const client_1 = require("@eclipse-glsp/client");
26
+ const inversify_1 = require("inversify");
27
+ let WorkflowSnapper = class WorkflowSnapper extends client_1.GridSnapper {
28
+ snap(position, element) {
29
+ // we snap our edges to the center of the elements and our elements to the grid,
30
+ // so to allow for nicer angles and more fine-grained control, we allow routing points to be snapped half-grid
31
+ return element instanceof client_1.GRoutingHandle
32
+ ? client_1.Point.snapToGrid(position, client_1.Point.divideScalar(this.grid, 2))
33
+ : super.snap(position, element);
34
+ }
35
+ };
36
+ exports.WorkflowSnapper = WorkflowSnapper;
37
+ exports.WorkflowSnapper = WorkflowSnapper = __decorate([
38
+ (0, inversify_1.injectable)()
39
+ ], WorkflowSnapper);
40
+ //# sourceMappingURL=workflow-snapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-snapper.js","sourceRoot":"","sources":["../src/workflow-snapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,iDAAyF;AACzF,yCAAuC;AAGhC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,oBAAW;IACnC,IAAI,CAAC,QAAe,EAAE,OAAsB;QACjD,gFAAgF;QAChF,8GAA8G;QAC9G,OAAO,OAAO,YAAY,uBAAc;YACpC,CAAC,CAAC,cAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,cAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC9D,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;CACJ,CAAA;AARY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAQ3B"}
@@ -0,0 +1,23 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2024 EclipseSource 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 { GridManager, IDiagramStartup } from '@eclipse-glsp/client';
17
+ import { MaybePromise } from '@eclipse-glsp/sprotty';
18
+ export declare class WorkflowStartup implements IDiagramStartup {
19
+ rank: number;
20
+ protected gridManager?: GridManager;
21
+ preRequestModel(): MaybePromise<void>;
22
+ }
23
+ //# sourceMappingURL=workflow-startup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-startup.d.ts","sourceRoot":"","sources":["../src/workflow-startup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,qBACa,eAAgB,YAAW,eAAe;IACnD,IAAI,SAAM;IAEuB,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAErE,eAAe,IAAI,YAAY,CAAC,IAAI,CAAC;CAGxC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2024 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ 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;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.WorkflowStartup = void 0;
28
+ const client_1 = require("@eclipse-glsp/client");
29
+ const inversify_1 = require("inversify");
30
+ let WorkflowStartup = class WorkflowStartup {
31
+ constructor() {
32
+ this.rank = -1;
33
+ }
34
+ preRequestModel() {
35
+ var _a;
36
+ (_a = this.gridManager) === null || _a === void 0 ? void 0 : _a.setGridVisible(true);
37
+ }
38
+ };
39
+ exports.WorkflowStartup = WorkflowStartup;
40
+ __decorate([
41
+ (0, inversify_1.inject)(client_1.GridManager),
42
+ (0, inversify_1.optional)(),
43
+ __metadata("design:type", client_1.GridManager)
44
+ ], WorkflowStartup.prototype, "gridManager", void 0);
45
+ exports.WorkflowStartup = WorkflowStartup = __decorate([
46
+ (0, inversify_1.injectable)()
47
+ ], WorkflowStartup);
48
+ //# sourceMappingURL=workflow-startup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-startup.js","sourceRoot":"","sources":["../src/workflow-startup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,iDAAoE;AAEpE,yCAAyD;AAGlD,IAAM,eAAe,GAArB,MAAM,eAAe;IAArB;QACH,SAAI,GAAG,CAAC,CAAC,CAAC;IAOd,CAAC;IAHG,eAAe;;QACX,MAAA,IAAI,CAAC,WAAW,0CAAE,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACJ,CAAA;AARY,0CAAe;AAGmB;IAA1C,IAAA,kBAAM,EAAC,oBAAW,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAAyB,oBAAW;oDAAC;0BAH5D,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAQ3B"}
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,7 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { Point, PolylineEdgeViewWithGapsOnIntersections, RenderingContext, GEdge, ShapeView } from '@eclipse-glsp/client';
16
+ /** @jsx svg */
17
+ import { GEdge, Point, PolylineEdgeViewWithGapsOnIntersections, RenderingContext, ShapeView } from '@eclipse-glsp/client';
17
18
  import { VNode } from 'snabbdom';
18
19
  import { Icon } from './model';
19
20
  export declare class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-views.d.ts","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAIH,KAAK,EACL,uCAAuC,EACvC,gBAAgB,EAChB,KAAK,EAEL,SAAS,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAc,MAAM,SAAS,CAAC;AAK3C,qBACa,gBAAiB,SAAQ,uCAAuC;cACtD,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,EAAE;CAiB3G;AAED,qBACa,QAAS,SAAQ,SAAS;IACnC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;CAuCtE"}
1
+ {"version":3,"file":"workflow-views.d.ts","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,eAAe;AACf,OAAO,EACH,KAAK,EACL,KAAK,EACL,uCAAuC,EACvC,gBAAgB,EAChB,SAAS,EAOZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAc,MAAM,SAAS,CAAC;AAE3C,qBACa,gBAAiB,SAAQ,uCAAuC;cACtD,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,EAAE;CAe3G;AAED,qBACa,QAAS,SAAQ,SAAS;IACnC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;CAuCtE"}
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.IconView = exports.WorkflowEdgeView = void 0;
10
10
  /********************************************************************************
11
- * Copyright (c) 2019-2023 EclipseSource and others.
11
+ * Copyright (c) 2019-2024 EclipseSource and others.
12
12
  *
13
13
  * This program and the accompanying materials are made available under the
14
14
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -22,17 +22,16 @@ exports.IconView = exports.WorkflowEdgeView = void 0;
22
22
  *
23
23
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
24
  ********************************************************************************/
25
+ /** @jsx svg */
25
26
  const client_1 = require("@eclipse-glsp/client");
26
27
  const inversify_1 = require("inversify");
27
28
  const model_1 = require("./model");
28
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
- const JSX = { createElement: client_1.svg };
30
29
  let WorkflowEdgeView = class WorkflowEdgeView extends client_1.PolylineEdgeViewWithGapsOnIntersections {
31
30
  renderAdditionals(edge, segments, context) {
32
31
  const additionals = super.renderAdditionals(edge, segments, context);
33
32
  const p1 = segments[segments.length - 2];
34
33
  const p2 = segments[segments.length - 1];
35
- const arrow = (JSX.createElement("path", { "class-sprotty-edge": true, "class-arrow": true, d: 'M 1,0 L 10,-4 L 10,4 Z', transform: `rotate(${(0, client_1.toDegrees)((0, client_1.angleOfPoint)({ x: p1.x - p2.x, y: p1.y - p2.y }))} ${p2.x} ${p2.y}) translate(${p2.x} ${p2.y})` }));
34
+ const arrow = ((0, client_1.svg)("path", { "class-sprotty-edge": true, "class-arrow": true, d: 'M 1,0 L 10,-4 L 10,4 Z', transform: `rotate(${(0, client_1.toDegrees)((0, client_1.angleOfPoint)(client_1.Point.subtract(p1, p2)))} ${p2.x} ${p2.y}) translate(${p2.x} ${p2.y})` }));
36
35
  additionals.push(arrow);
37
36
  return additionals;
38
37
  }
@@ -60,12 +59,12 @@ let IconView = class IconView extends client_1.ShapeView {
60
59
  // eslint-disable-next-line max-len
61
60
  'M9.1 4.4L8.6 2H7.4l-.5 2.4-.7.3-2-1.3-.9.8 1.3 2-.2.7-2.4.5v1.2l2.4.5.3.8-1.3 2 .8.8 2-1.3.8.3.4 2.3h1.2l.5-2.4.8-.3 2 1.3.8-.8-1.3-2 .3-.8 2.3-.4V7.4l-2.4-.5-.3-.8 1.3-2-.8-.8-2 1.3-.7-.2zM9.4 1l.5 2.4L12 2.1l2 2-1.4 2.1 2.4.4v2.8l-2.4.5L14 12l-2 2-2.1-1.4-.5 2.4H6.6l-.5-2.4L4 13.9l-2-2 1.4-2.1L1 9.4V6.6l2.4-.5L2.1 4l2-2 2.1 1.4.4-2.4h2.8zm.6 7c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zM8 9c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z';
62
61
  }
63
- const vnode = (JSX.createElement("g", null,
64
- JSX.createElement("path", { transform: 'scale(1.15),translate(0.75,0.75)',
62
+ const vnode = ((0, client_1.svg)("g", null,
63
+ (0, client_1.svg)("path", { transform: 'scale(1.15),translate(0.75,0.75)',
65
64
  // From codicons: https://github.com/microsoft/vscode-codicons/blob/main/src/icons/terminal.svg?short_path=2ffc08e
66
65
  // eslint-disable-next-line max-len
67
66
  d: icon }),
68
- JSX.createElement("rect", { "class-icon-background": true, x: 0, y: 0, width: 25, height: 20 }),
67
+ (0, client_1.svg)("rect", { "class-icon-background": true, x: 0, y: 0, width: 25, height: 20 }),
69
68
  context.renderChildren(element)));
70
69
  const subType = (0, client_1.getSubType)(element);
71
70
  if (subType) {
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-views.js","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAY8B;AAC9B,yCAAuC;AAEvC,mCAA2C;AAE3C,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,YAAG,EAAE,CAAC;AAG5B,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,gDAAuC;IACtD,iBAAiB,CAAC,IAAW,EAAE,QAAiB,EAAE,OAAyB;QAC1F,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,QAAQ,CAAC,Q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AO,CAAC,CAAC;QACpC,IAAI,OAAO,EAAE,CAAC;YACV,IAAA,gBAAO,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AAxCY,4BAAQ;mBAAR,QAAQ;IADpB,IAAA,sBAAU,GAAE;GACA,QAAQ,CAwCpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp-examples/workflow-glsp",
3
- "version": "2.3.0-next.322+39671a2",
3
+ "version": "2.3.0-next.366+b0e3022",
4
4
  "description": "GLSP diagrams for the Workflow DSL",
5
5
  "keywords": [
6
6
  "glsp",
@@ -30,18 +30,17 @@
30
30
  "files": [
31
31
  "lib",
32
32
  "src",
33
- "build",
34
- "css",
35
- "scripts"
33
+ "css"
36
34
  ],
37
35
  "scripts": {
38
36
  "build": "tsc -b",
39
37
  "clean": "rimraf *.tsbuildinfo lib",
38
+ "generate:index": "glsp generateIndex src -f -s",
40
39
  "lint": "eslint --ext .ts,.tsx ./src",
41
40
  "watch": "tsc -w"
42
41
  },
43
42
  "dependencies": {
44
- "@eclipse-glsp/client": "2.3.0-next.322+39671a2",
43
+ "@eclipse-glsp/client": "2.3.0-next.366+b0e3022",
45
44
  "balloon-css": "^0.5.0"
46
45
  },
47
46
  "devDependencies": {
@@ -50,5 +49,5 @@
50
49
  "publishConfig": {
51
50
  "access": "public"
52
51
  },
53
- "gitHead": "39671a2e6b30c52428182c06d815583485eb5b1d"
52
+ "gitHead": "b0e3022fbd2df727a7604e530a27fa92ace29900"
54
53
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2023 EclipseSource and others.
2
+ * Copyright (c) 2020-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,19 +14,19 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import {
17
- AbstractUIExtension,
18
17
  Action,
19
18
  AutoCompleteWidget,
20
19
  DOMHelper,
21
20
  EditorContextService,
21
+ GLSPAbstractUIExtension,
22
22
  GLSPActionDispatcher,
23
+ GModelRoot,
23
24
  ILogger,
24
25
  LabeledAction,
25
26
  ModelIndexImpl,
26
27
  Operation,
27
28
  RequestContextActions,
28
29
  RequestEditValidationAction,
29
- GModelRoot,
30
30
  SetContextActions,
31
31
  SetEditValidationResultAction,
32
32
  TYPES,
@@ -85,7 +85,7 @@ export namespace EditTaskOperation {
85
85
  }
86
86
 
87
87
  @injectable()
88
- export class TaskEditor extends AbstractUIExtension {
88
+ export class TaskEditor extends GLSPAbstractUIExtension {
89
89
  static readonly ID = 'task-editor';
90
90
  readonly autoSuggestionSettings = {
91
91
  noSuggestionsMessage: 'No suggestions available',
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -16,6 +16,9 @@
16
16
  import { bindAsService, FeatureModule, TYPES } from '@eclipse-glsp/client';
17
17
  import { TaskEditor } from './direct-task-editor';
18
18
 
19
- export const directTaskEditor = new FeatureModule((bind, _unbind, _isBound) => {
20
- bindAsService(bind, TYPES.IUIExtension, TaskEditor);
21
- });
19
+ export const taskEditorModule = new FeatureModule(
20
+ (bind, _unbind, _isBound) => {
21
+ bindAsService(bind, TYPES.IUIExtension, TaskEditor);
22
+ },
23
+ { featureId: Symbol('taskEditorModule') }
24
+ );
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,6 +14,9 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  export * from './direct-task-editing/direct-task-editor';
17
+ export * from './direct-task-editing/task-editor-module';
17
18
  export * from './model';
18
19
  export * from './workflow-diagram-module';
20
+ export * from './workflow-snapper';
21
+ export * from './workflow-startup';
19
22
  export * from './workflow-views';
package/src/model.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2023 EclipseSource and others.
2
+ * Copyright (c) 2020-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,28 +14,29 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import {
17
+ DiamondNode,
18
+ EditableLabel,
19
+ GChildElement,
20
+ GEdge,
21
+ GModelElement,
22
+ GShapeElement,
23
+ LayoutContainer,
24
+ Nameable,
25
+ RectangularNode,
26
+ ResizableModelElement,
27
+ WithEditableLabel,
17
28
  boundsFeature,
18
29
  connectableFeature,
19
30
  deletableFeature,
20
- DiamondNode,
21
- EditableLabel,
22
31
  fadeFeature,
23
- GEdge,
24
32
  hoverFeedbackFeature,
25
33
  isEditableLabel,
26
- layoutableChildFeature,
27
- LayoutContainer,
28
34
  layoutContainerFeature,
35
+ layoutableChildFeature,
29
36
  moveFeature,
30
- Nameable,
31
37
  nameFeature,
32
38
  popupFeature,
33
- RectangularNode,
34
- GChildElement,
35
39
  selectFeature,
36
- GModelElement,
37
- GShapeElement,
38
- WithEditableLabel,
39
40
  withEditLabelFeature
40
41
  } from '@eclipse-glsp/client';
41
42
 
@@ -79,7 +80,7 @@ export class WeightedEdge extends GEdge {
79
80
  probability?: string;
80
81
  }
81
82
 
82
- export class ActivityNode extends DiamondNode {
83
+ export class ControlNode extends DiamondNode implements ResizableModelElement {
83
84
  nodeType: string = ActivityNode.Type.UNDEFINED;
84
85
  override size = {
85
86
  width: 32,
@@ -88,6 +89,10 @@ export class ActivityNode extends DiamondNode {
88
89
  override strokeWidth = 1;
89
90
  }
90
91
 
92
+ export class BranchingNode extends ControlNode {}
93
+
94
+ export class SynchronizationNode extends ControlNode {}
95
+
91
96
  export namespace ActivityNode {
92
97
  export namespace Type {
93
98
  export const INITIAL = 'initialNode';
@@ -20,6 +20,7 @@ import {
20
20
  DefaultTypes,
21
21
  DeleteElementContextMenuItemProvider,
22
22
  DiamondNodeView,
23
+ FeatureModule,
23
24
  GCompartment,
24
25
  GCompartmentView,
25
26
  GEdge,
@@ -27,9 +28,7 @@ import {
27
28
  GLSPProjectionView,
28
29
  GLabel,
29
30
  GLabelView,
30
- GridSnapper,
31
31
  IHelperLineOptions,
32
- ISnapper,
33
32
  LogLevel,
34
33
  RectangularNodeView,
35
34
  RevealNamedElementActionProvider,
@@ -40,63 +39,75 @@ import {
40
39
  bindOrRebind,
41
40
  configureDefaultModelElements,
42
41
  configureModelElement,
42
+ debugModule,
43
43
  editLabelFeature,
44
+ gridModule,
44
45
  helperLineModule,
45
- initializeDiagramContainer
46
+ initializeDiagramContainer,
47
+ overrideModelElement
46
48
  } from '@eclipse-glsp/client';
47
49
  import 'balloon-css/balloon.min.css';
48
- import { Container, ContainerModule } from 'inversify';
50
+ import { Container } from 'inversify';
49
51
  import 'sprotty/css/edit-label.css';
50
52
  import '../css/diagram.css';
51
- import { directTaskEditor } from './direct-task-editing/di.config';
52
- import { ActivityNode, CategoryNode, Icon, TaskNode, WeightedEdge } from './model';
53
+ import { taskEditorModule } from './direct-task-editing/task-editor-module';
54
+ import { BranchingNode, CategoryNode, Icon, SynchronizationNode, TaskNode, WeightedEdge } from './model';
55
+ import { WorkflowSnapper } from './workflow-snapper';
56
+ import { WorkflowStartup } from './workflow-startup';
53
57
  import { IconView, WorkflowEdgeView } from './workflow-views';
54
58
 
55
- export const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
56
- const context = { bind, unbind, isBound, rebind };
59
+ export const workflowDiagramModule = new FeatureModule(
60
+ (bind, unbind, isBound, rebind) => {
61
+ const context = { bind, unbind, isBound, rebind };
57
62
 
58
- bindOrRebind(context, TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
59
- bindOrRebind(context, TYPES.LogLevel).toConstantValue(LogLevel.warn);
60
- bind(TYPES.ISnapper).to(GridSnapper);
61
- bindAsService(context, TYPES.ICommandPaletteActionProvider, RevealNamedElementActionProvider);
62
- bindAsService(context, TYPES.IContextMenuItemProvider, DeleteElementContextMenuItemProvider);
63
+ bindOrRebind(context, TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
64
+ bindOrRebind(context, TYPES.LogLevel).toConstantValue(LogLevel.warn);
65
+ bindAsService(context, TYPES.ICommandPaletteActionProvider, RevealNamedElementActionProvider);
66
+ bindAsService(context, TYPES.IContextMenuItemProvider, DeleteElementContextMenuItemProvider);
63
67
 
64
- configureDefaultModelElements(context);
65
- configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView);
66
- configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView);
67
- configureModelElement(context, 'label:heading', GLabel, GLabelView, { enable: [editLabelFeature] });
68
- configureModelElement(context, 'comp:comp', GCompartment, GCompartmentView);
69
- configureModelElement(context, 'comp:header', GCompartment, GCompartmentView);
70
- configureModelElement(context, 'label:icon', GLabel, GLabelView);
71
- configureModelElement(context, DefaultTypes.EDGE, GEdge, WorkflowEdgeView);
72
- configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView);
73
- configureModelElement(context, 'icon', Icon, IconView);
74
- configureModelElement(context, 'activityNode:merge', ActivityNode, DiamondNodeView);
75
- configureModelElement(context, 'activityNode:decision', ActivityNode, DiamondNodeView);
76
- configureModelElement(context, 'activityNode:fork', ActivityNode, RectangularNodeView);
77
- configureModelElement(context, 'activityNode:join', ActivityNode, RectangularNodeView);
78
- configureModelElement(context, DefaultTypes.GRAPH, GGraph, GLSPProjectionView);
79
- configureModelElement(context, 'category', CategoryNode, RoundedCornerNodeView);
80
- configureModelElement(context, 'struct', GCompartment, StructureCompartmentView);
68
+ configureDefaultModelElements(context);
69
+ configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView);
70
+ configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView);
71
+ configureModelElement(context, 'label:heading', GLabel, GLabelView, { enable: [editLabelFeature] });
72
+ configureModelElement(context, 'comp:comp', GCompartment, GCompartmentView);
73
+ configureModelElement(context, 'label:icon', GLabel, GLabelView);
74
+ overrideModelElement(context, DefaultTypes.EDGE, GEdge, WorkflowEdgeView);
75
+ configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView);
76
+ configureModelElement(context, 'icon', Icon, IconView);
77
+ configureModelElement(context, 'activityNode:merge', BranchingNode, DiamondNodeView);
78
+ configureModelElement(context, 'activityNode:decision', BranchingNode, DiamondNodeView);
79
+ configureModelElement(context, 'activityNode:fork', SynchronizationNode, RectangularNodeView);
80
+ configureModelElement(context, 'activityNode:join', SynchronizationNode, RectangularNodeView);
81
+ overrideModelElement(context, DefaultTypes.GRAPH, GGraph, GLSPProjectionView);
82
+ configureModelElement(context, 'category', CategoryNode, RoundedCornerNodeView);
83
+ configureModelElement(context, 'struct', GCompartment, StructureCompartmentView);
81
84
 
82
- bind<IHelperLineOptions>(TYPES.IHelperLineOptions).toDynamicValue(ctx => {
83
- const options: IHelperLineOptions = {};
84
- // the user needs to use twice the force (double the distance) to break through a helper line compared to moving on the grid
85
- const snapper = ctx.container.get<ISnapper>(TYPES.ISnapper);
86
- if (snapper instanceof GridSnapper) {
87
- options.minimumMoveDelta = { x: snapper.grid.x * 2, y: snapper.grid.y * 2 };
88
- }
89
- // skip icons for alignment as well as compartments which are only used for structure
90
- options.alignmentElementFilter = element =>
91
- DEFAULT_ALIGNABLE_ELEMENT_FILTER(element) && !(element instanceof Icon) && !(element instanceof GCompartment);
92
- return options;
93
- });
94
- });
85
+ bind<IHelperLineOptions>(TYPES.IHelperLineOptions).toDynamicValue(ctx => {
86
+ const options: IHelperLineOptions = {};
87
+ // skip icons for alignment as well as compartments which are only used for structure
88
+ options.alignmentElementFilter = element =>
89
+ DEFAULT_ALIGNABLE_ELEMENT_FILTER(element) && !(element instanceof Icon) && !(element instanceof GCompartment);
90
+ return options;
91
+ });
92
+
93
+ bindAsService(context, TYPES.IDiagramStartup, WorkflowStartup);
94
+ bindOrRebind(context, TYPES.ISnapper).to(WorkflowSnapper);
95
+ },
96
+ { featureId: Symbol('workflowDiagram') }
97
+ );
95
98
 
96
99
  export function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container {
97
100
  return initializeWorkflowDiagramContainer(new Container(), ...containerConfiguration);
98
101
  }
99
102
 
100
103
  export function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container {
101
- return initializeDiagramContainer(container, workflowDiagramModule, directTaskEditor, helperLineModule, ...containerConfiguration);
104
+ return initializeDiagramContainer(
105
+ container,
106
+ taskEditorModule,
107
+ helperLineModule,
108
+ gridModule,
109
+ debugModule,
110
+ workflowDiagramModule,
111
+ ...containerConfiguration
112
+ );
102
113
  }
@@ -0,0 +1,29 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2024 EclipseSource 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
+
17
+ import { GModelElement, GRoutingHandle, GridSnapper, Point } from '@eclipse-glsp/client';
18
+ import { injectable } from 'inversify';
19
+
20
+ @injectable()
21
+ export class WorkflowSnapper extends GridSnapper {
22
+ override snap(position: Point, element: GModelElement): Point {
23
+ // we snap our edges to the center of the elements and our elements to the grid,
24
+ // so to allow for nicer angles and more fine-grained control, we allow routing points to be snapped half-grid
25
+ return element instanceof GRoutingHandle
26
+ ? Point.snapToGrid(position, Point.divideScalar(this.grid, 2))
27
+ : super.snap(position, element);
28
+ }
29
+ }
@@ -0,0 +1,30 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2024 EclipseSource 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
+
17
+ import { GridManager, IDiagramStartup } from '@eclipse-glsp/client';
18
+ import { MaybePromise } from '@eclipse-glsp/sprotty';
19
+ import { inject, injectable, optional } from 'inversify';
20
+
21
+ @injectable()
22
+ export class WorkflowStartup implements IDiagramStartup {
23
+ rank = -1;
24
+
25
+ @inject(GridManager) @optional() protected gridManager?: GridManager;
26
+
27
+ preRequestModel(): MaybePromise<void> {
28
+ this.gridManager?.setGridVisible(true);
29
+ }
30
+ }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2023 EclipseSource and others.
2
+ * Copyright (c) 2019-2024 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,16 +13,17 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
16
17
  import {
17
- angleOfPoint,
18
- findParentByFeature,
19
- getSubType,
18
+ GEdge,
20
19
  Point,
21
20
  PolylineEdgeViewWithGapsOnIntersections,
22
21
  RenderingContext,
23
- GEdge,
24
- setAttr,
25
22
  ShapeView,
23
+ angleOfPoint,
24
+ findParentByFeature,
25
+ getSubType,
26
+ setAttr,
26
27
  svg,
27
28
  toDegrees
28
29
  } from '@eclipse-glsp/client';
@@ -30,9 +31,6 @@ import { injectable } from 'inversify';
30
31
  import { VNode } from 'snabbdom';
31
32
  import { Icon, isTaskNode } from './model';
32
33
 
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
- const JSX = { createElement: svg };
35
-
36
34
  @injectable()
37
35
  export class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
38
36
  protected override renderAdditionals(edge: GEdge, segments: Point[], context: RenderingContext): VNode[] {
@@ -44,9 +42,7 @@ export class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
44
42
  class-sprotty-edge={true}
45
43
  class-arrow={true}
46
44
  d='M 1,0 L 10,-4 L 10,4 Z'
47
- transform={`rotate(${toDegrees(angleOfPoint({ x: p1.x - p2.x, y: p1.y - p2.y }))} ${p2.x} ${p2.y}) translate(${p2.x} ${
48
- p2.y
49
- })`}
45
+ transform={`rotate(${toDegrees(angleOfPoint(Point.subtract(p1, p2)))} ${p2.x} ${p2.y}) translate(${p2.x} ${p2.y})`}
50
46
  />
51
47
  );
52
48
  additionals.push(arrow);
@@ -1 +0,0 @@
1
- {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAiB,aAAa,EAAS,MAAM,sBAAsB,CAAC;AAG3E,eAAO,MAAM,gBAAgB,eAE3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA2E;AAC3E,6DAAkD;AAErC,QAAA,gBAAgB,GAAG,IAAI,sBAAa,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAC1E,IAAA,sBAAa,EAAC,IAAI,EAAE,cAAK,CAAC,YAAY,EAAE,+BAAU,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC"}