@eclipse-glsp/protocol 2.7.0-next.0 → 2.7.0-next.11
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/action-protocol/model-layout.d.ts +1 -1
- package/lib/action-protocol/types.d.ts +1 -1
- package/lib/client-server-protocol/glsp-client.d.ts.map +1 -1
- package/lib/client-server-protocol/glsp-client.js +3 -4
- package/lib/client-server-protocol/glsp-client.js.map +1 -1
- package/lib/client-server-protocol/jsonrpc/glsp-jsonrpc-client.d.ts +1 -1
- package/lib/client-server-protocol/jsonrpc/glsp-jsonrpc-client.d.ts.map +1 -1
- package/lib/client-server-protocol/jsonrpc/glsp-jsonrpc-client.js +1 -2
- package/lib/client-server-protocol/jsonrpc/glsp-jsonrpc-client.js.map +1 -1
- package/lib/di/feature-module.d.ts +1 -1
- package/lib/di/feature-module.d.ts.map +1 -1
- package/lib/di/feature-module.js +2 -4
- package/lib/di/feature-module.js.map +1 -1
- package/lib/sprotty-geometry-point.d.ts +29 -1
- package/lib/sprotty-geometry-point.d.ts.map +1 -1
- package/lib/sprotty-geometry-point.js +4 -1
- package/lib/sprotty-geometry-point.js.map +1 -1
- package/lib/utils/disposable.d.ts +1 -1
- package/lib/utils/disposable.d.ts.map +1 -1
- package/lib/utils/disposable.js +0 -1
- package/lib/utils/disposable.js.map +1 -1
- package/lib/utils/math-util.d.ts +6 -1
- package/lib/utils/math-util.d.ts.map +1 -1
- package/lib/utils/math-util.js +7 -1
- package/lib/utils/math-util.js.map +1 -1
- package/lib/utils/type-util.d.ts +1 -1
- package/lib/utils/type-util.js +1 -1
- package/package.json +3 -3
- package/src/action-protocol/base-protocol.spec.ts +2 -2
- package/src/action-protocol/client-notification.spec.ts +2 -2
- package/src/action-protocol/clipboard.spec.ts +2 -2
- package/src/action-protocol/contexts.spec.ts +2 -2
- package/src/action-protocol/edge-modification.spec.ts +2 -2
- package/src/action-protocol/element-creation.spec.ts +2 -2
- package/src/action-protocol/element-hover.spec.ts +2 -2
- package/src/action-protocol/element-navigation.spec.ts +2 -2
- package/src/action-protocol/element-selection.spec.ts +2 -2
- package/src/action-protocol/element-text-editing.spec.ts +2 -2
- package/src/action-protocol/element-type-hints.spec.ts +2 -2
- package/src/action-protocol/element-validation.spec.ts +2 -2
- package/src/action-protocol/model-data.spec.ts +2 -2
- package/src/action-protocol/model-layout.spec.ts +2 -2
- package/src/action-protocol/model-layout.ts +1 -1
- package/src/action-protocol/model-saving.spec.ts +1 -2
- package/src/action-protocol/node-modification.spec.ts +2 -2
- package/src/action-protocol/tool-palette.spec.ts +2 -2
- package/src/action-protocol/types.ts +1 -1
- package/src/action-protocol/viewport.spec.ts +2 -2
- package/src/client-server-protocol/base-glsp-client.spec.ts +4 -5
- package/src/client-server-protocol/glsp-client.ts +3 -4
- package/src/client-server-protocol/jsonrpc/base-jsonrpc-glsp-client.spec.ts +2 -3
- package/src/client-server-protocol/jsonrpc/glsp-jsonrpc-client.ts +1 -2
- package/src/di/container-configuration.spec.ts +2 -2
- package/src/di/feature-module.ts +1 -2
- package/src/sprotty-geometry-point.spec.ts +48 -1
- package/src/sprotty-geometry-point.ts +38 -2
- package/src/utils/disposable.ts +1 -2
- package/src/utils/math-util.ts +7 -1
- package/src/utils/type-util.spec.ts +1 -3
- package/src/utils/type-util.ts +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 STMicroelectronics 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 STMicroelectronics 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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-client.d.ts","sourceRoot":"","sources":["../../src/client-server-protocol/glsp-client.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,8BAA8B,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpI,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAS;IACvC,MAAM,CAAC,GAAG,IAAI,MAAM;CAMvB;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;AAEpE,oBAAY,WAAW;IACnB;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,WAAW,IAAA;IACX;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,WAAW,IAAA;CACd;AAED,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAEnD;;;;;;OAMG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE1E;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,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AiB,OAAO;QACpB,EAAE,EAAE,MAAM,CAAC;KACd;IAED,SAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,OAAO,CAE5D;IAEM,MAAM,eAAe,UAAU,CAAC;CAC1C"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GLSPClient = exports.ClientState = exports.ApplicationIdProvider = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2020-
|
|
5
|
+
* Copyright (c) 2020-2026 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
|
|
@@ -16,12 +16,12 @@ exports.GLSPClient = exports.ClientState = exports.ApplicationIdProvider = void
|
|
|
16
16
|
*
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
|
-
const
|
|
19
|
+
const uuid_1 = require("uuid");
|
|
20
20
|
const type_util_1 = require("../utils/type-util");
|
|
21
21
|
class ApplicationIdProvider {
|
|
22
22
|
static get() {
|
|
23
23
|
if (!ApplicationIdProvider._applicationId) {
|
|
24
|
-
ApplicationIdProvider._applicationId =
|
|
24
|
+
ApplicationIdProvider._applicationId = (0, uuid_1.v4)();
|
|
25
25
|
}
|
|
26
26
|
return ApplicationIdProvider._applicationId;
|
|
27
27
|
}
|
|
@@ -60,7 +60,6 @@ var ClientState;
|
|
|
60
60
|
})(ClientState || (exports.ClientState = ClientState = {}));
|
|
61
61
|
var GLSPClient;
|
|
62
62
|
(function (GLSPClient) {
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
64
63
|
function isOptions(object) {
|
|
65
64
|
return type_util_1.AnyObject.is(object) && (0, type_util_1.hasStringProp)(object, 'id');
|
|
66
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-client.js","sourceRoot":"","sources":["../../src/client-server-protocol/glsp-client.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF
|
|
1
|
+
{"version":3,"file":"glsp-client.js","sourceRoot":"","sources":["../../src/client-server-protocol/glsp-client.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAAkC;AAKlC,kDAA8D;AAG9D,MAAa,qBAAqB;IAE9B,MAAM,CAAC,GAAG;QACN,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;YACxC,qBAAqB,CAAC,cAAc,GAAG,IAAA,SAAI,GAAE,CAAC;QAClD,CAAC;QACD,OAAO,qBAAqB,CAAC,cAAc,CAAC;IAChD,CAAC;CACJ;AARD,sDAQC;AAID,IAAY,WA6BX;AA7BD,WAAY,WAAW;IACnB;;OAEG;IACH,mDAAO,CAAA;IACP;;OAEG;IACH,qDAAQ,CAAA;IACR;;OAEG;IACH,2DAAW,CAAA;IACX;;OAEG;IACH,mDAAO,CAAA;IACP;;OAEG;IACH,qDAAQ,CAAA;IACR;;OAEG;IACH,mDAAO,CAAA;IACP;;OAEG;IACH,2DAAW,CAAA;AACf,CAAC,EA7BW,WAAW,2BAAX,WAAW,QA6BtB;AAmGD,IAAiB,UAAU,CAU1B;AAVD,WAAiB,UAAU;IAKvB,SAAgB,SAAS,CAAC,MAAe;QACrC,OAAO,qBAAS,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAA,yBAAa,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;IAFe,oBAAS,YAExB,CAAA;IAEY,0BAAe,GAAG,OAAO,CAAC;AAC3C,CAAC,EAVgB,UAAU,0BAAV,UAAU,QAU1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2026 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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-jsonrpc-client.d.ts","sourceRoot":"","sources":["../../../src/client-server-protocol/jsonrpc/glsp-jsonrpc-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAErI,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,CAAC,MAAM,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE7F,yBAAiB,iBAAiB,CAAC;IAC/B,UAAiB,OAAQ,SAAQ,UAAU,CAAC,OAAO;QAC/C,kBAAkB,EAAE,kBAAkB,CAAC;KAC1C;
|
|
1
|
+
{"version":3,"file":"glsp-jsonrpc-client.d.ts","sourceRoot":"","sources":["../../../src/client-server-protocol/jsonrpc/glsp-jsonrpc-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAErI,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,CAAC,MAAM,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE7F,yBAAiB,iBAAiB,CAAC;IAC/B,UAAiB,OAAQ,SAAQ,UAAU,CAAC,OAAO;QAC/C,kBAAkB,EAAE,kBAAkB,CAAC;KAC1C;IAED,SAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,OAAO,CAE5D;IAEM,MAAM,yBAAyB,uFAAiD,CAAC;IACjF,MAAM,iBAAiB,2DAA8E,CAAC;IACtG,MAAM,8BAA8B,4DAA4F,CAAC;IACjI,MAAM,2BAA2B,yDAAsF,CAAC;IAExH,MAAM,oBAAoB,mBAAoC,CAAC;IAC/D,MAAM,iBAAiB,uCAAuC,CAAC;IAEtE,SAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI,CAEzE;CACJ"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JsonrpcGLSPClient = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2020-
|
|
5
|
+
* Copyright (c) 2020-2026 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
|
|
@@ -20,7 +20,6 @@ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
|
20
20
|
const glsp_client_1 = require("../glsp-client");
|
|
21
21
|
var JsonrpcGLSPClient;
|
|
22
22
|
(function (JsonrpcGLSPClient) {
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
24
23
|
function isOptions(object) {
|
|
25
24
|
return glsp_client_1.GLSPClient.isOptions(object) && 'connectionProvider' in object;
|
|
26
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-jsonrpc-client.js","sourceRoot":"","sources":["../../../src/client-server-protocol/jsonrpc/glsp-jsonrpc-client.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqG;AAGrG,gDAA4C;AAK5C,IAAiB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"glsp-jsonrpc-client.js","sourceRoot":"","sources":["../../../src/client-server-protocol/jsonrpc/glsp-jsonrpc-client.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqG;AAGrG,gDAA4C;AAK5C,IAAiB,iBAAiB,CAoBjC;AApBD,WAAiB,iBAAiB;IAK9B,SAAgB,SAAS,CAAC,MAAe;QACrC,OAAO,wBAAU,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,oBAAoB,IAAI,MAAM,CAAC;IAC1E,CAAC;IAFe,2BAAS,YAExB,CAAA;IAEY,2CAAyB,GAAG,IAAI,iCAAgB,CAAgB,SAAS,CAAC,CAAC;IAC3E,mCAAiB,GAAG,IAAI,4BAAW,CAA+C,YAAY,CAAC,CAAC;IAChG,gDAA8B,GAAG,IAAI,4BAAW,CAAgD,yBAAyB,CAAC,CAAC;IAC3H,6CAA2B,GAAG,IAAI,4BAAW,CAA6C,sBAAsB,CAAC,CAAC;IAElH,sCAAoB,GAAG,IAAI,kCAAiB,CAAC,UAAU,CAAC,CAAC;IACzD,mCAAiB,GAAG,oCAAoC,CAAC;IAEtE,SAAgB,KAAK,CAAC,OAAe,EAAE,GAAG,cAAyB;QAC/D,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;IACpE,CAAC;IAFe,uBAAK,QAEpB,CAAA;AACL,CAAC,EApBgB,iBAAiB,iCAAjB,iBAAiB,QAoBjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-module.d.ts","sourceRoot":"","sources":["../../src/di/feature-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,UAAU,EAAW,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AAEH,qBAAa,aAAc,SAAQ,eAAe;IAC9C;;;OAGG;IACH,OAAc,iBAAiB,UAAS;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;gBAElC,QAAQ,EAAE,UAAU,CAAC,uBAAuB,EAAE,OAAO,GAAE,oBAAyB;IAW5F,SAAS,CAAC,eAAe,IAAI,MAAM;IAInC;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,GAAG,OAAO;IAetE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAMjE;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,U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strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2023-
|
|
3
|
+
* Copyright (c) 2023-2026 EclipseSource and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -78,9 +78,7 @@ class FeatureModule extends inversify_1.ContainerModule {
|
|
|
78
78
|
}
|
|
79
79
|
const missing = requires.filter(module => !module.isLoaded({ isBound }));
|
|
80
80
|
if (missing.length > 0) {
|
|
81
|
-
this.debugLog(
|
|
82
|
-
// eslint-disable-next-line max-len
|
|
83
|
-
`Could not load feature module. Required modules are not loaded. Feature ids: ${missing.map(m => m.featureId.toString()).join(', ')}`);
|
|
81
|
+
this.debugLog(`Could not load feature module. Required modules are not loaded. Feature ids: ${missing.map(m => m.featureId.toString()).join(', ')}`);
|
|
84
82
|
return false;
|
|
85
83
|
}
|
|
86
84
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-module.js","sourceRoot":"","sources":["../../src/di/feature-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAAwD;AACxD,oDAA0D;AAiB1D;;;;;GAKG;AAEH,MAAa,aAAc,SAAQ,2BAAe;IAU9C,YAAY,QAA4C,EAAE,UAAgC,EAAE;;QACxF,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE;YACrC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;gBAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;gBACzC,IAAI,CAAC,QAAQ,CAAC,sCAAsC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;YAChG,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,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AAC;QACzE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CACT,gFAAgF,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxI,CAAC;YACF,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,OAAwC;QAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;;AA3EL,sCA4EC;AA3EG;;;GAGG;AACW,+BAAiB,GAAG,KAAK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2024-2026 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
|
|
@@ -102,6 +102,34 @@ declare module 'sprotty-protocol/lib/utils/geometry' {
|
|
|
102
102
|
* @returns the movement from `from` in the `vector` direction
|
|
103
103
|
*/
|
|
104
104
|
function moveTowards(from: Point, vector: Vector): Movement;
|
|
105
|
+
/**
|
|
106
|
+
* Returns whether the given points are vertically aligned, i.e. they
|
|
107
|
+
* share (approximately) the same x coordinate.
|
|
108
|
+
*
|
|
109
|
+
* @param a first point
|
|
110
|
+
* @param b second point
|
|
111
|
+
* @param eps tolerance on the x axis (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
112
|
+
*/
|
|
113
|
+
function isVerticalAligned(a: Point, b: Point, eps?: number): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Returns whether the given points are horizontally aligned, i.e. they
|
|
116
|
+
* share (approximately) the same y coordinate.
|
|
117
|
+
*
|
|
118
|
+
* @param a first point
|
|
119
|
+
* @param b second point
|
|
120
|
+
* @param eps tolerance on the y axis (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
121
|
+
*/
|
|
122
|
+
function isHorizontalAligned(a: Point, b: Point, eps?: number): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Returns whether the given points are axis-aligned, i.e. either
|
|
125
|
+
* {@link isVerticalAligned vertically} or
|
|
126
|
+
* {@link isHorizontalAligned horizontally} aligned.
|
|
127
|
+
*
|
|
128
|
+
* @param a first point
|
|
129
|
+
* @param b second point
|
|
130
|
+
* @param eps tolerance (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
131
|
+
*/
|
|
132
|
+
function isAxisAligned(a: Point, b: Point, eps?: number): boolean;
|
|
105
133
|
}
|
|
106
134
|
}
|
|
107
135
|
export { Point };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprotty-geometry-point.d.ts","sourceRoot":"","sources":["../src/sprotty-geometry-point.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD,OAAO,QAAQ,qCAAqC,CAAC;IACjD,UAAU,KAAK,CAAC;QACZ;;;WAGG;QACH,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,KAAK,CAAC;QACxC;;;;WAIG;QACH,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;QACzC;;;;WAIG;QACH,SAAS,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC;QAEhD;;;;;WAKG;QACH,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,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QACH,SAAS,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;QAE5D;;;;;;;WAOG;QACH,SAAS,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAEtE;;;;;;;WAOG;QACH,SAAS,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAExE;;;;;;;;WAQG;QACH,SAAS,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACrE;CACJ;AA4CD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
* Copyright (c) 2024-2026 EclipseSource and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -56,4 +56,7 @@ geometry_1.Point.moveTowards = (from, vector) => {
|
|
|
56
56
|
return { from, to, vector, direction: dir };
|
|
57
57
|
};
|
|
58
58
|
geometry_1.Point.equals = (one, other, eps) => (0, math_util_1.equalUpTo)(one.x, other.x, eps) && (0, math_util_1.equalUpTo)(one.y, other.y, eps);
|
|
59
|
+
geometry_1.Point.isVerticalAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => (0, math_util_1.equalUpTo)(a.x, b.x, eps);
|
|
60
|
+
geometry_1.Point.isHorizontalAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => (0, math_util_1.equalUpTo)(a.y, b.y, eps);
|
|
61
|
+
geometry_1.Point.isAxisAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => geometry_1.Point.isVerticalAligned(a, b, eps) || geometry_1.Point.isHorizontalAligned(a, b, eps);
|
|
59
62
|
//# sourceMappingURL=sprotty-geometry-point.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprotty-geometry-point.js","sourceRoot":"","sources":["../src/sprotty-geometry-point.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAiD;;;AAEjD,kEAA4D;
|
|
1
|
+
{"version":3,"file":"sprotty-geometry-point.js","sourceRoot":"","sources":["../src/sprotty-geometry-point.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAiD;;;AAEjD,kEAA4D;AA8KnD,sFA9KA,gBAAK,OA8KA;AA5Kd,6DAAiD;AACjD,iDAAoE;AACpE,iDAA6D;AAgI7D,gBAAK,CAAC,EAAE,GAAG,CAAC,KAAU,EAAkB,EAAE,CAAC,qBAAS,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,IAAA,yBAAa,EAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAA,yBAAa,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACzH,gBAAK,CAAC,QAAQ,GAAG,CAAC,KAAY,EAAW,EAAE,CAAC,gBAAK,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAK,CAAC,MAAM,CAAC,CAAC;AAC9E,gBAAK,CAAC,OAAO,GAAG,CAAC,KAAa,EAAkB,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7G,gBAAK,CAAC,GAAG,GAAG,CAAC,KAAY,EAAS,EAAE,CAAC,gBAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE,gBAAK,CAAC,YAAY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E,CAAQ,EAAE,MAAc,gCAAoB,EAAW,EAAE,CAAC,IAAA,qBAAS,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1H,gBAAK,CAAC,aAAa,GAAG,CAAC,CAAQ,EAAE,CAAQ,EAAE,MAAc,gCAAoB,EAAW,EAAE,CACtF,gBAAK,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,gBAAK,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.d.ts","sourceRoot":"","sources":["../../src/utils/disposable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAI1C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,UAAU;IAClD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,yBAAiB,UAAU,CAAC;IACxB,SAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEtD;IAED;;;OAGG;IACH,SAAgB,KAAK,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"disposable.d.ts","sourceRoot":"","sources":["../../src/utils/disposable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAI1C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,UAAU;IAClD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,yBAAiB,UAAU,CAAC;IACxB,SAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEtD;IAED;;;OAGG;IACH,SAAgB,KAAK,IAAI,UAAU,CAElC;IAED;;;;OAIG;IACH,SAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,UAAU,CAEjD;IAED;;;OAGG;IACH,SAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI5C;CACJ;AAED;;GAEG;AACH,qBAAa,oBAAqB,YAAW,UAAU;IACnD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,CAAM;IAClD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;gBAE1B,GAAG,SAAS,EAAE,UAAU,EAAE;IAKtC,OAAO,IAAI,IAAI;IAaf,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;;OAIG;IACH,IAAI,CAAC,GAAG,WAAW,EAAE,UAAU,EAAE,GAAG,UAAU;IAC9C,IAAI,CAAC,GAAG,WAAW,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,UAAU;IAOhD,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;CAGhB"}
|
package/lib/utils/disposable.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/utils/disposable.ts"],"names":[],"mappings":";;;AAgBA,oDAA4D;AAC5D,kDAAgE;AAYhE,IAAiB,UAAU,
|
|
1
|
+
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/utils/disposable.ts"],"names":[],"mappings":";;;AAgBA,oDAA4D;AAC5D,kDAAgE;AAYhE,IAAiB,UAAU,CA+B1B;AA/BD,WAAiB,UAAU;IACvB,SAAgB,EAAE,CAAC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AC,YAAY,qDAAG,GAAG,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzC,CAAC;IASD,IAAI,CAAC,GAAG,WAA0C;QAC9C,MAAM,KAAK,GAAG,IAAA,0BAAa,EAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3G,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAChC,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,mBAAM,EAAC,IAAI,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;IAChC,CAAC;CACJ;AAjDD,oDAiDC"}
|
package/lib/utils/math-util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 Axon Ivy AG and others.
|
|
2
|
+
* Copyright (c) 2024-2026 Axon Ivy AG 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,5 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/**
|
|
17
|
+
* Default epsilon for loose numeric equality checks, matching the tolerance
|
|
18
|
+
* used by sprotty's `almostEquals` convention.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ALMOST_EQUAL_EPSILON = 0.001;
|
|
16
21
|
export declare function equalUpTo(one: number, other: number, epsilon?: number): boolean;
|
|
17
22
|
//# sourceMappingURL=math-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-util.d.ts","sourceRoot":"","sources":["../../src/utils/math-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,MAAuB,GAAG,OAAO,CAE/F"}
|
|
1
|
+
{"version":3,"file":"math-util.d.ts","sourceRoot":"","sources":["../../src/utils/math-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,CAAC;AAEzC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,MAAuB,GAAG,OAAO,CAE/F"}
|
package/lib/utils/math-util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2024 Axon Ivy AG and others.
|
|
3
|
+
* Copyright (c) 2024-2026 Axon Ivy AG and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ALMOST_EQUAL_EPSILON = void 0;
|
|
18
19
|
exports.equalUpTo = equalUpTo;
|
|
20
|
+
/**
|
|
21
|
+
* Default epsilon for loose numeric equality checks, matching the tolerance
|
|
22
|
+
* used by sprotty's `almostEquals` convention.
|
|
23
|
+
*/
|
|
24
|
+
exports.ALMOST_EQUAL_EPSILON = 1e-3;
|
|
19
25
|
function equalUpTo(one, other, epsilon = Number.EPSILON) {
|
|
20
26
|
return Math.abs(one - other) <= epsilon;
|
|
21
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-util.js","sourceRoot":"","sources":["../../src/utils/math-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"math-util.js","sourceRoot":"","sources":["../../src/utils/math-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAQlF,8BAEC;AARD;;;GAGG;AACU,QAAA,oBAAoB,GAAG,IAAI,CAAC;AAEzC,SAAgB,SAAS,CAAC,GAAW,EAAE,KAAa,EAAE,UAAkB,MAAM,CAAC,OAAO;IAClF,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,OAAO,CAAC;AAC5C,CAAC"}
|
package/lib/utils/type-util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 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
|
package/lib/utils/type-util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2021-
|
|
3
|
+
* Copyright (c) 2021-2026 EclipseSource and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/protocol",
|
|
3
|
-
"version": "2.7.0-next.
|
|
3
|
+
"version": "2.7.0-next.11+d9a287b",
|
|
4
4
|
"description": "The protocol definition for client-server communication in GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build": "tsc -b",
|
|
39
39
|
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
|
|
40
40
|
"generate:index": "glsp generateIndex src/di src -f -s",
|
|
41
|
-
"lint": "eslint
|
|
41
|
+
"lint": "eslint ./src",
|
|
42
42
|
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
|
|
43
43
|
"test:ci": "yarn test --reporter mocha-ctrf-json-reporter",
|
|
44
44
|
"test:coverage": "nyc yarn test",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "d9a287bcaf96a4449a20f462498355b21f60da85"
|
|
62
62
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Action, ActionMessage, CompoundOperation, Operation, RejectAction, RequestAction, ResponseAction } from './base-protocol';
|
|
19
19
|
import { AnyObject } from '../utils/type-util';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { EndProgressAction, MessageAction, StartProgressAction, StatusAction, UpdateProgressAction } from './client-notification';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { CutOperation, PasteOperation, RequestClipboardDataAction, SetClipboardDataAction } from './clipboard';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { RequestContextActions, SetContextActions } from './contexts';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Point } from 'sprotty-protocol';
|
|
19
19
|
import { ChangeRoutingPointsOperation, ReconnectEdgeOperation } from './edge-modification';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Point } from 'sprotty-protocol';
|
|
19
19
|
import { CreateEdgeOperation, CreateNodeOperation, CreateOperation, DeleteElementOperation } from './element-creation';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Bounds } from 'sprotty-protocol';
|
|
19
19
|
import { RequestPopupModelAction, SetPopupModelAction } from './element-hover';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import {
|
|
19
19
|
NavigateToExternalTargetAction,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { SelectAction, SelectAllAction } from './element-selection';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import {
|
|
19
19
|
ApplyLabelEditOperation,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { CheckEdgeResultAction, RequestCheckEdgeAction, RequestTypeHintsAction, SetTypeHintsAction } from './element-type-hints';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { DeleteMarkersAction, RequestMarkersAction, SetMarkersAction } from './element-validation';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { RequestModelAction, SetModelAction, SourceModelChangedAction, UpdateModelAction } from './model-data';
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Dimension, Point } from 'sprotty-protocol';
|
|
19
19
|
import { ComputedBoundsAction, LayoutOperation, RequestBoundsAction, TriggerLayoutAction } from './model-layout';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 STMicroelectronics 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2026 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,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
/* eslint-disable max-len */
|
|
17
16
|
|
|
18
17
|
import { expect } from 'chai';
|
|
19
18
|
import { ExportSvgAction, RequestExportSvgAction, SaveModelAction, SetDirtyStateAction } from './model-saving';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { Dimension, Point } from 'sprotty-protocol';
|
|
19
19
|
import { ChangeBoundsOperation, ChangeContainerOperation } from './node-modification';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { TriggerEdgeCreationAction, TriggerNodeCreationAction } from './tool-palette';
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 STMicroelectronics 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { CenterAction, FitToScreenAction, MoveViewportAction } from './viewport';
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
|
@@ -34,9 +34,9 @@ class StubGLSPServer implements GLSPServer {
|
|
|
34
34
|
disposeClientSession(params: DisposeClientSessionParameters): Promise<void> {
|
|
35
35
|
return Promise.resolve();
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
process(message: ActionMessage<Action>): void {}
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
shutdown(): void {}
|
|
41
41
|
addListener(listener: GLSPServerListener): boolean {
|
|
42
42
|
return false;
|
|
@@ -155,7 +155,7 @@ describe('Node GLSP Client', () => {
|
|
|
155
155
|
const expectedResult = { protocolVersion: '1.0.0', serverActions: {} };
|
|
156
156
|
const params = { applicationId: 'id', protocolVersion: '1.0.0' };
|
|
157
157
|
server.initialize.returns(Promise.resolve(expectedResult));
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
const eventHandler = (result: InitializeResult): void => {};
|
|
160
160
|
const eventHandlerSpy = sinon.spy(eventHandler);
|
|
161
161
|
client.onServerInitialized(eventHandlerSpy);
|
|
@@ -258,7 +258,6 @@ describe('Node GLSP Client', () => {
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
describe('onActionMessage', () => {
|
|
261
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
262
261
|
const handler = sandbox.spy((_message: ActionMessage): void => {});
|
|
263
262
|
it('should be properly registered if server is not configured', () => {
|
|
264
263
|
resetClient(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2026 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
|
|
16
|
+
import { v4 as uuid } from 'uuid';
|
|
17
17
|
|
|
18
18
|
import { ActionMessage } from '../action-protocol/base-protocol';
|
|
19
19
|
import { Disposable } from '../utils/disposable';
|
|
@@ -25,7 +25,7 @@ export class ApplicationIdProvider {
|
|
|
25
25
|
private static _applicationId?: string;
|
|
26
26
|
static get(): string {
|
|
27
27
|
if (!ApplicationIdProvider._applicationId) {
|
|
28
|
-
ApplicationIdProvider._applicationId = uuid
|
|
28
|
+
ApplicationIdProvider._applicationId = uuid();
|
|
29
29
|
}
|
|
30
30
|
return ApplicationIdProvider._applicationId;
|
|
31
31
|
}
|
|
@@ -166,7 +166,6 @@ export namespace GLSPClient {
|
|
|
166
166
|
id: string;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
170
169
|
export function isOptions(object: unknown): object is Options {
|
|
171
170
|
return AnyObject.is(object) && hasStringProp(object, 'id');
|
|
172
171
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
-
|
|
16
|
+
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import * as sinon from 'sinon';
|
|
19
19
|
import { Disposable, Event, MessageConnection, NotificationHandler, ProgressType } from 'vscode-jsonrpc';
|
|
@@ -294,7 +294,6 @@ describe('Base JSON-RPC GLSP Client', () => {
|
|
|
294
294
|
});
|
|
295
295
|
|
|
296
296
|
describe('onActionMessage', () => {
|
|
297
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
298
297
|
const handler = sandbox.spy((_message: ActionMessage): void => {});
|
|
299
298
|
|
|
300
299
|
it('should be registered to message emitter if client is not running', async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2026 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
|
|
@@ -26,7 +26,6 @@ export namespace JsonrpcGLSPClient {
|
|
|
26
26
|
connectionProvider: ConnectionProvider;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
30
29
|
export function isOptions(object: unknown): object is Options {
|
|
31
30
|
return GLSPClient.isOptions(object) && 'connectionProvider' in object;
|
|
32
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2024-2026 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
|
|
@@ -56,7 +56,7 @@ describe('Container configuration', () => {
|
|
|
56
56
|
const result = resolveContainerConfiguration(moduleA, moduleB, { replace: replaceModule });
|
|
57
57
|
expect(result).to.deep.equal([replaceModule, moduleB]);
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
it('should still resolve a module from a replace configuration if there is no prior added module with the same featureId to replace', () => {
|
|
61
61
|
const replaceModule = new FeatureModule(() => {}, { featureId: Symbol('replaceModule') });
|
|
62
62
|
const result = resolveContainerConfiguration(moduleA, moduleB, { replace: replaceModule });
|
package/src/di/feature-module.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
|
@@ -105,7 +105,6 @@ export class FeatureModule extends ContainerModule {
|
|
|
105
105
|
const missing = requires.filter(module => !module.isLoaded({ isBound }));
|
|
106
106
|
if (missing.length > 0) {
|
|
107
107
|
this.debugLog(
|
|
108
|
-
// eslint-disable-next-line max-len
|
|
109
108
|
`Could not load feature module. Required modules are not loaded. Feature ids: ${missing.map(m => m.featureId.toString()).join(', ')}`
|
|
110
109
|
);
|
|
111
110
|
return false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2024-2026 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
|
|
@@ -127,4 +127,51 @@ describe('Point', () => {
|
|
|
127
127
|
expect(Point.equals({ x: 1, y: 2 }, { x: 1.0001, y: 2.0001 }, 0.001)).to.be.true;
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
|
+
|
|
131
|
+
describe('isVerticalAligned', () => {
|
|
132
|
+
it('returns true when both points share the same x coordinate', () => {
|
|
133
|
+
expect(Point.isVerticalAligned({ x: 10, y: 0 }, { x: 10, y: 100 })).to.be.true;
|
|
134
|
+
});
|
|
135
|
+
it('returns true within the default tolerance', () => {
|
|
136
|
+
expect(Point.isVerticalAligned({ x: 10, y: 0 }, { x: 10.0001, y: 100 })).to.be.true;
|
|
137
|
+
});
|
|
138
|
+
it('returns false when the x coordinates differ beyond the default tolerance', () => {
|
|
139
|
+
expect(Point.isVerticalAligned({ x: 10, y: 0 }, { x: 10.5, y: 100 })).to.be.false;
|
|
140
|
+
});
|
|
141
|
+
it('honors an explicit epsilon', () => {
|
|
142
|
+
expect(Point.isVerticalAligned({ x: 10, y: 0 }, { x: 14, y: 100 }, 5)).to.be.true;
|
|
143
|
+
expect(Point.isVerticalAligned({ x: 10, y: 0 }, { x: 14, y: 100 }, 3)).to.be.false;
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
describe('isHorizontalAligned', () => {
|
|
148
|
+
it('returns true when both points share the same y coordinate', () => {
|
|
149
|
+
expect(Point.isHorizontalAligned({ x: 0, y: 50 }, { x: 200, y: 50 })).to.be.true;
|
|
150
|
+
});
|
|
151
|
+
it('returns true within the default tolerance', () => {
|
|
152
|
+
expect(Point.isHorizontalAligned({ x: 0, y: 50 }, { x: 200, y: 50.0001 })).to.be.true;
|
|
153
|
+
});
|
|
154
|
+
it('returns false when the y coordinates differ beyond the default tolerance', () => {
|
|
155
|
+
expect(Point.isHorizontalAligned({ x: 0, y: 50 }, { x: 200, y: 50.5 })).to.be.false;
|
|
156
|
+
});
|
|
157
|
+
it('honors an explicit epsilon', () => {
|
|
158
|
+
expect(Point.isHorizontalAligned({ x: 0, y: 50 }, { x: 200, y: 53 }, 5)).to.be.true;
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
describe('isAxisAligned', () => {
|
|
163
|
+
it('returns true for vertically aligned points', () => {
|
|
164
|
+
expect(Point.isAxisAligned({ x: 10, y: 0 }, { x: 10, y: 100 })).to.be.true;
|
|
165
|
+
});
|
|
166
|
+
it('returns true for horizontally aligned points', () => {
|
|
167
|
+
expect(Point.isAxisAligned({ x: 0, y: 50 }, { x: 200, y: 50 })).to.be.true;
|
|
168
|
+
});
|
|
169
|
+
it('returns false for points that are neither vertically nor horizontally aligned', () => {
|
|
170
|
+
expect(Point.isAxisAligned({ x: 0, y: 0 }, { x: 50, y: 50 })).to.be.false;
|
|
171
|
+
});
|
|
172
|
+
it('honors an explicit epsilon', () => {
|
|
173
|
+
expect(Point.isAxisAligned({ x: 10, y: 0 }, { x: 14, y: 100 }, 5)).to.be.true;
|
|
174
|
+
expect(Point.isAxisAligned({ x: 10, y: 0 }, { x: 14, y: 100 }, 3)).to.be.false;
|
|
175
|
+
});
|
|
176
|
+
});
|
|
130
177
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2024-2026 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
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { Point } from 'sprotty-protocol/lib/utils/geometry';
|
|
19
19
|
import { Movement } from './utils/geometry-movement';
|
|
20
20
|
import { Vector } from './utils/geometry-vector';
|
|
21
|
-
import { equalUpTo } from './utils/math-util';
|
|
21
|
+
import { ALMOST_EQUAL_EPSILON, equalUpTo } from './utils/math-util';
|
|
22
22
|
import { AnyObject, hasNumberProp } from './utils/type-util';
|
|
23
23
|
|
|
24
24
|
declare module 'sprotty-protocol/lib/utils/geometry' {
|
|
@@ -113,6 +113,37 @@ declare module 'sprotty-protocol/lib/utils/geometry' {
|
|
|
113
113
|
* @returns the movement from `from` in the `vector` direction
|
|
114
114
|
*/
|
|
115
115
|
function moveTowards(from: Point, vector: Vector): Movement;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns whether the given points are vertically aligned, i.e. they
|
|
119
|
+
* share (approximately) the same x coordinate.
|
|
120
|
+
*
|
|
121
|
+
* @param a first point
|
|
122
|
+
* @param b second point
|
|
123
|
+
* @param eps tolerance on the x axis (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
124
|
+
*/
|
|
125
|
+
function isVerticalAligned(a: Point, b: Point, eps?: number): boolean;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Returns whether the given points are horizontally aligned, i.e. they
|
|
129
|
+
* share (approximately) the same y coordinate.
|
|
130
|
+
*
|
|
131
|
+
* @param a first point
|
|
132
|
+
* @param b second point
|
|
133
|
+
* @param eps tolerance on the y axis (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
134
|
+
*/
|
|
135
|
+
function isHorizontalAligned(a: Point, b: Point, eps?: number): boolean;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns whether the given points are axis-aligned, i.e. either
|
|
139
|
+
* {@link isVerticalAligned vertically} or
|
|
140
|
+
* {@link isHorizontalAligned horizontally} aligned.
|
|
141
|
+
*
|
|
142
|
+
* @param a first point
|
|
143
|
+
* @param b second point
|
|
144
|
+
* @param eps tolerance (defaults to {@link ALMOST_EQUAL_EPSILON})
|
|
145
|
+
*/
|
|
146
|
+
function isAxisAligned(a: Point, b: Point, eps?: number): boolean;
|
|
116
147
|
}
|
|
117
148
|
}
|
|
118
149
|
|
|
@@ -153,4 +184,9 @@ Point.moveTowards = (from: Point, vector: Vector): Movement => {
|
|
|
153
184
|
|
|
154
185
|
Point.equals = (one: Point, other: Point, eps?: number): boolean => equalUpTo(one.x, other.x, eps) && equalUpTo(one.y, other.y, eps);
|
|
155
186
|
|
|
187
|
+
Point.isVerticalAligned = (a: Point, b: Point, eps: number = ALMOST_EQUAL_EPSILON): boolean => equalUpTo(a.x, b.x, eps);
|
|
188
|
+
Point.isHorizontalAligned = (a: Point, b: Point, eps: number = ALMOST_EQUAL_EPSILON): boolean => equalUpTo(a.y, b.y, eps);
|
|
189
|
+
Point.isAxisAligned = (a: Point, b: Point, eps: number = ALMOST_EQUAL_EPSILON): boolean =>
|
|
190
|
+
Point.isVerticalAligned(a, b, eps) || Point.isHorizontalAligned(a, b, eps);
|
|
191
|
+
|
|
156
192
|
export { Point };
|
package/src/utils/disposable.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 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
|
|
@@ -37,7 +37,6 @@ export namespace Disposable {
|
|
|
37
37
|
* @returns the newly created disposable
|
|
38
38
|
*/
|
|
39
39
|
export function empty(): Disposable {
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
41
40
|
return { dispose: () => {} };
|
|
42
41
|
}
|
|
43
42
|
|
package/src/utils/math-util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2024 Axon Ivy AG and others.
|
|
2
|
+
* Copyright (c) 2024-2026 Axon Ivy AG 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,12 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Default epsilon for loose numeric equality checks, matching the tolerance
|
|
19
|
+
* used by sprotty's `almostEquals` convention.
|
|
20
|
+
*/
|
|
21
|
+
export const ALMOST_EQUAL_EPSILON = 1e-3;
|
|
22
|
+
|
|
17
23
|
export function equalUpTo(one: number, other: number, epsilon: number = Number.EPSILON): boolean {
|
|
18
24
|
return Math.abs(one - other) <= epsilon;
|
|
19
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics 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
|
|
@@ -155,7 +155,6 @@ describe('TypeUtil', () => {
|
|
|
155
155
|
|
|
156
156
|
describe('hasFunctionProp', () => {
|
|
157
157
|
it('should return true for an object that has a property that matches the given key and type', () => {
|
|
158
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
159
158
|
expect(hasFunctionProp({ someProp: () => {} }, 'someProp')).to.be.true;
|
|
160
159
|
});
|
|
161
160
|
it('should return false for an object that has a property that matches the given but not the given type', () => {
|
|
@@ -174,7 +173,6 @@ describe('TypeUtil', () => {
|
|
|
174
173
|
expect(hasFunctionProp({ someProp: undefined }, 'someProp', true)).to.be.true;
|
|
175
174
|
});
|
|
176
175
|
it('should return true for an object that has a property that matches the given key and type when using the optional flag', () => {
|
|
177
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
178
176
|
expect(hasFunctionProp({ someProp: () => {} }, 'someProp', true)).to.be.true;
|
|
179
177
|
});
|
|
180
178
|
});
|
package/src/utils/type-util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 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
|
|
@@ -49,7 +49,7 @@ export interface Constructor<T, A extends any[] = any[]> {
|
|
|
49
49
|
* all readonly modifiers of the type`s properties. Please use with care and only in instances
|
|
50
50
|
* where you know that overwriting a readonly property is safe and doesn't cause unknown unintended side effects.
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
export type Writable<T> = { -readonly [P in keyof T]: Writable<T[P]> };
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -98,7 +98,7 @@ export function toTypeGuard<G>(constructor: Constructor<G>): TypeGuard<G> {
|
|
|
98
98
|
* still allowing to also define any other string value.
|
|
99
99
|
* @template T The type of the string proposal as union.
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
export type ProposalString<T extends string> = T | (string & {});
|
|
103
103
|
|
|
104
104
|
/**
|