@eclipse-glsp-examples/workflow-server-bundled 2.4.0-next.118 → 2.4.0-next.119
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/package.json +2 -2
- package/wf-glsp-server-node.js +38 -8
- package/wf-glsp-server-node.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server-bundled",
|
|
3
|
-
"version": "2.4.0-next.
|
|
3
|
+
"version": "2.4.0-next.119+86e89a1",
|
|
4
4
|
"description": "GLSP node server for the workflow example (bundled)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "86e89a196104c33a8121ecbb17390c0e3520a9bd"
|
|
53
53
|
}
|
package/wf-glsp-server-node.js
CHANGED
|
@@ -64553,7 +64553,22 @@ let GModelChangeBoundsOperationHandler = class GModelChangeBoundsOperationHandle
|
|
|
64553
64553
|
this.operationType = protocol_1.ChangeBoundsOperation.KIND;
|
|
64554
64554
|
}
|
|
64555
64555
|
createCommand(operation) {
|
|
64556
|
-
|
|
64556
|
+
const newBounds = operation.newBounds.filter(element => this.hasChanged(element));
|
|
64557
|
+
if (newBounds.length === 0) {
|
|
64558
|
+
return undefined;
|
|
64559
|
+
}
|
|
64560
|
+
return this.commandOf(() => this.executeChangeBounds({ ...operation, newBounds }));
|
|
64561
|
+
}
|
|
64562
|
+
hasChanged(element) {
|
|
64563
|
+
const knownElement = this.modelState.index.find(element.elementId);
|
|
64564
|
+
if (!knownElement || !(0, graph_1.isGBoundsAware)(knownElement)) {
|
|
64565
|
+
return true;
|
|
64566
|
+
}
|
|
64567
|
+
const sizeChanged = knownElement.size ? !protocol_1.Dimension.equals(knownElement.size, element.newSize) : true;
|
|
64568
|
+
if (sizeChanged) {
|
|
64569
|
+
return true;
|
|
64570
|
+
}
|
|
64571
|
+
return knownElement.position && element.newPosition ? !protocol_1.Point.equals(knownElement.position, element.newPosition) : true;
|
|
64557
64572
|
}
|
|
64558
64573
|
executeChangeBounds(operation) {
|
|
64559
64574
|
for (const element of operation.newBounds) {
|
|
@@ -64621,9 +64636,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
64621
64636
|
};
|
|
64622
64637
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64623
64638
|
exports.GModelChangeRoutingPointsOperationHandler = void 0;
|
|
64639
|
+
const graph_1 = __webpack_require__(/*! @eclipse-glsp/graph */ "../../packages/graph/lib/index.js");
|
|
64624
64640
|
const protocol_1 = __webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js");
|
|
64625
64641
|
const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/lib/cjs/index.js");
|
|
64626
|
-
const glsp_server_error_1 = __webpack_require__(/*! ../utils/glsp-server-error */ "../../packages/server/lib/common/utils/glsp-server-error.js");
|
|
64627
64642
|
const layout_util_1 = __webpack_require__(/*! ../utils/layout-util */ "../../packages/server/lib/common/utils/layout-util.js");
|
|
64628
64643
|
const gmodel_operation_handler_1 = __webpack_require__(/*! ./gmodel-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-operation-handler.js");
|
|
64629
64644
|
let GModelChangeRoutingPointsOperationHandler = class GModelChangeRoutingPointsOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
@@ -64632,12 +64647,26 @@ let GModelChangeRoutingPointsOperationHandler = class GModelChangeRoutingPointsO
|
|
|
64632
64647
|
this.operationType = protocol_1.ChangeRoutingPointsOperation.KIND;
|
|
64633
64648
|
}
|
|
64634
64649
|
createCommand(operation) {
|
|
64635
|
-
|
|
64650
|
+
const newRoutingPoints = operation.newRoutingPoints.filter(newRoutingPoints => this.hasChanged(newRoutingPoints));
|
|
64651
|
+
if (newRoutingPoints.length === 0) {
|
|
64652
|
+
return undefined;
|
|
64653
|
+
}
|
|
64654
|
+
return this.commandOf(() => this.executeChangeRoutingPoints({ ...operation, newRoutingPoints }));
|
|
64636
64655
|
}
|
|
64637
|
-
|
|
64638
|
-
|
|
64639
|
-
|
|
64656
|
+
hasChanged(element) {
|
|
64657
|
+
var _a;
|
|
64658
|
+
const knownElement = this.modelState.index.findByClass(element.elementId, graph_1.GEdge);
|
|
64659
|
+
if (!knownElement || knownElement.routingPoints.length !== ((_a = element.newRoutingPoints) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
64660
|
+
return true;
|
|
64661
|
+
}
|
|
64662
|
+
for (let i = 0; i < knownElement.routingPoints.length; i++) {
|
|
64663
|
+
if (!protocol_1.Point.equals(knownElement.routingPoints[i], element.newRoutingPoints[i])) {
|
|
64664
|
+
return true;
|
|
64665
|
+
}
|
|
64640
64666
|
}
|
|
64667
|
+
return false;
|
|
64668
|
+
}
|
|
64669
|
+
executeChangeRoutingPoints(operation) {
|
|
64641
64670
|
const index = this.modelState.index;
|
|
64642
64671
|
operation.newRoutingPoints.forEach(routingPoints => (0, layout_util_1.applyRoutingPoints)(routingPoints, index));
|
|
64643
64672
|
}
|
|
@@ -65775,7 +65804,7 @@ let CompoundOperationHandler = class CompoundOperationHandler extends operation_
|
|
|
65775
65804
|
commands.push(command);
|
|
65776
65805
|
}
|
|
65777
65806
|
}
|
|
65778
|
-
return new command_1.CompoundCommand(commands);
|
|
65807
|
+
return commands.length > 0 ? new command_1.CompoundCommand(commands) : undefined;
|
|
65779
65808
|
}
|
|
65780
65809
|
};
|
|
65781
65810
|
exports.CompoundOperationHandler = CompoundOperationHandler;
|
|
@@ -66048,8 +66077,9 @@ let OperationActionHandler = OperationActionHandler_1 = class OperationActionHan
|
|
|
66048
66077
|
const command = await handler.execute(operation);
|
|
66049
66078
|
if (command) {
|
|
66050
66079
|
await this.executeCommand(command);
|
|
66080
|
+
return this.submitModel();
|
|
66051
66081
|
}
|
|
66052
|
-
return
|
|
66082
|
+
return [];
|
|
66053
66083
|
}
|
|
66054
66084
|
async executeCommand(command) {
|
|
66055
66085
|
return this.commandStack.execute(command);
|