@eclipse-glsp-examples/workflow-server 2.1.0-next.77 → 2.1.0-next.78

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.
@@ -13,11 +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 { CreateNodeOperation, GNode, Point } from '@eclipse-glsp/server';
16
+ import { CreateNodeOperation, GNode, GhostElement, Point } from '@eclipse-glsp/server';
17
17
  import { ActivityNodeBuilder } from '../graph-extension';
18
18
  import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
19
19
  export declare abstract class CreateActivityNodeHandler extends CreateWorkflowNodeOperationHandler {
20
20
  createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
21
- protected builder(point: Point | undefined): ActivityNodeBuilder;
21
+ protected builder(point?: Point, elementTypeId?: string): ActivityNodeBuilder;
22
+ createTriggerGhostElement(elementTypeId: string): GhostElement | undefined;
22
23
  }
23
24
  //# sourceMappingURL=create-activity-node-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-activity-node-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-activity-node-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAgB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,yBAA0B,SAAQ,kCAAkC;IACtF,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,mBAAmB;CAMnE"}
1
+ {"version":3,"file":"create-activity-node-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-activity-node-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAgB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,yBAA0B,SAAQ,kCAAkC;IACtF,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,GAAE,KAAoB,EAAE,aAAa,SAAyB,GAAG,mBAAmB;IAOlG,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGtF"}
@@ -31,11 +31,14 @@ let CreateActivityNodeHandler = class CreateActivityNodeHandler extends create_w
31
31
  createNode(operation, relativeLocation) {
32
32
  return this.builder(relativeLocation).build();
33
33
  }
34
- builder(point) {
34
+ builder(point = server_1.Point.ORIGIN, elementTypeId = this.elementTypeIds[0]) {
35
35
  return graph_extension_1.ActivityNode.builder()
36
- .position(point !== null && point !== void 0 ? point : server_1.Point.ORIGIN)
37
- .type(this.elementTypeIds[0])
38
- .nodeType(model_types_1.ModelTypes.toNodeType(this.elementTypeIds[0]));
36
+ .position(point)
37
+ .type(elementTypeId)
38
+ .nodeType(model_types_1.ModelTypes.toNodeType(elementTypeId));
39
+ }
40
+ createTriggerGhostElement(elementTypeId) {
41
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()) };
39
42
  }
40
43
  };
41
44
  exports.CreateActivityNodeHandler = CreateActivityNodeHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"create-activity-node-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-activity-node-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAyE;AACzE,yCAAuC;AACvC,wDAAuE;AACvE,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,yBAAyB,GAAxC,MAAe,yBAA0B,SAAQ,2EAAkC;IACtF,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,KAAwB;QACtC,OAAO,8BAAY,CAAC,OAAO,EAAE;aACxB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,cAAK,CAAC,MAAM,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;aAC5B,QAAQ,CAAC,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AAXqB,8DAAyB;oCAAzB,yBAAyB;IAD9C,IAAA,sBAAU,GAAE;GACS,yBAAyB,CAW9C"}
1
+ {"version":3,"file":"create-activity-node-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-activity-node-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAuF;AACvF,yCAAuC;AACvC,wDAAuE;AACvE,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,yBAAyB,GAAxC,MAAe,yBAA0B,SAAQ,2EAAkC;IACtF,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,QAAe,cAAK,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QACjF,OAAO,8BAAY,CAAC,OAAO,EAAE;aACxB,QAAQ,CAAC,KAAK,CAAC;aACf,IAAI,CAAC,aAAa,CAAC;aACnB,QAAQ,CAAC,wBAAU,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IACxD,CAAC;IAEQ,yBAAyB,CAAC,aAAqB;QACpD,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;IACtG,CAAC;CACJ,CAAA;AAfqB,8DAAyB;oCAAzB,yBAAyB;IAD9C,IAAA,sBAAU,GAAE;GACS,yBAAyB,CAe9C"}
@@ -13,13 +13,14 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { CreateNodeOperation, GNode, Point } from '@eclipse-glsp/server';
16
+ import { CreateNodeOperation, GNode, GhostElement, Point } from '@eclipse-glsp/server';
17
17
  import { CategoryNodeBuilder } from '../graph-extension';
18
18
  import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
19
19
  export declare class CreateCategoryHandler extends CreateWorkflowNodeOperationHandler {
20
20
  elementTypeIds: string[];
21
21
  label: string;
22
22
  createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
23
- protected builder(point: Point | undefined): CategoryNodeBuilder;
23
+ protected builder(point?: Point, elementTypeId?: string): CategoryNodeBuilder;
24
+ createTriggerGhostElement(elementTypeId: string): GhostElement | undefined;
24
25
  }
25
26
  //# sourceMappingURL=create-category-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-category-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-category-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAY,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAY,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,qBAAa,qBAAsB,SAAQ,kCAAkC;IACzE,cAAc,WAAyB;IACvC,KAAK,SAAc;IAEnB,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,mBAAmB;CAQnE"}
1
+ {"version":3,"file":"create-category-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-category-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAY,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAY,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,qBAAa,qBAAsB,SAAQ,kCAAkC;IACzE,cAAc,WAAyB;IACvC,KAAK,SAAc;IAEnB,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,GAAE,KAAoB,EAAE,aAAa,SAAyB,GAAG,mBAAmB;IASlG,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGtF"}
@@ -29,14 +29,17 @@ class CreateCategoryHandler extends create_workflow_node_operation_handler_1.Cre
29
29
  createNode(operation, relativeLocation) {
30
30
  return this.builder(relativeLocation).build();
31
31
  }
32
- builder(point) {
32
+ builder(point = server_1.Point.ORIGIN, elementTypeId = this.elementTypeIds[0]) {
33
33
  return graph_extension_1.Category.builder()
34
- .type(this.elementTypeIds[0])
35
- .position(point !== null && point !== void 0 ? point : server_1.Point.ORIGIN)
34
+ .type(elementTypeId)
35
+ .position(point)
36
36
  .name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(graph_extension_1.Category).length)
37
37
  .addArgs(server_1.ArgsUtil.cornerRadius(5))
38
38
  .children();
39
39
  }
40
+ createTriggerGhostElement(elementTypeId) {
41
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()), dynamic: true };
42
+ }
40
43
  }
41
44
  exports.CreateCategoryHandler = CreateCategoryHandler;
42
45
  //# sourceMappingURL=create-category-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-category-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-category-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAmF;AACnF,wDAAmE;AACnE,qDAAiD;AACjD,qGAA8F;AAE9F,MAAa,qBAAsB,SAAQ,2EAAkC;IAA7E;;QACI,mBAAc,GAAG,CAAC,wBAAU,CAAC,QAAQ,CAAC,CAAC;QACvC,UAAK,GAAG,UAAU,CAAC;IAcvB,CAAC;IAZG,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,KAAwB;QACtC,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;aAC5B,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,cAAK,CAAC,MAAM,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,0BAAQ,CAAC,CAAC,MAAM,CAAC;aACxF,OAAO,CAAC,iBAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;aACjC,QAAQ,EAAE,CAAC;IACpB,CAAC;CACJ;AAhBD,sDAgBC"}
1
+ {"version":3,"file":"create-category-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-category-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAiG;AACjG,wDAAmE;AACnE,qDAAiD;AACjD,qGAA8F;AAE9F,MAAa,qBAAsB,SAAQ,2EAAkC;IAA7E;;QACI,mBAAc,GAAG,CAAC,wBAAU,CAAC,QAAQ,CAAC,CAAC;QACvC,UAAK,GAAG,UAAU,CAAC;IAkBvB,CAAC;IAhBG,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,QAAe,cAAK,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QACjF,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,IAAI,CAAC,aAAa,CAAC;aACnB,QAAQ,CAAC,KAAK,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,0BAAQ,CAAC,CAAC,MAAM,CAAC;aACxF,OAAO,CAAC,iBAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;aACjC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAEQ,yBAAyB,CAAC,aAAqB;QACpD,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACrH,CAAC;CACJ;AApBD,sDAoBC"}
@@ -13,12 +13,13 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { Point } from '@eclipse-glsp/protocol';
16
+ import { GhostElement, Point } from '@eclipse-glsp/protocol';
17
17
  import { CreateNodeOperation, GNode } from '@eclipse-glsp/server';
18
18
  import { TaskNodeBuilder } from '../graph-extension';
19
19
  import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
20
20
  export declare abstract class CreateTaskHandler extends CreateWorkflowNodeOperationHandler {
21
21
  createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
22
- protected builder(point: Point | undefined): TaskNodeBuilder;
22
+ protected builder(point?: Point, elementTypeId?: string): TaskNodeBuilder;
23
+ createTriggerGhostElement(elementTypeId: string): GhostElement | undefined;
23
24
  }
24
25
  //# sourceMappingURL=create-task-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-task-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAY,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,iBAAkB,SAAQ,kCAAkC;IAC9E,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,eAAe;CAQ/D"}
1
+ {"version":3,"file":"create-task-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAY,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,8BACsB,iBAAkB,SAAQ,kCAAkC;IAC9E,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,GAAE,KAAoB,EAAE,aAAa,SAAyB,GAAG,eAAe;IAS9F,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGtF"}
@@ -31,14 +31,17 @@ let CreateTaskHandler = class CreateTaskHandler extends create_workflow_node_ope
31
31
  createNode(operation, relativeLocation) {
32
32
  return this.builder(relativeLocation).build();
33
33
  }
34
- builder(point) {
34
+ builder(point = protocol_1.Point.ORIGIN, elementTypeId = this.elementTypeIds[0]) {
35
35
  return graph_extension_1.TaskNode.builder()
36
36
  .position(point !== null && point !== void 0 ? point : protocol_1.Point.ORIGIN)
37
37
  .name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(graph_extension_1.TaskNode).length)
38
- .type(this.elementTypeIds[0])
39
- .taskType(model_types_1.ModelTypes.toNodeType(this.elementTypeIds[0]))
38
+ .type(elementTypeId)
39
+ .taskType(model_types_1.ModelTypes.toNodeType(elementTypeId))
40
40
  .children();
41
41
  }
42
+ createTriggerGhostElement(elementTypeId) {
43
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()), dynamic: true };
44
+ }
42
45
  };
43
46
  exports.CreateTaskHandler = CreateTaskHandler;
44
47
  exports.CreateTaskHandler = CreateTaskHandler = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"create-task-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA+C;AAE/C,yCAAuC;AACvC,wDAA+D;AAC/D,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,iBAAiB,GAAhC,MAAe,iBAAkB,SAAQ,2EAAkC;IAC9E,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,KAAwB;QACtC,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,gBAAK,CAAC,MAAM,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,0BAAQ,CAAC,CAAC,MAAM,CAAC;aACxF,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;aAC5B,QAAQ,CAAC,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;aACvD,QAAQ,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AAbqB,8CAAiB;4BAAjB,iBAAiB;IADtC,IAAA,sBAAU,GAAE;GACS,iBAAiB,CAatC"}
1
+ {"version":3,"file":"create-task-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-task-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA6D;AAE7D,yCAAuC;AACvC,wDAA+D;AAC/D,qDAAiD;AACjD,qGAA8F;AAGvF,IAAe,iBAAiB,GAAhC,MAAe,iBAAkB,SAAQ,2EAAkC;IAC9E,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,QAAe,gBAAK,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QACjF,OAAO,0BAAQ,CAAC,OAAO,EAAE;aACpB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,gBAAK,CAAC,MAAM,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,0BAAQ,CAAC,CAAC,MAAM,CAAC;aACxF,IAAI,CAAC,aAAa,CAAC;aACnB,QAAQ,CAAC,wBAAU,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;aAC9C,QAAQ,EAAE,CAAC;IACpB,CAAC;IAEQ,yBAAyB,CAAC,aAAqB;QACpD,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACrH,CAAC;CACJ,CAAA;AAjBqB,8CAAiB;4BAAjB,iBAAiB;IADtC,IAAA,sBAAU,GAAE;GACS,iBAAiB,CAiBtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp-examples/workflow-server",
3
- "version": "2.1.0-next.77+1a0997e",
3
+ "version": "2.1.0-next.78+6db8ac8",
4
4
  "description": "GLSP node server for the workflow example",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -56,8 +56,8 @@
56
56
  "watch": "tsc -w"
57
57
  },
58
58
  "dependencies": {
59
- "@eclipse-glsp/layout-elk": "2.1.0-next.77+1a0997e",
60
- "@eclipse-glsp/server": "2.1.0-next.77+1a0997e",
59
+ "@eclipse-glsp/layout-elk": "2.1.0-next.78+6db8ac8",
60
+ "@eclipse-glsp/server": "2.1.0-next.78+6db8ac8",
61
61
  "inversify": "^6.0.1"
62
62
  },
63
63
  "devDependencies": {
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "1a0997e056ff19b4435fa94e9ccda5f3957ed199"
71
+ "gitHead": "6db8ac875b2714c17b314db076ca8edfc92706e5"
72
72
  }
@@ -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 { CreateNodeOperation, GNode, Point } from '@eclipse-glsp/server';
16
+ import { CreateNodeOperation, GNode, GhostElement, Point } from '@eclipse-glsp/server';
17
17
  import { injectable } from 'inversify';
18
18
  import { ActivityNode, ActivityNodeBuilder } from '../graph-extension';
19
19
  import { ModelTypes } from '../util/model-types';
@@ -25,10 +25,14 @@ export abstract class CreateActivityNodeHandler extends CreateWorkflowNodeOperat
25
25
  return this.builder(relativeLocation).build();
26
26
  }
27
27
 
28
- protected builder(point: Point | undefined): ActivityNodeBuilder {
28
+ protected builder(point: Point = Point.ORIGIN, elementTypeId = this.elementTypeIds[0]): ActivityNodeBuilder {
29
29
  return ActivityNode.builder()
30
- .position(point ?? Point.ORIGIN)
31
- .type(this.elementTypeIds[0])
32
- .nodeType(ModelTypes.toNodeType(this.elementTypeIds[0]));
30
+ .position(point)
31
+ .type(elementTypeId)
32
+ .nodeType(ModelTypes.toNodeType(elementTypeId));
33
+ }
34
+
35
+ override createTriggerGhostElement(elementTypeId: string): GhostElement | undefined {
36
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()) };
33
37
  }
34
38
  }
@@ -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 { ArgsUtil, CreateNodeOperation, GNode, Point } from '@eclipse-glsp/server';
16
+ import { ArgsUtil, CreateNodeOperation, GNode, GhostElement, Point } from '@eclipse-glsp/server';
17
17
  import { Category, CategoryNodeBuilder } from '../graph-extension';
18
18
  import { ModelTypes } from '../util/model-types';
19
19
  import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
@@ -26,12 +26,16 @@ export class CreateCategoryHandler extends CreateWorkflowNodeOperationHandler {
26
26
  return this.builder(relativeLocation).build();
27
27
  }
28
28
 
29
- protected builder(point: Point | undefined): CategoryNodeBuilder {
29
+ protected builder(point: Point = Point.ORIGIN, elementTypeId = this.elementTypeIds[0]): CategoryNodeBuilder {
30
30
  return Category.builder()
31
- .type(this.elementTypeIds[0])
32
- .position(point ?? Point.ORIGIN)
31
+ .type(elementTypeId)
32
+ .position(point)
33
33
  .name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(Category).length)
34
34
  .addArgs(ArgsUtil.cornerRadius(5))
35
35
  .children();
36
36
  }
37
+
38
+ override createTriggerGhostElement(elementTypeId: string): GhostElement | undefined {
39
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()), dynamic: true };
40
+ }
37
41
  }
@@ -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 { Point } from '@eclipse-glsp/protocol';
16
+ import { GhostElement, Point } from '@eclipse-glsp/protocol';
17
17
  import { CreateNodeOperation, GNode } from '@eclipse-glsp/server';
18
18
  import { injectable } from 'inversify';
19
19
  import { TaskNode, TaskNodeBuilder } from '../graph-extension';
@@ -26,12 +26,16 @@ export abstract class CreateTaskHandler extends CreateWorkflowNodeOperationHandl
26
26
  return this.builder(relativeLocation).build();
27
27
  }
28
28
 
29
- protected builder(point: Point | undefined): TaskNodeBuilder {
29
+ protected builder(point: Point = Point.ORIGIN, elementTypeId = this.elementTypeIds[0]): TaskNodeBuilder {
30
30
  return TaskNode.builder()
31
31
  .position(point ?? Point.ORIGIN)
32
32
  .name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(TaskNode).length)
33
- .type(this.elementTypeIds[0])
34
- .taskType(ModelTypes.toNodeType(this.elementTypeIds[0]))
33
+ .type(elementTypeId)
34
+ .taskType(ModelTypes.toNodeType(elementTypeId))
35
35
  .children();
36
36
  }
37
+
38
+ override createTriggerGhostElement(elementTypeId: string): GhostElement | undefined {
39
+ return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()), dynamic: true };
40
+ }
37
41
  }