@eclipse-glsp/client 1.1.0-next.c8b4f65.194 → 1.1.0-next.cb7168a.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/README.md +1 -1
  2. package/css/decoration.css +1 -1
  3. package/css/glsp-sprotty.css +18 -18
  4. package/lib/base/action-dispatcher.js.map +1 -1
  5. package/lib/base/auto-complete/auto-complete-widget.d.ts +2 -2
  6. package/lib/base/auto-complete/auto-complete-widget.js +3 -3
  7. package/lib/base/command-stack.d.ts +1 -2
  8. package/lib/base/command-stack.d.ts.map +1 -1
  9. package/lib/base/command-stack.js +5 -14
  10. package/lib/base/command-stack.js.map +1 -1
  11. package/lib/base/container-modules.d.ts +32 -2
  12. package/lib/base/container-modules.d.ts.map +1 -1
  13. package/lib/base/container-modules.js +78 -43
  14. package/lib/base/container-modules.js.map +1 -1
  15. package/lib/base/di.config.d.ts +1 -1
  16. package/lib/base/di.config.d.ts.map +1 -1
  17. package/lib/base/di.config.js +7 -7
  18. package/lib/base/di.config.js.map +1 -1
  19. package/lib/base/editor-context-service.d.ts +4 -4
  20. package/lib/base/editor-context-service.d.ts.map +1 -1
  21. package/lib/base/editor-context-service.js +3 -3
  22. package/lib/base/editor-context-service.js.map +1 -1
  23. package/lib/base/focus-tracker.js.map +1 -1
  24. package/lib/base/model/model-registry.js.map +1 -1
  25. package/lib/base/model/update-model-command.js.map +1 -1
  26. package/lib/base/model-initialization-constraint.js.map +1 -1
  27. package/lib/base/selection-clearing-mouse-listener.js +1 -1
  28. package/lib/base/selection-clearing-mouse-listener.js.map +1 -1
  29. package/lib/base/tool-manager/glsp-tool-manager.d.ts +4 -5
  30. package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
  31. package/lib/base/tool-manager/glsp-tool-manager.js +15 -8
  32. package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
  33. package/lib/base/view/view-registry.js.map +1 -1
  34. package/lib/features/bounds/di.config.d.ts +4 -0
  35. package/lib/features/bounds/di.config.d.ts.map +1 -0
  36. package/lib/features/bounds/di.config.js +39 -0
  37. package/lib/features/bounds/di.config.js.map +1 -0
  38. package/lib/features/{layout → bounds}/freeform-layout.d.ts +2 -2
  39. package/lib/features/{layout → bounds}/freeform-layout.d.ts.map +1 -1
  40. package/lib/features/{layout → bounds}/freeform-layout.js +2 -2
  41. package/lib/features/{layout → bounds}/freeform-layout.js.map +1 -1
  42. package/lib/features/bounds/freeform-layout.spec.d.ts.map +1 -0
  43. package/lib/features/{layout/tests → bounds}/freeform-layout.spec.js +37 -37
  44. package/lib/features/bounds/freeform-layout.spec.js.map +1 -0
  45. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +34 -0
  46. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -0
  47. package/lib/features/bounds/glsp-hidden-bounds-updater.js +99 -0
  48. package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -0
  49. package/lib/features/{layout → bounds}/hbox-layout.d.ts +1 -1
  50. package/lib/features/{layout → bounds}/hbox-layout.d.ts.map +1 -1
  51. package/lib/features/{layout → bounds}/hbox-layout.js +1 -1
  52. package/lib/features/{layout → bounds}/hbox-layout.js.map +1 -1
  53. package/lib/features/bounds/hbox-layout.spec.d.ts.map +1 -0
  54. package/lib/features/{layout/tests → bounds}/hbox-layout.spec.js +18 -18
  55. package/lib/features/bounds/hbox-layout.spec.js.map +1 -0
  56. package/lib/features/{layout/tests/layouter-test-util.d.ts → bounds/layouter-test-util.spec.d.ts} +3 -4
  57. package/lib/features/bounds/layouter-test-util.spec.d.ts.map +1 -0
  58. package/lib/features/{layout/tests/layouter-test-util.js → bounds/layouter-test-util.spec.js} +7 -7
  59. package/lib/features/bounds/layouter-test-util.spec.js.map +1 -0
  60. package/lib/features/{layout → bounds}/layouter.d.ts +1 -1
  61. package/lib/features/{layout → bounds}/layouter.d.ts.map +1 -1
  62. package/lib/features/{layout → bounds}/layouter.js +1 -1
  63. package/lib/features/{layout → bounds}/layouter.js.map +1 -1
  64. package/lib/features/{layout → bounds}/vbox-layout.d.ts +1 -1
  65. package/lib/features/{layout → bounds}/vbox-layout.d.ts.map +1 -1
  66. package/lib/features/{layout → bounds}/vbox-layout.js +1 -1
  67. package/lib/features/{layout → bounds}/vbox-layout.js.map +1 -1
  68. package/lib/features/bounds/vbox-layout.spec.d.ts.map +1 -0
  69. package/lib/features/{layout/tests → bounds}/vbox-layout.spec.js +18 -18
  70. package/lib/features/bounds/vbox-layout.spec.js.map +1 -0
  71. package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
  72. package/lib/features/change-bounds/snap.js.map +1 -1
  73. package/lib/features/command-palette/command-palette-tool.d.ts +1 -1
  74. package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
  75. package/lib/features/command-palette/command-palette-tool.js +3 -3
  76. package/lib/features/command-palette/command-palette-tool.js.map +1 -1
  77. package/lib/features/command-palette/di.config.d.ts +0 -15
  78. package/lib/features/command-palette/di.config.d.ts.map +1 -1
  79. package/lib/features/command-palette/di.config.js +6 -7
  80. package/lib/features/command-palette/di.config.js.map +1 -1
  81. package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
  82. package/lib/features/context-menu/delete-element-context-menu.js.map +1 -1
  83. package/lib/features/context-menu/di.config.d.ts +0 -15
  84. package/lib/features/context-menu/di.config.d.ts.map +1 -1
  85. package/lib/features/context-menu/di.config.js +4 -3
  86. package/lib/features/context-menu/di.config.js.map +1 -1
  87. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
  88. package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
  89. package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
  90. package/lib/features/copy-paste/copy-paste-handler.d.ts +4 -4
  91. package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
  92. package/lib/features/copy-paste/copy-paste-handler.js +7 -8
  93. package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
  94. package/lib/features/decoration/decoration-placer.js.map +1 -1
  95. package/lib/features/decoration/di.config.d.ts +0 -15
  96. package/lib/features/decoration/di.config.d.ts.map +1 -1
  97. package/lib/features/decoration/di.config.js +4 -4
  98. package/lib/features/decoration/di.config.js.map +1 -1
  99. package/lib/features/edit-label/di.config.d.ts +0 -15
  100. package/lib/features/edit-label/di.config.d.ts.map +1 -1
  101. package/lib/features/edit-label/di.config.js +3 -2
  102. package/lib/features/edit-label/di.config.js.map +1 -1
  103. package/lib/features/edit-label/edit-label-tool.js.map +1 -1
  104. package/lib/features/edit-label/edit-label-validator.js.map +1 -1
  105. package/lib/features/export/di.config.d.ts +4 -0
  106. package/lib/features/export/di.config.d.ts.map +1 -0
  107. package/lib/features/export/di.config.js +30 -0
  108. package/lib/features/export/di.config.js.map +1 -0
  109. package/lib/features/export/glsp-svg-exporter.d.ts +1 -1
  110. package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
  111. package/lib/features/export/glsp-svg-exporter.js +1 -2
  112. package/lib/features/export/glsp-svg-exporter.js.map +1 -1
  113. package/lib/features/hints/type-hints.js.map +1 -1
  114. package/lib/features/hover/di.config.d.ts +0 -15
  115. package/lib/features/hover/di.config.d.ts.map +1 -1
  116. package/lib/features/hover/di.config.js +7 -7
  117. package/lib/features/hover/di.config.js.map +1 -1
  118. package/lib/features/hover/hover.d.ts.map +1 -1
  119. package/lib/features/hover/hover.js +2 -1
  120. package/lib/features/hover/hover.js.map +1 -1
  121. package/lib/features/layout/di.config.d.ts +1 -1
  122. package/lib/features/layout/di.config.d.ts.map +1 -1
  123. package/lib/features/layout/di.config.js +1 -9
  124. package/lib/features/layout/di.config.js.map +1 -1
  125. package/lib/features/layout/layout-elements-action.d.ts +4 -4
  126. package/lib/features/layout/layout-elements-action.d.ts.map +1 -1
  127. package/lib/features/layout/layout-elements-action.js +2 -2
  128. package/lib/features/layout/layout-elements-action.js.map +1 -1
  129. package/lib/features/mouse-tool/mouse-tool.d.ts +1 -1
  130. package/lib/features/mouse-tool/mouse-tool.d.ts.map +1 -1
  131. package/lib/features/mouse-tool/mouse-tool.js.map +1 -1
  132. package/lib/features/navigation/di.config.d.ts +2 -1
  133. package/lib/features/navigation/di.config.d.ts.map +1 -1
  134. package/lib/features/navigation/di.config.js +3 -3
  135. package/lib/features/navigation/di.config.js.map +1 -1
  136. package/lib/features/navigation/navigation-action-handler.d.ts +2 -2
  137. package/lib/features/navigation/navigation-action-handler.js +2 -2
  138. package/lib/features/navigation/navigation-action-handler.js.map +1 -1
  139. package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
  140. package/lib/features/save/di.config.d.ts +0 -15
  141. package/lib/features/save/di.config.d.ts.map +1 -1
  142. package/lib/features/save/di.config.js +3 -2
  143. package/lib/features/save/di.config.js.map +1 -1
  144. package/lib/features/save/model.d.ts +1 -1
  145. package/lib/features/select/di.config.d.ts +0 -15
  146. package/lib/features/select/di.config.d.ts.map +1 -1
  147. package/lib/features/select/di.config.js +8 -7
  148. package/lib/features/select/di.config.js.map +1 -1
  149. package/lib/features/select/select-feedback-action.js.map +1 -1
  150. package/lib/features/select/select-mouse-listener.d.ts +1 -1
  151. package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
  152. package/lib/features/select/select-mouse-listener.js +2 -1
  153. package/lib/features/select/select-mouse-listener.js.map +1 -1
  154. package/lib/features/select/selection-service.js.map +1 -1
  155. package/lib/features/select/selection-service.spec.js +19 -3
  156. package/lib/features/select/selection-service.spec.js.map +1 -1
  157. package/lib/features/source-model-watcher/di.config.js +1 -1
  158. package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
  159. package/lib/features/svg-metadata/di.config.d.ts +19 -0
  160. package/lib/features/svg-metadata/di.config.d.ts.map +1 -0
  161. package/lib/features/svg-metadata/di.config.js +26 -0
  162. package/lib/features/svg-metadata/di.config.js.map +1 -0
  163. package/lib/features/svg-metadata/metadata-placer.d.ts +24 -0
  164. package/lib/features/svg-metadata/metadata-placer.d.ts.map +1 -0
  165. package/lib/features/svg-metadata/metadata-placer.js +63 -0
  166. package/lib/features/svg-metadata/metadata-placer.js.map +1 -0
  167. package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +4 -3
  168. package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
  169. package/lib/features/tool-feedback/change-bounds-tool-feedback.js +5 -4
  170. package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
  171. package/lib/features/tool-feedback/creation-tool-feedback.d.ts +7 -7
  172. package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
  173. package/lib/features/tool-feedback/creation-tool-feedback.js +8 -11
  174. package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
  175. package/lib/features/tool-feedback/css-feedback.js.map +1 -1
  176. package/lib/features/tool-feedback/di.config.d.ts +0 -15
  177. package/lib/features/tool-feedback/di.config.d.ts.map +1 -1
  178. package/lib/features/tool-feedback/di.config.js +20 -18
  179. package/lib/features/tool-feedback/di.config.js.map +1 -1
  180. package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +2 -3
  181. package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
  182. package/lib/features/tool-feedback/edge-edit-tool-feedback.js +6 -11
  183. package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
  184. package/lib/features/tool-feedback/feedback-action-dispatcher.js.map +1 -1
  185. package/lib/features/tool-feedback/marquee-tool-feedback.js.map +1 -1
  186. package/lib/features/tool-feedback/view.js.map +1 -1
  187. package/lib/features/tool-palette/di.config.d.ts +0 -15
  188. package/lib/features/tool-palette/di.config.d.ts.map +1 -1
  189. package/lib/features/tool-palette/di.config.js +4 -4
  190. package/lib/features/tool-palette/di.config.js.map +1 -1
  191. package/lib/features/tool-palette/tool-palette.d.ts +1 -1
  192. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  193. package/lib/features/tool-palette/tool-palette.js +2 -2
  194. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  195. package/lib/features/tools/base-glsp-tool.js.map +1 -1
  196. package/lib/features/tools/change-bounds-tool.d.ts +1 -1
  197. package/lib/features/tools/change-bounds-tool.d.ts.map +1 -1
  198. package/lib/features/tools/change-bounds-tool.js +6 -6
  199. package/lib/features/tools/change-bounds-tool.js.map +1 -1
  200. package/lib/features/tools/delete-tool.js.map +1 -1
  201. package/lib/features/tools/di.config.d.ts +18 -5
  202. package/lib/features/tools/di.config.d.ts.map +1 -1
  203. package/lib/features/tools/di.config.js +16 -17
  204. package/lib/features/tools/di.config.js.map +1 -1
  205. package/lib/features/tools/edge-creation-tool.js.map +1 -1
  206. package/lib/features/tools/edge-edit-tool.js.map +1 -1
  207. package/lib/features/tools/enable-default-tools-on-focus-loss.js.map +1 -1
  208. package/lib/features/tools/glsp-manhattan-edge-router.d.ts +20 -0
  209. package/lib/features/tools/glsp-manhattan-edge-router.d.ts.map +1 -0
  210. package/lib/features/tools/glsp-manhattan-edge-router.js +69 -0
  211. package/lib/features/tools/glsp-manhattan-edge-router.js.map +1 -0
  212. package/lib/features/tools/marquee-mouse-tool.js.map +1 -1
  213. package/lib/features/tools/marquee-tool.js.map +1 -1
  214. package/lib/features/tools/node-creation-tool.js.map +1 -1
  215. package/lib/features/tools/view.js.map +1 -1
  216. package/lib/features/validation/di.config.js +4 -4
  217. package/lib/features/validation/di.config.js.map +1 -1
  218. package/lib/features/validation/issue-marker.d.ts +1 -1
  219. package/lib/features/validation/issue-marker.js +1 -1
  220. package/lib/features/validation/marker-navigator.d.ts +1 -1
  221. package/lib/features/validation/marker-navigator.d.ts.map +1 -1
  222. package/lib/features/validation/marker-navigator.js.map +1 -1
  223. package/lib/features/validation/validate.d.ts +6 -6
  224. package/lib/features/validation/validate.d.ts.map +1 -1
  225. package/lib/features/validation/validate.js +18 -17
  226. package/lib/features/validation/validate.js.map +1 -1
  227. package/lib/features/viewport/di.config.d.ts +0 -15
  228. package/lib/features/viewport/di.config.d.ts.map +1 -1
  229. package/lib/features/viewport/di.config.js +12 -11
  230. package/lib/features/viewport/di.config.js.map +1 -1
  231. package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
  232. package/lib/index.d.ts +28 -4
  233. package/lib/index.d.ts.map +1 -1
  234. package/lib/index.js +66 -34
  235. package/lib/index.js.map +1 -1
  236. package/lib/lib/model.d.ts +7 -3
  237. package/lib/lib/model.d.ts.map +1 -1
  238. package/lib/lib/model.js +48 -1
  239. package/lib/lib/model.js.map +1 -1
  240. package/lib/model-source/glsp-diagram-server.js.map +1 -1
  241. package/lib/sprotty-reexport.d.ts +7 -7
  242. package/lib/sprotty-reexport.d.ts.map +1 -1
  243. package/lib/sprotty-reexport.js +19 -10
  244. package/lib/sprotty-reexport.js.map +1 -1
  245. package/lib/utils/html-utils.d.ts +1 -1
  246. package/lib/utils/html-utils.js +1 -1
  247. package/lib/utils/smodel-util.d.ts +28 -7
  248. package/lib/utils/smodel-util.d.ts.map +1 -1
  249. package/lib/utils/smodel-util.js +41 -8
  250. package/lib/utils/smodel-util.js.map +1 -1
  251. package/lib/views/base-view-module.d.ts +18 -6
  252. package/lib/views/base-view-module.d.ts.map +1 -1
  253. package/lib/views/base-view-module.js +1 -1
  254. package/lib/views/base-view-module.js.map +1 -1
  255. package/lib/views/compartments.js.map +1 -1
  256. package/lib/views/glsp-edge-view.d.ts +2 -2
  257. package/lib/views/glsp-edge-view.d.ts.map +1 -1
  258. package/lib/views/glsp-edge-view.js +2 -2
  259. package/lib/views/glsp-edge-view.js.map +1 -1
  260. package/lib/views/glsp-projection-view.d.ts +1 -1
  261. package/lib/views/glsp-projection-view.js +1 -1
  262. package/lib/views/glsp-projection-view.js.map +1 -1
  263. package/lib/views/index.d.ts +1 -1
  264. package/lib/views/index.js +1 -1
  265. package/lib/views/issue-marker-view.js.map +1 -1
  266. package/lib/views/rounded-corner-view.js +2 -2
  267. package/lib/views/rounded-corner-view.js.map +1 -1
  268. package/lib/views/rounded-corner.d.ts +1 -1
  269. package/lib/views/rounded-corner.js +1 -1
  270. package/package.json +23 -24
  271. package/src/base/auto-complete/auto-complete-widget.ts +3 -3
  272. package/src/base/command-stack.ts +13 -11
  273. package/src/base/container-modules.ts +44 -11
  274. package/src/base/di.config.ts +8 -8
  275. package/src/base/editor-context-service.ts +4 -4
  276. package/src/base/selection-clearing-mouse-listener.ts +1 -1
  277. package/src/base/tool-manager/glsp-tool-manager.ts +15 -12
  278. package/src/features/bounds/di.config.ts +49 -0
  279. package/src/features/{layout/tests → bounds}/freeform-layout.spec.ts +2 -2
  280. package/src/features/{layout → bounds}/freeform-layout.ts +2 -2
  281. package/src/features/bounds/glsp-hidden-bounds-updater.ts +85 -0
  282. package/src/features/{layout/tests → bounds}/hbox-layout.spec.ts +2 -2
  283. package/src/features/{layout → bounds}/hbox-layout.ts +1 -1
  284. package/src/features/{layout/tests/layouter-test-util.ts → bounds/layouter-test-util.spec.ts} +6 -6
  285. package/src/features/{layout → bounds}/layouter.ts +1 -1
  286. package/src/features/{layout/tests → bounds}/vbox-layout.spec.ts +2 -2
  287. package/src/features/{layout → bounds}/vbox-layout.ts +1 -1
  288. package/src/features/command-palette/command-palette-tool.ts +3 -3
  289. package/src/features/command-palette/di.config.ts +6 -7
  290. package/src/features/context-menu/di.config.ts +4 -3
  291. package/src/features/copy-paste/copy-paste-handler.ts +9 -13
  292. package/src/features/decoration/di.config.ts +4 -4
  293. package/src/features/edit-label/di.config.ts +3 -2
  294. package/src/features/export/di.config.ts +29 -0
  295. package/src/features/export/glsp-svg-exporter.ts +8 -7
  296. package/src/features/hover/di.config.ts +8 -7
  297. package/src/features/hover/hover.ts +2 -1
  298. package/src/features/layout/di.config.ts +2 -11
  299. package/src/features/layout/layout-elements-action.ts +2 -1
  300. package/src/features/navigation/di.config.ts +4 -2
  301. package/src/features/navigation/navigation-action-handler.ts +2 -2
  302. package/src/features/save/di.config.ts +3 -2
  303. package/src/features/save/model.ts +1 -1
  304. package/src/features/select/di.config.ts +8 -7
  305. package/src/features/select/select-mouse-listener.ts +2 -2
  306. package/src/features/select/selection-service.spec.ts +4 -5
  307. package/src/features/source-model-watcher/di.config.ts +1 -1
  308. package/src/features/svg-metadata/di.config.ts +26 -0
  309. package/src/features/svg-metadata/metadata-placer.ts +51 -0
  310. package/src/features/tool-feedback/change-bounds-tool-feedback.ts +4 -4
  311. package/src/features/tool-feedback/creation-tool-feedback.ts +22 -16
  312. package/src/features/tool-feedback/di.config.ts +20 -18
  313. package/src/features/tool-feedback/edge-edit-tool-feedback.ts +3 -11
  314. package/src/features/tool-palette/di.config.ts +4 -4
  315. package/src/features/tool-palette/tool-palette.ts +4 -4
  316. package/src/features/tools/change-bounds-tool.ts +7 -7
  317. package/src/features/tools/di.config.ts +20 -21
  318. package/src/features/tools/glsp-manhattan-edge-router.ts +60 -0
  319. package/src/features/validation/di.config.ts +5 -5
  320. package/src/features/validation/issue-marker.ts +1 -1
  321. package/src/features/validation/validate.ts +16 -19
  322. package/src/features/viewport/di.config.ts +13 -11
  323. package/src/index.ts +37 -5
  324. package/src/lib/model.ts +35 -3
  325. package/src/sprotty-reexport.ts +24 -8
  326. package/src/utils/html-utils.ts +1 -1
  327. package/src/utils/smodel-util.ts +55 -11
  328. package/src/views/base-view-module.ts +4 -9
  329. package/src/views/glsp-edge-view.tsx +3 -3
  330. package/src/views/glsp-projection-view.tsx +1 -1
  331. package/src/views/index.ts +1 -2
  332. package/src/views/rounded-corner-view.tsx +2 -2
  333. package/src/views/rounded-corner.ts +2 -2
  334. package/lib/features/layout/tests/freeform-layout.spec.d.ts.map +0 -1
  335. package/lib/features/layout/tests/freeform-layout.spec.js.map +0 -1
  336. package/lib/features/layout/tests/hbox-layout.spec.d.ts.map +0 -1
  337. package/lib/features/layout/tests/hbox-layout.spec.js.map +0 -1
  338. package/lib/features/layout/tests/layouter-test-util.d.ts.map +0 -1
  339. package/lib/features/layout/tests/layouter-test-util.js.map +0 -1
  340. package/lib/features/layout/tests/vbox-layout.spec.d.ts.map +0 -1
  341. package/lib/features/layout/tests/vbox-layout.spec.js.map +0 -1
  342. /package/lib/features/{layout/tests → bounds}/freeform-layout.spec.d.ts +0 -0
  343. /package/lib/features/{layout/tests → bounds}/hbox-layout.spec.d.ts +0 -0
  344. /package/lib/features/{layout/tests → bounds}/vbox-layout.spec.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019 EclipseSource and others.
2
+ * Copyright (c) 2019-2021 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,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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,6 +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 { bindAsService } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule } from 'inversify';
17
18
  import { configureCommand } from 'sprotty';
18
19
  import { TYPES } from '../../base/types';
@@ -21,12 +22,12 @@ import { RankedSelectMouseListener } from './select-mouse-listener';
21
22
  import { SelectAllCommand, SelectCommand, SelectionService } from './selection-service';
22
23
 
23
24
  const glspSelectModule = new ContainerModule((bind, _unbind, isBound) => {
24
- bind(SelectionService).toSelf().inSingletonScope();
25
- bind(TYPES.SelectionService).toService(SelectionService);
26
- configureCommand({ bind, isBound }, SelectCommand);
27
- configureCommand({ bind, isBound }, SelectAllCommand);
28
- configureCommand({ bind, isBound }, SelectFeedbackCommand);
29
- bind(TYPES.MouseListener).to(RankedSelectMouseListener);
25
+ const context = { bind, isBound };
26
+ bindAsService(context, TYPES.SelectionService, SelectionService);
27
+ configureCommand(context, SelectCommand);
28
+ configureCommand(context, SelectAllCommand);
29
+ configureCommand(context, SelectFeedbackCommand);
30
+ bindAsService(context, TYPES.MouseListener, RankedSelectMouseListener);
30
31
  bind(TYPES.SModelRootListener).toService(SelectionService);
31
32
  });
32
33
 
@@ -15,7 +15,6 @@
15
15
  ********************************************************************************/
16
16
  import { Action, SelectAction } from '@eclipse-glsp/protocol';
17
17
  import {
18
- BringToFrontAction,
19
18
  findParentByFeature,
20
19
  isCtrlOrCmd,
21
20
  isSelectable,
@@ -27,6 +26,7 @@ import {
27
26
  SRoutingHandle,
28
27
  SwitchEditModeAction
29
28
  } from 'sprotty';
29
+ import { BringToFrontAction } from 'sprotty-protocol/lib/actions';
30
30
  import { toArray } from 'sprotty/lib/utils/iterable';
31
31
  import { DEFAULT_RANK, Ranked } from '../rank/model';
32
32
 
@@ -37,7 +37,7 @@ import { DEFAULT_RANK, Ranked } from '../rank/model';
37
37
  export class RankedSelectMouseListener extends SelectMouseListener implements Ranked {
38
38
  rank: number = DEFAULT_RANK - 1; /* we want to be executed before all default mouse listeners */
39
39
 
40
- override mouseDown(target: SModelElement, event: MouseEvent): Action[] {
40
+ override mouseDown(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
41
41
  const result: Action[] = [];
42
42
  if (this.buttonHandlerRegistry !== undefined && target instanceof SButton && target.enabled) {
43
43
  const buttonHandler = this.buttonHandlerRegistry.get(target.type);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2022 EclipseSource and others.
2
+ * Copyright (c) 2020-2023 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,7 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  /* eslint-disable import/no-deprecated,no-unused-expressions */
17
- import { Action, SModelElementSchema } from '@eclipse-glsp/protocol';
17
+ import { Action, initializeContainer, SModelElementSchema } from '@eclipse-glsp/protocol';
18
18
  import { AssertionError, expect } from 'chai';
19
19
  import { Container, injectable } from 'inversify';
20
20
  import { defaultModule, SGraphFactory, SModelRoot } from 'sprotty';
@@ -72,8 +72,7 @@ class MockSelectionListener implements SelectionListener {
72
72
  }
73
73
 
74
74
  function createContainer(): Container {
75
- const container = new Container();
76
- container.load(defaultModule);
75
+ const container = initializeContainer(new Container(), defaultModule);
77
76
  // eslint-disable-next-line deprecation/deprecation
78
77
  container.rebind(TYPES.IModelFactory).to(SGraphFactory).inSingletonScope();
79
78
  container.bind(TYPES.IFeedbackActionDispatcher).to(MockFeedbackActionDispatcher).inSingletonScope();
@@ -200,7 +199,7 @@ describe('SelectionService', () => {
200
199
  selectionService.modelRootChanged(newRoot);
201
200
  assertSelectionAndFeedback(['node1'], ['node2']);
202
201
  });
203
- it('Changing root with new selection correctly selects matchting elements and deselects not matching elements.', () => {
202
+ it('Changing root with new selection correctly selects matching elements and deselects not matching elements.', () => {
204
203
  assertSelectionAndFeedback([], []);
205
204
  selectionService.updateSelection(root, ['node1', 'node2'], []);
206
205
  assertSelectionAndFeedback(['node1', 'node2'], []);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2021 EclipseSource and others.
2
+ * Copyright (c) 2019-2022 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
@@ -0,0 +1,26 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ import { ContainerModule } from 'inversify';
18
+ import { TYPES } from '../../base/types';
19
+ import { MetadataPlacer } from './metadata-placer';
20
+
21
+ const svgMetadataModule = new ContainerModule(bind => {
22
+ bind(MetadataPlacer).toSelf().inSingletonScope();
23
+ bind(TYPES.IVNodePostprocessor).toService(MetadataPlacer);
24
+ });
25
+
26
+ export default svgMetadataModule;
@@ -0,0 +1,51 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ import { injectable, inject } from 'inversify';
18
+ import { VNode } from 'snabbdom';
19
+ import { IVNodePostprocessor, SChildElement, SEdge, setAttr, SModelElement, SModelRoot } from 'sprotty';
20
+ import { DOMHelper } from 'sprotty/lib/base/views/dom-helper';
21
+ import { TYPES } from '../../base/types';
22
+
23
+ @injectable()
24
+ export class MetadataPlacer implements IVNodePostprocessor {
25
+ @inject(TYPES.DOMHelper) protected domHelper: DOMHelper;
26
+
27
+ decorate(vnode: VNode, element: SModelElement): VNode {
28
+ if (element instanceof SModelRoot) {
29
+ setAttr(vnode, 'data-svg-metadata-api', true);
30
+ }
31
+
32
+ setAttr(vnode, 'data-svg-metadata-type', element.type);
33
+
34
+ if (element instanceof SChildElement) {
35
+ setAttr(vnode, 'data-svg-metadata-parent-id', this.domHelper.createUniqueDOMElementId(element.parent));
36
+ }
37
+ if (element instanceof SEdge) {
38
+ if (element.source !== undefined) {
39
+ setAttr(vnode, 'data-svg-metadata-edge-source-id', this.domHelper.createUniqueDOMElementId(element.source));
40
+ }
41
+ if (element.target !== undefined) {
42
+ setAttr(vnode, 'data-svg-metadata-edge-target-id', this.domHelper.createUniqueDOMElementId(element.target));
43
+ }
44
+ }
45
+ return vnode;
46
+ }
47
+
48
+ postUpdate(): void {
49
+ // empty
50
+ }
51
+ }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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
@@ -25,12 +25,12 @@ import {
25
25
  isSelectable,
26
26
  isViewport,
27
27
  MouseListener,
28
- MoveAction,
29
28
  SChildElement,
30
29
  SModelElement,
31
30
  SModelRoot,
32
31
  TYPES
33
32
  } from 'sprotty';
33
+ import { MoveAction } from 'sprotty-protocol/lib/actions';
34
34
  import { forEachElement } from '../../utils/smodel-util';
35
35
  import { addResizeHandles, isResizable, removeResizeHandles, SResizeHandle } from '../change-bounds/model';
36
36
  import { createMovementRestrictionFeedback, removeMovementRestrictionFeedback } from '../change-bounds/movement-restrictor';
@@ -221,7 +221,7 @@ export class FeedbackMoveMouseListener extends MouseListener {
221
221
  }
222
222
  }
223
223
 
224
- protected validateMove(startPostion: Point, toPosition: Point, element: SModelElement, isFinished: boolean): Point {
224
+ protected validateMove(startPosition: Point, toPosition: Point, element: SModelElement, isFinished: boolean): Point {
225
225
  let newPosition = toPosition;
226
226
  if (this.tool.movementRestrictor) {
227
227
  const valid = this.tool.movementRestrictor.validate(element, toPosition);
@@ -230,7 +230,7 @@ export class FeedbackMoveMouseListener extends MouseListener {
230
230
  action = createMovementRestrictionFeedback(element, this.tool.movementRestrictor);
231
231
 
232
232
  if (isFinished) {
233
- newPosition = startPostion;
233
+ newPosition = startPosition;
234
234
  }
235
235
  } else {
236
236
  action = removeMovementRestrictionFeedback(element, this.tool.movementRestrictor);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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 { Action, Bounds, Point } from '@eclipse-glsp/protocol';
16
+ import { Action, Bounds, Point, SEdgeSchema } from '@eclipse-glsp/protocol';
17
17
  import { inject, injectable } from 'inversify';
18
18
  import {
19
19
  AnchorComputerRegistry,
@@ -24,17 +24,16 @@ import {
24
24
  isBoundsAware,
25
25
  isConnectable,
26
26
  MouseListener,
27
- MoveAction,
28
27
  PolylineEdgeRouter,
29
28
  SChildElement,
30
29
  SConnectableElement,
31
30
  SDanglingAnchor,
32
- SEdge as SEdgeSchema,
33
31
  SModelElement,
34
32
  SModelRoot,
35
33
  SRoutableElement,
36
34
  TYPES
37
35
  } from 'sprotty';
36
+ import { MoveAction } from 'sprotty-protocol/lib/actions';
38
37
  import { BoundsAwareModelElement, isRoutable } from '../../utils/smodel-util';
39
38
  import { getAbsolutePosition, toAbsoluteBounds, toAbsolutePosition } from '../../utils/viewpoint-util';
40
39
  import { FeedbackCommand } from './model';
@@ -42,7 +41,7 @@ export interface DrawFeedbackEdgeAction extends Action {
42
41
  kind: typeof DrawFeedbackEdgeAction.KIND;
43
42
  elementTypeId: string;
44
43
  sourceId: string;
45
- edgeSchema?: SEdgeSchema;
44
+ edgeSchema?: Partial<SEdgeSchema>;
46
45
  }
47
46
 
48
47
  export namespace DrawFeedbackEdgeAction {
@@ -52,7 +51,11 @@ export namespace DrawFeedbackEdgeAction {
52
51
  return Action.hasKind(object, KIND);
53
52
  }
54
53
 
55
- export function create(options: { elementTypeId: string; sourceId: string; edgeSchema?: SEdgeSchema }): DrawFeedbackEdgeAction {
54
+ export function create(options: {
55
+ elementTypeId: string;
56
+ sourceId: string;
57
+ edgeSchema?: Partial<SEdgeSchema>;
58
+ }): DrawFeedbackEdgeAction {
56
59
  return {
57
60
  kind: KIND,
58
61
  ...options
@@ -69,8 +72,7 @@ export class DrawFeedbackEdgeCommand extends FeedbackCommand {
69
72
  }
70
73
 
71
74
  execute(context: CommandExecutionContext): CommandReturn {
72
- const feedbackEdgeSchema = this.action.edgeSchema ? this.action.edgeSchema : defaultFeedbackEdgeSchema;
73
- drawFeedbackEdge(context, this.action.sourceId, this.action.elementTypeId, feedbackEdgeSchema);
75
+ drawFeedbackEdge(context, this.action.sourceId, this.action.elementTypeId, this.action.edgeSchema);
74
76
  return context.root;
75
77
  }
76
78
  }
@@ -195,16 +197,16 @@ export function feedbackEdgeEndId(root: SModelRoot): string {
195
197
  return root.id + '_feedback_anchor';
196
198
  }
197
199
 
198
- export const defaultFeedbackEdgeSchema: SEdgeSchema = {
200
+ export const defaultFeedbackEdgeSchema: Partial<SEdgeSchema> = {
199
201
  cssClasses: ['feedback-edge'],
200
202
  opacity: 0.3
201
- } as SEdgeSchema;
203
+ };
202
204
 
203
205
  export function drawFeedbackEdge(
204
206
  context: CommandExecutionContext,
205
207
  sourceId: string,
206
208
  elementTypeId: string,
207
- feedbackEdgeSchema: SEdgeSchema
209
+ edgeTemplate?: Partial<SEdgeSchema>
208
210
  ): void {
209
211
  const root = context.root;
210
212
  const sourceChild = root.index.getById(sourceId);
@@ -221,12 +223,16 @@ export function drawFeedbackEdge(
221
223
  edgeEnd.id = feedbackEdgeEndId(root);
222
224
  edgeEnd.position = toAbsolutePosition(source);
223
225
 
224
- feedbackEdgeSchema.id = feedbackEdgeId(root);
225
- feedbackEdgeSchema.type = elementTypeId;
226
- feedbackEdgeSchema.sourceId = source.id;
227
- feedbackEdgeSchema.targetId = edgeEnd.id;
226
+ const edgeSchema: SEdgeSchema = {
227
+ id: feedbackEdgeId(root),
228
+ type: elementTypeId,
229
+ sourceId: source.id,
230
+ targetId: edgeEnd.id,
231
+ ...defaultFeedbackEdgeSchema,
232
+ ...edgeTemplate
233
+ };
228
234
 
229
- const feedbackEdge = context.modelFactory.createElement(feedbackEdgeSchema);
235
+ const feedbackEdge = context.modelFactory.createElement(edgeSchema);
230
236
  if (isRoutable(feedbackEdge)) {
231
237
  edgeEnd.feedbackEdge = feedbackEdge;
232
238
  root.add(edgeEnd);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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,6 +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 { bindAsService } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule } from 'inversify';
17
18
  import { configureCommand, configureView, LocationPostprocessor, MoveCommand } from 'sprotty';
18
19
  import { TYPES } from '../../base/types';
@@ -31,35 +32,36 @@ import { DrawMarqueeCommand, RemoveMarqueeCommand } from './marquee-tool-feedbac
31
32
  import { FeedbackEdgeEndView, SResizeHandleView } from './view';
32
33
 
33
34
  const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
35
+ const context = { bind, isBound };
34
36
  bind(TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();
35
37
 
36
- configureCommand({ bind, isBound }, ModifyCssFeedbackCommand);
38
+ configureCommand(context, ModifyCssFeedbackCommand);
37
39
 
38
40
  // create node and edge tool feedback
39
- configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
40
- configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);
41
+ configureCommand(context, DrawFeedbackEdgeCommand);
42
+ configureCommand(context, RemoveFeedbackEdgeCommand);
41
43
 
42
- configureCommand({ bind, isBound }, DrawMarqueeCommand);
43
- configureCommand({ bind, isBound }, RemoveMarqueeCommand);
44
+ configureCommand(context, DrawMarqueeCommand);
45
+ configureCommand(context, RemoveMarqueeCommand);
44
46
 
45
- configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
46
- // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
47
- configureCommand({ bind, isBound }, MoveCommand);
47
+ configureView(context, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
48
+ // move tool feedback: we use sprotty's MoveCommand as client-side visual feedback
49
+ configureCommand(context, MoveCommand);
48
50
 
49
51
  // resize tool feedback
50
- configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
51
- configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
52
- configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);
52
+ configureCommand(context, ShowChangeBoundsToolResizeFeedbackCommand);
53
+ configureCommand(context, HideChangeBoundsToolResizeFeedbackCommand);
54
+ configureView(context, SResizeHandle.TYPE, SResizeHandleView);
53
55
 
54
56
  // reconnect edge tool feedback
55
- configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
56
- configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
57
- configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);
57
+ configureCommand(context, ShowEdgeReconnectHandlesFeedbackCommand);
58
+ configureCommand(context, HideEdgeReconnectHandlesFeedbackCommand);
59
+ configureCommand(context, DrawFeedbackEdgeSourceCommand);
58
60
 
59
- configureCommand({ bind, isBound }, SwitchRoutingModeCommand);
61
+ configureCommand(context, SwitchRoutingModeCommand);
60
62
 
61
- bind(TYPES.IVNodePostprocessor).to(LocationPostprocessor);
62
- bind(TYPES.HiddenVNodePostprocessor).to(LocationPostprocessor);
63
+ bindAsService(context, TYPES.IVNodePostprocessor, LocationPostprocessor);
64
+ bind(TYPES.HiddenVNodePostprocessor).toService(LocationPostprocessor);
63
65
  });
64
66
 
65
67
  export default toolFeedbackModule;
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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
@@ -29,16 +29,15 @@ import {
29
29
  ISnapper,
30
30
  isSelected,
31
31
  MouseListener,
32
- MoveAction,
33
32
  PolylineEdgeRouter,
34
33
  SConnectableElement,
35
34
  SModelElement,
36
- SModelRoot,
37
35
  SRoutingHandle,
38
36
  SwitchEditModeAction,
39
37
  SwitchEditModeCommand,
40
38
  TYPES
41
39
  } from 'sprotty';
40
+ import { MoveAction } from 'sprotty-protocol/lib/actions';
42
41
  import { forEachElement, isRoutable, isRoutingHandle } from '../../utils/smodel-util';
43
42
  import { getAbsolutePosition, toAbsoluteBounds } from '../../utils/viewpoint-util';
44
43
  import { PointPositionUpdater } from '../change-bounds/snap';
@@ -326,14 +325,7 @@ export class FeedbackEdgeRouteMovingMouseListener extends MouseListener {
326
325
  return undefined;
327
326
  }
328
327
 
329
- override mouseEnter(target: SModelElement, event: MouseEvent): Action[] {
330
- if (target instanceof SModelRoot && event.buttons === 0) {
331
- this.mouseUp(target, event);
332
- }
333
- return [];
334
- }
335
-
336
- override mouseUp(_target: SModelElement, event: MouseEvent): Action[] {
328
+ override mouseUp(_target: SModelElement, _event: MouseEvent): Action[] {
337
329
  this.pointPositionUpdater.resetPosition();
338
330
  return [];
339
331
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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,15 +13,15 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { bindAsService } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule } from 'inversify';
17
18
  import { configureActionHandler, EnableDefaultToolsAction } from 'sprotty';
18
19
  import '../../../css/tool-palette.css';
19
20
  import { TYPES } from '../../base/types';
20
21
  import { EnableToolPaletteAction, ToolPalette } from './tool-palette';
21
22
 
22
- const toolPaletteModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
23
- bind(ToolPalette).toSelf().inSingletonScope();
24
- bind(TYPES.IUIExtension).toService(ToolPalette);
23
+ const toolPaletteModule = new ContainerModule((bind, _unbind, isBound, _rebind) => {
24
+ bindAsService(bind, TYPES.IUIExtension, ToolPalette);
25
25
  configureActionHandler({ bind, isBound }, EnableToolPaletteAction.KIND, ToolPalette);
26
26
  configureActionHandler({ bind, isBound }, EnableDefaultToolsAction.KIND, ToolPalette);
27
27
  });
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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 { Action, PaletteItem, RequestContextActions, RequestMarkersAction, SetContextActions } from '@eclipse-glsp/protocol';
16
+ import { Action, MarkersReason, PaletteItem, RequestContextActions, RequestMarkersAction, SetContextActions } from '@eclipse-glsp/protocol';
17
17
  import { inject, injectable, postConstruct } from 'inversify';
18
18
  import {
19
19
  AbstractUIExtension,
@@ -22,8 +22,8 @@ import {
22
22
  IActionHandler,
23
23
  ICommand,
24
24
  IToolManager,
25
- SetUIExtensionVisibilityAction,
26
25
  SModelRoot,
26
+ SetUIExtensionVisibilityAction,
27
27
  TYPES
28
28
  } from 'sprotty';
29
29
  import { codiconCSSClasses } from 'sprotty/lib/utils/codicon';
@@ -222,7 +222,7 @@ export class ToolPalette extends AbstractUIExtension implements IActionHandler,
222
222
  validateActionButton.title = 'Validate model';
223
223
  validateActionButton.onclick = _event => {
224
224
  const modelIds: string[] = [this.modelRootId];
225
- this.actionDispatcher.dispatch(RequestMarkersAction.create(modelIds));
225
+ this.actionDispatcher.dispatch(RequestMarkersAction.create(modelIds, { reason: MarkersReason.BATCH }));
226
226
  };
227
227
  return validateActionButton;
228
228
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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 {
17
17
  Action,
18
18
  Bounds,
19
19
  ChangeBoundsOperation,
@@ -243,16 +243,16 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements Sele
243
243
  // If client routing is enabled -> delegate routingpoints of connected edges to server
244
244
  forEachElement(target.index, isNonRoutableSelectedMovableBoundsAware, element => {
245
245
  if (element instanceof SConnectableElement) {
246
- element.incomingEdges.map(connectable => calcElementAndRoutingPoints(connectable, routerRegistry))
246
+ element.incomingEdges
247
+ .map(connectable => calcElementAndRoutingPoints(connectable, routerRegistry))
247
248
  .forEach(ear => newRoutingPoints.push(ear));
248
- element.outgoingEdges.map(connectable => calcElementAndRoutingPoints(connectable, routerRegistry))
249
+ element.outgoingEdges
250
+ .map(connectable => calcElementAndRoutingPoints(connectable, routerRegistry))
249
251
  .forEach(ear => newRoutingPoints.push(ear));
250
252
  }
251
253
  });
252
254
  }
253
- return newRoutingPoints.length > 0
254
- ? [ChangeRoutingPointsOperation.create(newRoutingPoints)]
255
- : [];
255
+ return newRoutingPoints.length > 0 ? [ChangeRoutingPointsOperation.create(newRoutingPoints)] : [];
256
256
  }
257
257
 
258
258
  protected handleResize(activeResizeHandle: SResizeHandle): Action[] {
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2022 EclipseSource and others.
2
+ * Copyright (c) 2019-2023 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,18 +13,18 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
17
- import { ContainerModule, interfaces } from 'inversify';
18
- import { configureActionHandler, configureModelElement } from 'sprotty';
16
+ import { bindAsService, BindingContext, bindOrRebind, TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
17
+ import { ContainerModule } from 'inversify';
18
+ import { configureActionHandler, configureModelElement, ManhattanEdgeRouter } from 'sprotty';
19
19
  import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
20
20
  import { TYPES } from '../../base/types';
21
- import { GLSPSvgExporter } from '../export/glsp-svg-exporter';
22
21
  import { MARQUEE } from '../tool-feedback/marquee-tool-feedback';
23
22
  import { ChangeBoundsTool } from './change-bounds-tool';
24
23
  import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
25
24
  import { EdgeCreationTool } from './edge-creation-tool';
26
25
  import { EdgeEditTool } from './edge-edit-tool';
27
26
  import { EnableDefaultToolsOnFocusLossHandler } from './enable-default-tools-on-focus-loss';
27
+ import { GLSPManhattanEdgeRouter } from './glsp-manhattan-edge-router';
28
28
  import { MarqueeMouseTool } from './marquee-mouse-tool';
29
29
  import { MarqueeTool } from './marquee-tool';
30
30
  import { MarqueeNode } from './model';
@@ -36,30 +36,29 @@ import { MarqueeView } from './view';
36
36
  * and adds the marquee selection tool.
37
37
  */
38
38
  export const toolsModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
39
+ const context = { bind, isBound, rebind };
39
40
  // Register default tools
40
- bind(TYPES.IDefaultTool).to(ChangeBoundsTool);
41
- bind(TYPES.IDefaultTool).to(EdgeEditTool);
42
- bind(TYPES.IDefaultTool).to(DelKeyDeleteTool);
41
+ bindAsService(context, TYPES.IDefaultTool, ChangeBoundsTool);
42
+ bindAsService(context, TYPES.IDefaultTool, EdgeEditTool);
43
+ bindAsService(context, TYPES.IDefaultTool, DelKeyDeleteTool);
43
44
 
44
45
  // Register tools
45
- bind(TYPES.ITool).to(MouseDeleteTool);
46
- bind(NodeCreationTool).toSelf().inSingletonScope();
47
- bind(EdgeCreationTool).toSelf().inSingletonScope();
48
- bind(TYPES.ITool).toService(EdgeCreationTool);
49
- bind(TYPES.ITool).toService(NodeCreationTool);
46
+ bindAsService(context, TYPES.ITool, MouseDeleteTool);
47
+ bindAsService(context, TYPES.ITool, NodeCreationTool);
48
+ bindAsService(context, TYPES.ITool, EdgeCreationTool);
50
49
 
51
- configureMarqueeTool({ bind, isBound });
52
- configureActionHandler({ bind, isBound }, TriggerNodeCreationAction.KIND, NodeCreationTool);
53
- configureActionHandler({ bind, isBound }, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
50
+ configureMarqueeTool(context);
51
+ configureActionHandler(context, TriggerNodeCreationAction.KIND, NodeCreationTool);
52
+ configureActionHandler(context, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
54
53
 
55
- bind(GLSPSvgExporter).toSelf().inSingletonScope();
56
- rebind(TYPES.SvgExporter).toService(GLSPSvgExporter);
54
+ bind(GLSPManhattanEdgeRouter).toSelf().inSingletonScope();
55
+ bindOrRebind(context, ManhattanEdgeRouter).toService(GLSPManhattanEdgeRouter);
57
56
  });
58
57
 
59
- export function configureMarqueeTool(context: { bind: interfaces.Bind; isBound: interfaces.IsBound }): void {
58
+ export function configureMarqueeTool(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
60
59
  configureModelElement(context, MARQUEE, MarqueeNode, MarqueeView);
61
- context.bind(TYPES.IDefaultTool).to(MarqueeTool);
62
- context.bind(TYPES.ITool).to(MarqueeMouseTool);
60
+ bindAsService(context, TYPES.IDefaultTool, MarqueeTool);
61
+ bindAsService(context, TYPES.ITool, MarqueeMouseTool);
63
62
  }
64
63
 
65
64
  /**