Skip to content

Commit 87c6a46

Browse files
Use layout trigger action instead of layout operation directly (#252)
Relates to eclipse-glsp/glsp#1561
1 parent f267c3b commit 87c6a46

File tree

2 files changed

+53
-44
lines changed

2 files changed

+53
-44
lines changed

packages/theia-integration/src/browser/diagram/glsp-diagram-commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import {
1919
CenterAction,
2020
FitToScreenAction,
21-
LayoutOperation,
2221
RedoAction,
2322
RequestExportSvgAction,
2423
SelectAllAction,
24+
TriggerLayoutAction,
2525
UndoAction
2626
} from '@eclipse-glsp/client';
2727
import { ApplicationShell, CommonCommands } from '@theia/core/lib/browser';
@@ -106,7 +106,7 @@ export class GLSPDiagramCommandContribution implements CommandContribution {
106106
);
107107
registry.registerHandler(
108108
GLSPDiagramCommands.LAYOUT,
109-
new GLSPCommandHandler(this.shell, { actions: () => LayoutOperation.create(), alwaysVisible: true })
109+
new GLSPCommandHandler(this.shell, { actions: () => TriggerLayoutAction.create(), alwaysVisible: true })
110110
);
111111
registry.registerHandler(
112112
GLSPDiagramCommands.SELECT_ALL,

yarn.lock

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -822,25 +822,25 @@
822822
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
823823

824824
"@eclipse-glsp-examples/workflow-glsp@next":
825-
version "2.5.0-next.418"
826-
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-glsp/-/workflow-glsp-2.5.0-next.418.tgz#ce8419b36b2c0f4357f02c754cda81e84b7e4c30"
827-
integrity sha512-3sgNOMRLjNjUr8fJqLBaFh1H0Hg5HryrN+Gb7IRNk8j60ZXl7nUl3kqmkevmdFb3PABitYdoT3zpPVB9yaRSrw==
825+
version "2.5.0-next.425"
826+
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-glsp/-/workflow-glsp-2.5.0-next.425.tgz#fb273ff68d7906f87aac8e4ed8e3c758346e5075"
827+
integrity sha512-uyFeED5tdlAc8ax0vuNlyLTXA2NGO69a4EtXOeith6S29CwtctLrrPco0i7nSq9wZeTXfcy4R9hjqsu4ppScCA==
828828
dependencies:
829-
"@eclipse-glsp/client" "2.5.0-next.418+daca681"
829+
"@eclipse-glsp/client" "2.5.0-next.425+5d87dc7"
830830
balloon-css "^0.5.0"
831831

832832
"@eclipse-glsp-examples/workflow-server-bundled@next":
833-
version "2.5.0-next.123"
834-
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-server-bundled/-/workflow-server-bundled-2.5.0-next.123.tgz#c10dca9523a39152e05112ad0bd23776e0cf17fc"
835-
integrity sha512-7jH80Q43pfwhyJMjHklyP9i0TKDfPFoEv33vuLcAhETqU8kposgojAsyinLWi0sw92w7vti+7hzQDQGGgt/myw==
833+
version "2.5.0-next.125"
834+
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-server-bundled/-/workflow-server-bundled-2.5.0-next.125.tgz#a0ab0c966c0771a47cf15fafc4454fbfc5775196"
835+
integrity sha512-lglIcUbaayEHzEO46ksaxxM2XOJKp/qGrWJRgQ+BhPE01kuENBytryK+7UtIb0xT6WXrM30nXr7fge0Gx0nLJQ==
836836

837837
"@eclipse-glsp-examples/workflow-server@next":
838-
version "2.5.0-next.123"
839-
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-server/-/workflow-server-2.5.0-next.123.tgz#4531d5982c5e53449823e21d88db6a6bb73daefb"
840-
integrity sha512-LcvlFrk2fCcZ/ecr/C6nabvhE/lNv6QQczND78QvWbToX8HcdZElLQRCmN9crcwE/L3CknVPMfX17ZcIeD/njA==
838+
version "2.5.0-next.125"
839+
resolved "https://registry.yarnpkg.com/@eclipse-glsp-examples/workflow-server/-/workflow-server-2.5.0-next.125.tgz#7fc9a90785957832b6ed3c1de258a8751b27f6ff"
840+
integrity sha512-IfVLLsxcaPCKK56rdna82OtG8YqljuFFcDoYrzFHOEtOAlNZJjsucKfJPuOFIX1RbNfgOl2vU+1Bp7FuAL8HHQ==
841841
dependencies:
842-
"@eclipse-glsp/layout-elk" "2.5.0-next.123+948f71a"
843-
"@eclipse-glsp/server" "2.5.0-next.123+948f71a"
842+
"@eclipse-glsp/layout-elk" "2.5.0-next.125+72bdfaa"
843+
"@eclipse-glsp/server" "2.5.0-next.125+72bdfaa"
844844
inversify "^6.1.3"
845845

846846
"@eclipse-glsp/cli@2.5.0-next.179+c29a688":
@@ -857,12 +857,12 @@
857857
semver "^7.5.1"
858858
shelljs "^0.8.5"
859859

860-
"@eclipse-glsp/client@2.5.0-next.418+daca681", "@eclipse-glsp/client@next":
861-
version "2.5.0-next.418"
862-
resolved "https://registry.yarnpkg.com/@eclipse-glsp/client/-/client-2.5.0-next.418.tgz#bd06e8d796bdb2ec591a07b480bcb0dcdf7e5fd1"
863-
integrity sha512-Hj2Xh1qbTyE3PQRmVKiIlBlqU5CDVWQ4/251G4tLQkw2HB4UWr6HU64gP28mR+yxt2br7aPK8HQpeqKVNQ+gQg==
860+
"@eclipse-glsp/client@2.5.0-next.425+5d87dc7", "@eclipse-glsp/client@next":
861+
version "2.5.0-next.425"
862+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/client/-/client-2.5.0-next.425.tgz#ae4ff028d59fe89202ebd1337177fa491933d11e"
863+
integrity sha512-HGRS4AArLwvcNCw4MM5s0QpdJ5v/A1i+FwEpdmsPKaA93ISW9hfs+axdcM3MCYOrechshENoLVAR0kJ+Q2SyDw==
864864
dependencies:
865-
"@eclipse-glsp/sprotty" "2.5.0-next.418+daca681"
865+
"@eclipse-glsp/sprotty" "2.5.0-next.425+5d87dc7"
866866
autocompleter "^9.1.2"
867867
file-saver "^2.0.5"
868868
lodash "4.17.21"
@@ -924,20 +924,20 @@
924924
resolved "https://registry.yarnpkg.com/@eclipse-glsp/eslint-config/-/eslint-config-2.5.0-next.179.tgz#06f32ffa41b9e92004a6be318c0c0fa878f496a6"
925925
integrity sha512-W7a8CRNwmLjKkizMwOjH5sU/8FrlN6nVxgAk5ZNp4R0hrOoPlE6C+uTVV7PvmhYFm8DDdf76KQtJzD6NaYtgYg==
926926

927-
"@eclipse-glsp/graph@2.5.0-next.123+948f71a":
928-
version "2.5.0-next.123"
929-
resolved "https://registry.yarnpkg.com/@eclipse-glsp/graph/-/graph-2.5.0-next.123.tgz#adb4f43c0d859c99b58a47b3914088690405a34f"
930-
integrity sha512-Yb9PaumWm+HQMFZdjHGxx5T7bc5FO4vSd0pr+R5r31z60nUb2kfjUWaknDbzORlccaPnvFw1b0MyOY3FwCI5bQ==
927+
"@eclipse-glsp/graph@2.5.0-next.125+72bdfaa":
928+
version "2.5.0-next.125"
929+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/graph/-/graph-2.5.0-next.125.tgz#1949c2d75cbcff1a592546ed118d379cc6691955"
930+
integrity sha512-9ywX5ws1Dk9WSMHSm/muyxhxI//Rj9KtA5utHLPAKT5FRcJ0benp7GOxc8awHb5Dhip5OL+iQJ6vjHhjHtn3EQ==
931931
dependencies:
932932
"@eclipse-glsp/protocol" next
933933

934-
"@eclipse-glsp/layout-elk@2.5.0-next.123+948f71a":
935-
version "2.5.0-next.123"
936-
resolved "https://registry.yarnpkg.com/@eclipse-glsp/layout-elk/-/layout-elk-2.5.0-next.123.tgz#024a89c9311e869e859993be32fb37295baebe67"
937-
integrity sha512-n69EHuiW7QjKsaI0FiwZ/77scTvuftMqW3cuXHNW6ckfS+/QSo0sowiwDGu1Rra9tfm18/wF06qsvgaHeL0pxw==
934+
"@eclipse-glsp/layout-elk@2.5.0-next.125+72bdfaa":
935+
version "2.5.0-next.125"
936+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/layout-elk/-/layout-elk-2.5.0-next.125.tgz#27d572eb7e03e74e4be0ca6ebae064df939fbda3"
937+
integrity sha512-+DWnfRvYRCebne3LH+mlW0AE7SiH2Z/Mtxu2RFdDFnAzgVfjf/w5jidcGObcAfb8XxUhZq7/l32cKSqWokti6A==
938938
dependencies:
939-
"@eclipse-glsp/server" "2.5.0-next.123+948f71a"
940-
elkjs "^0.7.1"
939+
"@eclipse-glsp/server" "2.5.0-next.125+72bdfaa"
940+
elkjs "^0.10.1"
941941

942942
"@eclipse-glsp/mocha-config@2.5.0-next.179+c29a688":
943943
version "2.5.0-next.179"
@@ -956,7 +956,16 @@
956956
dependencies:
957957
prettier-plugin-packagejson "~2.4.6"
958958

959-
"@eclipse-glsp/protocol@2.5.0-next.418+daca681", "@eclipse-glsp/protocol@next":
959+
"@eclipse-glsp/protocol@2.5.0-next.425+5d87dc7":
960+
version "2.5.0-next.425"
961+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/protocol/-/protocol-2.5.0-next.425.tgz#2db93cf686251c30191fa399cc0771f96c4a778d"
962+
integrity sha512-kVUu78u07JEzMl7W1CrhTk3hjNMeVLM6U93nsca0iJ2RO91RVNsGm0huOtioq7mHZRw+HuLEv4kXpEPTp6UvJg==
963+
dependencies:
964+
sprotty-protocol "1.4.0"
965+
uuid "~10.0.0"
966+
vscode-jsonrpc "8.2.0"
967+
968+
"@eclipse-glsp/protocol@next":
960969
version "2.5.0-next.418"
961970
resolved "https://registry.yarnpkg.com/@eclipse-glsp/protocol/-/protocol-2.5.0-next.418.tgz#6434d1b5f8d2bbf518d7f1eeda926cb64f31dbc1"
962971
integrity sha512-cb4zPGO18JFowSXlEOyESYW/Zbnklrk1yFVvwGIco5ZMJilea57FGhQDaaCY7W1LgwNwy6gzpqNDstls/FiZjg==
@@ -965,12 +974,12 @@
965974
uuid "~10.0.0"
966975
vscode-jsonrpc "8.2.0"
967976

968-
"@eclipse-glsp/server@2.5.0-next.123+948f71a":
969-
version "2.5.0-next.123"
970-
resolved "https://registry.yarnpkg.com/@eclipse-glsp/server/-/server-2.5.0-next.123.tgz#a355e348b5188b527ee1915f2fab593ce106d3d1"
971-
integrity sha512-Q3+mseCWm/rSYQvTsnI8P5e+M+DIxONv3TmsxjdJQLKWphgR3tmsKah8h4Cf9ALZ8DELSV7zmw+2R2dd8ixuUQ==
977+
"@eclipse-glsp/server@2.5.0-next.125+72bdfaa":
978+
version "2.5.0-next.125"
979+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/server/-/server-2.5.0-next.125.tgz#c3c93582f40cd0b9e670fcf7a45ce4892945c99d"
980+
integrity sha512-lw2QBqhENxiN2aWkWBkCESJzwyiJhtk3UN0lDbIKGXcWUsXAZy30yyULb1oiKDKiPN42Zn1UjGBb7oS7eAKkNw==
972981
dependencies:
973-
"@eclipse-glsp/graph" "2.5.0-next.123+948f71a"
982+
"@eclipse-glsp/graph" "2.5.0-next.125+72bdfaa"
974983
"@eclipse-glsp/protocol" next
975984
"@types/uuid" "8.3.1"
976985
commander "^8.3.0"
@@ -980,12 +989,12 @@
980989
winston "^3.3.3"
981990
ws "^8.12.1"
982991

983-
"@eclipse-glsp/sprotty@2.5.0-next.418+daca681":
984-
version "2.5.0-next.418"
985-
resolved "https://registry.yarnpkg.com/@eclipse-glsp/sprotty/-/sprotty-2.5.0-next.418.tgz#98de5aa93665b1f3f92f989630912427e5201cab"
986-
integrity sha512-nEZhVakgObTm0G3yPHHruZi993Tw71UcqKHIZFgp7NaPZ6fr9mm8ybMap9gpz7B//Ue9pfm/HwHUlCHH5zAq0Q==
992+
"@eclipse-glsp/sprotty@2.5.0-next.425+5d87dc7":
993+
version "2.5.0-next.425"
994+
resolved "https://registry.yarnpkg.com/@eclipse-glsp/sprotty/-/sprotty-2.5.0-next.425.tgz#61bf71bdbc0ef9de192691ef43264bf57fb2b1d6"
995+
integrity sha512-SVPfX6WrWI21Ref3Eu6498Mky0SP8pbeesFMPJBnOP0z/eZysHZyL3WIBGrkTZ5lH/NZ8HFNDSXiZ6qvhyi8KQ==
987996
dependencies:
988-
"@eclipse-glsp/protocol" "2.5.0-next.418+daca681"
997+
"@eclipse-glsp/protocol" "2.5.0-next.425+5d87dc7"
989998
autocompleter "^9.1.0"
990999
snabbdom "~3.5.1"
9911000
sprotty "1.4.0"
@@ -5021,10 +5030,10 @@ electron@30.1.2:
50215030
"@types/node" "^20.9.0"
50225031
extract-zip "^2.0.1"
50235032

5024-
elkjs@^0.7.1:
5025-
version "0.7.1"
5026-
resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.7.1.tgz#4751c5e918a4988139baf7f214e010aea22de969"
5027-
integrity sha512-lD86RWdh480/UuRoHhRcnv2IMkIcK6yMDEuT8TPBIbO3db4HfnVF+1lgYdQi99Ck0yb+lg5Eb46JCHI5uOsmAw==
5033+
elkjs@^0.10.1:
5034+
version "0.10.2"
5035+
resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.10.2.tgz#7b95dbe5d41a5971b2eb13e54201855799389a43"
5036+
integrity sha512-Yx3ORtbAFrXelYkAy2g0eYyVY8QG0XEmGdQXmy0eithKKjbWRfl3Xe884lfkszfBF6UKyIy4LwfcZ3AZc8oxFw==
50285037

50295038
emoji-regex@^8.0.0:
50305039
version "8.0.0"

0 commit comments

Comments
 (0)