@eclipse-glsp/client 2.2.0-next.343 → 2.2.0-next.345

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 (238) hide show
  1. package/lib/base/default.module.d.ts.map +1 -1
  2. package/lib/base/default.module.js +2 -0
  3. package/lib/base/default.module.js.map +1 -1
  4. package/lib/features/accessibility/accessibility-module.d.ts +1 -1
  5. package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
  6. package/lib/features/accessibility/accessibility-module.js +10 -8
  7. package/lib/features/accessibility/accessibility-module.js.map +1 -1
  8. package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +6 -4
  9. package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -1
  10. package/lib/features/accessibility/element-navigation/element-navigation-module.js +8 -8
  11. package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -1
  12. package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +6 -4
  13. package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -1
  14. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +6 -6
  15. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -1
  16. package/lib/features/accessibility/key-shortcut/{di.config.d.ts → shortcut-help-module.d.ts} +7 -5
  17. package/lib/features/accessibility/key-shortcut/shortcut-help-module.d.ts.map +1 -0
  18. package/lib/features/accessibility/key-shortcut/{di.config.js → shortcut-help-module.js} +6 -6
  19. package/lib/features/accessibility/key-shortcut/shortcut-help-module.js.map +1 -0
  20. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts +1 -1
  21. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts.map +1 -1
  22. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js +7 -7
  23. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js.map +1 -1
  24. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.d.ts.map +1 -1
  25. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +1 -1
  26. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
  27. package/lib/features/accessibility/move-zoom/move-zoom-module.d.ts.map +1 -1
  28. package/lib/features/accessibility/move-zoom/move-zoom-module.js +1 -1
  29. package/lib/features/accessibility/move-zoom/move-zoom-module.js.map +1 -1
  30. package/lib/features/accessibility/resize-key-tool/resize-key-module.d.ts.map +1 -1
  31. package/lib/features/accessibility/resize-key-tool/resize-key-module.js +1 -1
  32. package/lib/features/accessibility/resize-key-tool/resize-key-module.js.map +1 -1
  33. package/lib/features/accessibility/search/search-palette-module.d.ts.map +1 -1
  34. package/lib/features/accessibility/search/search-palette-module.js +1 -1
  35. package/lib/features/accessibility/search/search-palette-module.js.map +1 -1
  36. package/lib/features/accessibility/toast/toast-module.d.ts +6 -4
  37. package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -1
  38. package/lib/features/accessibility/toast/toast-module.js +5 -5
  39. package/lib/features/accessibility/toast/toast-module.js.map +1 -1
  40. package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
  41. package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
  42. package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +3 -3
  43. package/lib/features/accessibility/view-key-tools/deselect-key-tool.js.map +1 -1
  44. package/lib/features/accessibility/view-key-tools/view-key-tools-module.d.ts.map +1 -1
  45. package/lib/features/accessibility/view-key-tools/view-key-tools-module.js +3 -1
  46. package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -1
  47. package/lib/features/bounds/bounds-module.d.ts.map +1 -1
  48. package/lib/features/bounds/bounds-module.js +1 -1
  49. package/lib/features/bounds/bounds-module.js.map +1 -1
  50. package/lib/features/change-bounds/model.d.ts +7 -4
  51. package/lib/features/change-bounds/model.d.ts.map +1 -1
  52. package/lib/features/change-bounds/model.js +12 -11
  53. package/lib/features/change-bounds/model.js.map +1 -1
  54. package/lib/features/change-bounds/movement-restrictor.js +2 -2
  55. package/lib/features/command-palette/command-palette-module.d.ts.map +1 -1
  56. package/lib/features/command-palette/command-palette-module.js +1 -1
  57. package/lib/features/command-palette/command-palette-module.js.map +1 -1
  58. package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
  59. package/lib/features/context-menu/context-menu-module.js +1 -1
  60. package/lib/features/context-menu/context-menu-module.js.map +1 -1
  61. package/lib/features/copy-paste/copy-paste-modules.d.ts.map +1 -1
  62. package/lib/features/copy-paste/copy-paste-modules.js +5 -2
  63. package/lib/features/copy-paste/copy-paste-modules.js.map +1 -1
  64. package/lib/features/debug/debug-module.d.ts.map +1 -1
  65. package/lib/features/debug/debug-module.js +1 -1
  66. package/lib/features/debug/debug-module.js.map +1 -1
  67. package/lib/features/decoration/decoration-module.d.ts.map +1 -1
  68. package/lib/features/decoration/decoration-module.js +1 -1
  69. package/lib/features/decoration/decoration-module.js.map +1 -1
  70. package/lib/features/element-template/element-template-module.d.ts.map +1 -1
  71. package/lib/features/element-template/element-template-module.js +1 -1
  72. package/lib/features/element-template/element-template-module.js.map +1 -1
  73. package/lib/features/export/export-modules.d.ts.map +1 -1
  74. package/lib/features/export/export-modules.js +2 -2
  75. package/lib/features/export/export-modules.js.map +1 -1
  76. package/lib/features/grid/grid-module.d.ts.map +1 -1
  77. package/lib/features/grid/grid-module.js +1 -1
  78. package/lib/features/grid/grid-module.js.map +1 -1
  79. package/lib/features/helper-lines/helper-line-manager-default.js +1 -1
  80. package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -1
  81. package/lib/features/helper-lines/helper-line-module.js +1 -1
  82. package/lib/features/helper-lines/helper-line-module.js.map +1 -1
  83. package/lib/features/hints/type-hints-module.d.ts.map +1 -1
  84. package/lib/features/hints/type-hints-module.js +1 -1
  85. package/lib/features/hints/type-hints-module.js.map +1 -1
  86. package/lib/features/hover/hover-module.d.ts.map +1 -1
  87. package/lib/features/hover/hover-module.js +1 -1
  88. package/lib/features/hover/hover-module.js.map +1 -1
  89. package/lib/features/label-edit/label-edit-module.d.ts.map +1 -1
  90. package/lib/features/label-edit/label-edit-module.js +1 -1
  91. package/lib/features/label-edit/label-edit-module.js.map +1 -1
  92. package/lib/features/label-edit-ui/label-edit-ui-module.d.ts.map +1 -1
  93. package/lib/features/label-edit-ui/label-edit-ui-module.js +1 -1
  94. package/lib/features/label-edit-ui/label-edit-ui-module.js.map +1 -1
  95. package/lib/features/layout/layout-module.d.ts.map +1 -1
  96. package/lib/features/layout/layout-module.js +1 -1
  97. package/lib/features/layout/layout-module.js.map +1 -1
  98. package/lib/features/navigation/navigation-module.d.ts.map +1 -1
  99. package/lib/features/navigation/navigation-module.js +1 -1
  100. package/lib/features/navigation/navigation-module.js.map +1 -1
  101. package/lib/features/routing/routing-module.d.ts.map +1 -1
  102. package/lib/features/routing/routing-module.js +1 -1
  103. package/lib/features/routing/routing-module.js.map +1 -1
  104. package/lib/features/save/save-module.d.ts.map +1 -1
  105. package/lib/features/save/save-module.js +1 -1
  106. package/lib/features/save/save-module.js.map +1 -1
  107. package/lib/features/select/select-module.d.ts.map +1 -1
  108. package/lib/features/select/select-module.js +2 -2
  109. package/lib/features/select/select-module.js.map +1 -1
  110. package/lib/features/select/select-mouse-listener.js +1 -1
  111. package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -1
  112. package/lib/features/source-model-watcher/source-model-watcher-module.js +1 -1
  113. package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -1
  114. package/lib/features/status/status-module.d.ts.map +1 -1
  115. package/lib/features/status/status-module.js +1 -1
  116. package/lib/features/status/status-module.js.map +1 -1
  117. package/lib/features/svg-metadata/svg-metadata-module.d.ts.map +1 -1
  118. package/lib/features/svg-metadata/svg-metadata-module.js +1 -1
  119. package/lib/features/svg-metadata/svg-metadata-module.js.map +1 -1
  120. package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
  121. package/lib/features/tool-palette/tool-palette-module.js +1 -1
  122. package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
  123. package/lib/features/tools/change-bounds/change-bounds-manager.d.ts.map +1 -1
  124. package/lib/features/tools/change-bounds/change-bounds-manager.js +1 -1
  125. package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -1
  126. package/lib/features/tools/change-bounds/change-bounds-tool-module.js +2 -2
  127. package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -1
  128. package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js +2 -2
  129. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +3 -3
  130. package/lib/features/tools/change-bounds/change-bounds-tool.js +1 -1
  131. package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts +6 -6
  132. package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts.map +1 -1
  133. package/lib/features/tools/change-bounds/change-bounds-tracker.js +2 -2
  134. package/lib/features/tools/change-bounds/view.d.ts +8 -5
  135. package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
  136. package/lib/features/tools/change-bounds/view.js +8 -7
  137. package/lib/features/tools/change-bounds/view.js.map +1 -1
  138. package/lib/features/tools/deletion/deletion-tool-module.d.ts.map +1 -1
  139. package/lib/features/tools/deletion/deletion-tool-module.js +1 -1
  140. package/lib/features/tools/deletion/deletion-tool-module.js.map +1 -1
  141. package/lib/features/tools/edge-creation/edege-creation-module.d.ts.map +1 -1
  142. package/lib/features/tools/edge-creation/edege-creation-module.js +1 -1
  143. package/lib/features/tools/edge-creation/edege-creation-module.js.map +1 -1
  144. package/lib/features/tools/edge-edit/edge-edit-module.d.ts.map +1 -1
  145. package/lib/features/tools/edge-edit/edge-edit-module.js +1 -1
  146. package/lib/features/tools/edge-edit/edge-edit-module.js.map +1 -1
  147. package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts.map +1 -1
  148. package/lib/features/tools/marquee-selection/marquee-selection-module.js +1 -1
  149. package/lib/features/tools/marquee-selection/marquee-selection-module.js.map +1 -1
  150. package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -1
  151. package/lib/features/tools/node-creation/node-creation-module.js +4 -1
  152. package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
  153. package/lib/features/tools/tool-focus-loss-module.d.ts +15 -0
  154. package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
  155. package/lib/features/tools/tool-focus-loss-module.js +2 -2
  156. package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
  157. package/lib/features/undo-redo/undo-redo-module.d.ts +3 -3
  158. package/lib/features/undo-redo/undo-redo-module.d.ts.map +1 -1
  159. package/lib/features/undo-redo/undo-redo-module.js +3 -4
  160. package/lib/features/undo-redo/undo-redo-module.js.map +1 -1
  161. package/lib/features/validation/validation-modules.d.ts.map +1 -1
  162. package/lib/features/validation/validation-modules.js +3 -3
  163. package/lib/features/validation/validation-modules.js.map +1 -1
  164. package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
  165. package/lib/features/viewport/viewport-modules.js +2 -2
  166. package/lib/features/viewport/viewport-modules.js.map +1 -1
  167. package/lib/index.d.ts +1 -1
  168. package/lib/index.d.ts.map +1 -1
  169. package/lib/index.js +1 -1
  170. package/lib/index.js.map +1 -1
  171. package/lib/standalone-modules.d.ts +1 -1
  172. package/lib/standalone-modules.d.ts.map +1 -1
  173. package/lib/standalone-modules.js +1 -1
  174. package/lib/standalone-modules.js.map +1 -1
  175. package/lib/views/base-view-module.d.ts.map +1 -1
  176. package/lib/views/base-view-module.js +1 -1
  177. package/lib/views/base-view-module.js.map +1 -1
  178. package/package.json +3 -3
  179. package/src/base/default.module.ts +80 -73
  180. package/src/features/accessibility/accessibility-module.ts +25 -20
  181. package/src/features/accessibility/element-navigation/element-navigation-module.ts +17 -10
  182. package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +14 -7
  183. package/src/features/accessibility/key-shortcut/{di.config.ts → shortcut-help-module.ts} +14 -7
  184. package/src/features/accessibility/keyboard-pointer/keyboard-pointer-module.ts +18 -15
  185. package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.ts +7 -4
  186. package/src/features/accessibility/move-zoom/move-zoom-module.ts +7 -4
  187. package/src/features/accessibility/resize-key-tool/resize-key-module.ts +7 -4
  188. package/src/features/accessibility/search/search-palette-module.ts +7 -4
  189. package/src/features/accessibility/toast/toast-module.ts +14 -7
  190. package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +8 -8
  191. package/src/features/accessibility/view-key-tools/view-key-tools-module.ts +10 -5
  192. package/src/features/bounds/bounds-module.ts +20 -17
  193. package/src/features/change-bounds/model.ts +17 -12
  194. package/src/features/change-bounds/movement-restrictor.ts +3 -3
  195. package/src/features/command-palette/command-palette-module.ts +9 -6
  196. package/src/features/context-menu/context-menu-module.ts +16 -13
  197. package/src/features/copy-paste/copy-paste-modules.ts +11 -5
  198. package/src/features/debug/debug-module.ts +10 -7
  199. package/src/features/decoration/decoration-module.ts +6 -3
  200. package/src/features/element-template/element-template-module.ts +8 -5
  201. package/src/features/export/export-modules.ts +10 -7
  202. package/src/features/grid/grid-module.ts +11 -8
  203. package/src/features/helper-lines/helper-line-manager-default.ts +2 -2
  204. package/src/features/helper-lines/helper-line-module.ts +16 -13
  205. package/src/features/hints/type-hints-module.ts +10 -7
  206. package/src/features/hover/hover-module.ts +28 -25
  207. package/src/features/label-edit/label-edit-module.ts +9 -6
  208. package/src/features/label-edit-ui/label-edit-ui-module.ts +9 -6
  209. package/src/features/layout/layout-module.ts +8 -5
  210. package/src/features/navigation/navigation-module.ts +11 -8
  211. package/src/features/routing/routing-module.ts +21 -18
  212. package/src/features/save/save-module.ts +6 -3
  213. package/src/features/select/select-module.ts +11 -8
  214. package/src/features/select/select-mouse-listener.ts +2 -2
  215. package/src/features/source-model-watcher/source-model-watcher-module.ts +6 -3
  216. package/src/features/status/status-module.ts +9 -6
  217. package/src/features/svg-metadata/svg-metadata-module.ts +7 -4
  218. package/src/features/tool-palette/tool-palette-module.ts +10 -7
  219. package/src/features/tools/change-bounds/change-bounds-manager.ts +2 -2
  220. package/src/features/tools/change-bounds/change-bounds-tool-module.ts +13 -10
  221. package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +3 -3
  222. package/src/features/tools/change-bounds/change-bounds-tool.ts +4 -4
  223. package/src/features/tools/change-bounds/change-bounds-tracker.ts +6 -6
  224. package/src/features/tools/change-bounds/view.tsx +11 -6
  225. package/src/features/tools/deletion/deletion-tool-module.ts +8 -5
  226. package/src/features/tools/edge-creation/edege-creation-module.ts +9 -6
  227. package/src/features/tools/edge-edit/edge-edit-module.ts +14 -11
  228. package/src/features/tools/marquee-selection/marquee-selection-module.ts +11 -8
  229. package/src/features/tools/node-creation/node-creation-module.ts +4 -1
  230. package/src/features/tools/tool-focus-loss-module.ts +7 -4
  231. package/src/features/undo-redo/undo-redo-module.ts +8 -6
  232. package/src/features/validation/validation-modules.ts +19 -13
  233. package/src/features/viewport/viewport-modules.ts +20 -17
  234. package/src/index.ts +1 -1
  235. package/src/standalone-modules.ts +12 -9
  236. package/src/views/base-view-module.ts +7 -4
  237. package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +0 -1
  238. package/lib/features/accessibility/key-shortcut/di.config.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2024 Business Informatics Group (TU Wien) 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,24 +13,31 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { ContainerModule } from 'inversify';
17
- import { BindingContext, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
18
- import { PositionNavigator } from './position-navigator';
19
- import { LocalElementNavigator } from './local-element-navigator';
20
- import { ElementNavigatorTool } from './diagram-navigation-tool';
16
+ import { BindingContext, FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
21
17
  import '../../../../css/navigation.css';
18
+ import { ElementNavigatorTool } from './diagram-navigation-tool';
19
+ import { LocalElementNavigator } from './local-element-navigator';
20
+ import { PositionNavigator } from './position-navigator';
22
21
 
23
22
  /**
24
23
  * Handles element navigation actions.
25
24
  */
26
25
 
27
- export const glspElementNavigationModule = new ContainerModule((bind, unbind, isBound, rebind) => {
28
- const context = { bind, unbind, isBound, rebind };
29
- configureElementNavigationTool(context);
30
- });
26
+ export const elementNavigationModule = new FeatureModule(
27
+ (bind, unbind, isBound, rebind) => {
28
+ const context = { bind, unbind, isBound, rebind };
29
+ configureElementNavigationTool(context);
30
+ },
31
+ { featureId: Symbol('elementNavigation') }
32
+ );
31
33
 
32
34
  export function configureElementNavigationTool(context: BindingContext): void {
33
35
  bindAsService(context, TYPES.IDefaultTool, ElementNavigatorTool);
34
36
  bindAsService(context, TYPES.IElementNavigator, PositionNavigator);
35
37
  bindAsService(context, TYPES.ILocalElementNavigator, LocalElementNavigator);
36
38
  }
39
+
40
+ export {
41
+ /** Deprecated use {@link elementNavigationModule} instead */
42
+ elementNavigationModule as glspElementNavigationModule
43
+ };
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2024 Business Informatics Group (TU Wien) 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,19 +14,26 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { ContainerModule } from 'inversify';
17
+ import { BindingContext, FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
18
18
  import { FocusTrackerTool } from './focus-tracker-tool';
19
- import { BindingContext, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
20
19
 
21
20
  /**
22
21
  * Handles actions for tracking the focus of the cursor.
23
22
  */
24
23
 
25
- export const glspFocusTrackerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
26
- const context = { bind, unbind, isBound, rebind };
27
- configureFocusTrackerTool(context);
28
- });
24
+ export const focusTrackerModule = new FeatureModule(
25
+ (bind, unbind, isBound, rebind) => {
26
+ const context = { bind, unbind, isBound, rebind };
27
+ configureFocusTrackerTool(context);
28
+ },
29
+ { featureId: Symbol('focusTracker') }
30
+ );
29
31
 
30
32
  export function configureFocusTrackerTool(context: BindingContext): void {
31
33
  bindAsService(context, TYPES.IDefaultTool, FocusTrackerTool);
32
34
  }
35
+
36
+ export {
37
+ /** Deprecated use {@link focusTrackerModule} instead */
38
+ focusTrackerModule as glspFocusTrackerModule
39
+ };
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2024 Business Informatics Group (TU Wien) 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,8 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { ContainerModule } from 'inversify';
18
- import { bindAsService, BindingContext, configureActionHandler, TYPES } from '@eclipse-glsp/sprotty';
17
+ import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
19
18
  import '../../../../css/key-shortcut.css';
20
19
  import { KeyShortcutUIExtension, SetAccessibleKeyShortcutAction } from './accessible-key-shortcut';
21
20
  import { AccessibleKeyShortcutTool } from './accessible-key-shortcut-tool';
@@ -23,13 +22,21 @@ import { AccessibleKeyShortcutTool } from './accessible-key-shortcut-tool';
23
22
  /**
24
23
  * Handles actions for displaying help/information about keyboard shortcuts.
25
24
  */
26
- export const glspShortcutHelpModule = new ContainerModule((bind, unbind, isBound, rebind) => {
27
- const context = { bind, unbind, isBound, rebind };
28
- configureShortcutHelpTool(context);
29
- });
25
+ export const shortcutHelpModule = new FeatureModule(
26
+ (bind, unbind, isBound, rebind) => {
27
+ const context = { bind, unbind, isBound, rebind };
28
+ configureShortcutHelpTool(context);
29
+ },
30
+ { featureId: Symbol('shortcutHelp') }
31
+ );
30
32
 
31
33
  export function configureShortcutHelpTool(context: BindingContext): void {
32
34
  bindAsService(context, TYPES.IDefaultTool, AccessibleKeyShortcutTool);
33
35
  bindAsService(context, TYPES.IUIExtension, KeyShortcutUIExtension);
34
36
  configureActionHandler(context, SetAccessibleKeyShortcutAction.KIND, KeyShortcutUIExtension);
35
37
  }
38
+
39
+ export {
40
+ /** Deprecated use {@link shortcutHelpModule} instead */
41
+ shortcutHelpModule as glspShortcutHelpModule
42
+ };
@@ -14,32 +14,35 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import {
17
+ BindingContext,
18
+ FeatureModule,
17
19
  TYPES,
18
- bindAsService,
19
- configureActionHandler,
20
+ TriggerEdgeCreationAction,
20
21
  TriggerNodeCreationAction,
21
- FeatureModule,
22
- BindingContext,
23
- TriggerEdgeCreationAction
22
+ bindAsService,
23
+ configureActionHandler
24
24
  } from '@eclipse-glsp/sprotty';
25
- import { GlobalKeyListenerTool } from '../global-keylistener-tool';
26
- import { KeyboardPointer } from './keyboard-pointer';
27
- import { KeyboardGrid } from '../keyboard-grid/keyboard-grid';
28
- import { SetKeyboardPointerRenderPositionAction } from './actions';
25
+ import { SetEdgeTargetSelectionAction } from '../edge-autocomplete/action';
29
26
  import { EdgeAutocompletePalette } from '../edge-autocomplete/edge-autocomplete-palette';
30
27
  import { EdgeAutocompletePaletteTool } from '../edge-autocomplete/edge-autocomplete-tool';
31
- import { SetEdgeTargetSelectionAction } from '../edge-autocomplete/action';
28
+ import { GlobalKeyListenerTool } from '../global-keylistener-tool';
29
+ import { EnableKeyboardGridAction, KeyboardGridCellSelectedAction } from '../keyboard-grid/action';
30
+ import { KeyboardGrid } from '../keyboard-grid/keyboard-grid';
32
31
  import { GridSearchPalette } from '../keyboard-grid/keyboard-grid-search-palette';
33
32
  import { KeyboardNodeGrid } from '../keyboard-grid/keyboard-node-grid';
34
- import { EnableKeyboardGridAction, KeyboardGridCellSelectedAction } from '../keyboard-grid/action';
33
+ import { SetKeyboardPointerRenderPositionAction } from './actions';
34
+ import { KeyboardPointer } from './keyboard-pointer';
35
35
 
36
36
  /**
37
37
  * Handles the pointer used via grid to position new elements.
38
38
  */
39
- export const keyboardControlModule = new FeatureModule((bind, unbind, isBound, rebind) => {
40
- const context = { bind, unbind, isBound, rebind };
41
- configureKeyboardControlTools(context);
42
- });
39
+ export const keyboardControlModule = new FeatureModule(
40
+ (bind, unbind, isBound, rebind) => {
41
+ const context = { bind, unbind, isBound, rebind };
42
+ configureKeyboardControlTools(context);
43
+ },
44
+ { featureId: Symbol('keyboardControl') }
45
+ );
43
46
 
44
47
  export function configureKeyboardControlTools(context: BindingContext): void {
45
48
  bindAsService(context, TYPES.IDefaultTool, GlobalKeyListenerTool);
@@ -29,10 +29,13 @@ import { EnableToolPaletteAction } from '../../tool-palette/tool-palette';
29
29
  import { FocusDomAction } from '../actions';
30
30
  import { KeyboardToolPalette } from './keyboard-tool-palette';
31
31
 
32
- export const keyboardToolPaletteModule = new FeatureModule((bind, unbind, isBound, rebind) => {
33
- const context = { bind, unbind, isBound, rebind };
34
- configureKeyboardToolPaletteTool(context);
35
- });
32
+ export const keyboardToolPaletteModule = new FeatureModule(
33
+ (bind, unbind, isBound, rebind) => {
34
+ const context = { bind, unbind, isBound, rebind };
35
+ configureKeyboardToolPaletteTool(context);
36
+ },
37
+ { featureId: Symbol('keyboardToolPalette') }
38
+ );
36
39
 
37
40
  export function configureKeyboardToolPaletteTool(context: BindingContext): void {
38
41
  bindAsService(context, TYPES.IUIExtension, KeyboardToolPalette);
@@ -21,10 +21,13 @@ import { ZoomElementAction, ZoomElementHandler, ZoomViewportAction, ZoomViewport
21
21
  /**
22
22
  * Handles move and zoom actions.
23
23
  */
24
- export const moveZoomModule = new FeatureModule((bind, unbind, isBound, rebind) => {
25
- const context = { bind, unbind, isBound, rebind };
26
- configureMoveZoom(context);
27
- });
24
+ export const moveZoomModule = new FeatureModule(
25
+ (bind, unbind, isBound, rebind) => {
26
+ const context = { bind, unbind, isBound, rebind };
27
+ configureMoveZoom(context);
28
+ },
29
+ { featureId: Symbol('moveZoom') }
30
+ );
28
31
 
29
32
  export function configureMoveZoom(context: BindingContext): void {
30
33
  context.bind(MoveViewportHandler).toSelf().inSingletonScope();
@@ -21,10 +21,13 @@ import { ResizeKeyTool } from './resize-key-tool';
21
21
  /**
22
22
  * Handles resize actions.
23
23
  */
24
- export const resizeKeyModule = new FeatureModule((bind, unbind, isBound, rebind) => {
25
- const context = { bind, unbind, isBound, rebind };
26
- configureResizeTools(context);
27
- });
24
+ export const resizeKeyModule = new FeatureModule(
25
+ (bind, unbind, isBound, rebind) => {
26
+ const context = { bind, unbind, isBound, rebind };
27
+ configureResizeTools(context);
28
+ },
29
+ { featureId: Symbol('resizeKey') }
30
+ );
28
31
 
29
32
  export function configureResizeTools(context: BindingContext): void {
30
33
  context.bind(ResizeElementHandler).toSelf().inSingletonScope();
@@ -18,10 +18,13 @@ import { bindAsService, BindingContext, FeatureModule, TYPES } from '@eclipse-gl
18
18
  import { SearchAutocompletePalette } from './search-palette';
19
19
  import { SearchAutocompletePaletteTool } from './search-tool';
20
20
 
21
- export const searchPaletteModule = new FeatureModule((bind, _unbind, isBound, rebind) => {
22
- const context = { bind, isBound, rebind };
23
- configureSearchPaletteModule(context);
24
- });
21
+ export const searchPaletteModule = new FeatureModule(
22
+ (bind, _unbind, isBound, rebind) => {
23
+ const context = { bind, isBound, rebind };
24
+ configureSearchPaletteModule(context);
25
+ },
26
+ { featureId: Symbol('searchPalette') }
27
+ );
25
28
 
26
29
  export function configureSearchPaletteModule(context: Pick<BindingContext, 'bind'>): void {
27
30
  bindAsService(context, TYPES.IUIExtension, SearchAutocompletePalette);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2024 Business Informatics Group (TU Wien) 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,8 +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 { ContainerModule } from 'inversify';
17
- import { bindAsService, BindingContext, configureActionHandler, TYPES } from '@eclipse-glsp/sprotty';
16
+ import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
18
17
  import '../../../../css/toast.css';
19
18
  import { HideToastAction, ShowToastMessageAction } from './toast-handler';
20
19
  import { Toast } from './toast-tool';
@@ -23,10 +22,13 @@ import { Toast } from './toast-tool';
23
22
  * Handles toast/user notification actions.
24
23
  */
25
24
 
26
- export const glspToastModule = new ContainerModule((bind, unbind, isBound, rebind) => {
27
- const context = { bind, unbind, isBound, rebind };
28
- configureToastTool(context);
29
- });
25
+ export const toastModule = new FeatureModule(
26
+ (bind, unbind, isBound, rebind) => {
27
+ const context = { bind, unbind, isBound, rebind };
28
+ configureToastTool(context);
29
+ },
30
+ { featureId: Symbol('toast') }
31
+ );
30
32
 
31
33
  export function configureToastTool(context: BindingContext): void {
32
34
  bindAsService(context, TYPES.IUIExtension, Toast);
@@ -34,3 +36,8 @@ export function configureToastTool(context: BindingContext): void {
34
36
  configureActionHandler(context, ShowToastMessageAction.KIND, Toast);
35
37
  configureActionHandler(context, HideToastAction.KIND, Toast);
36
38
  }
39
+
40
+ export {
41
+ /** Deprecated use {@link toastModule} instead */
42
+ toastModule as glspToastModule
43
+ };
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2024 Business Informatics Group (TU Wien) 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,21 +14,21 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { inject, injectable } from 'inversify';
18
- import { toArray } from 'sprotty/lib/utils/iterable';
19
- import { matchesKeystroke } from 'sprotty/lib/utils/keyboard';
20
17
  import {
21
18
  Action,
22
- KeyListener,
23
- KeyTool,
24
19
  GModelElement,
25
20
  GRoutableElement,
21
+ KeyListener,
22
+ KeyTool,
26
23
  SelectAction,
27
24
  SwitchEditModeAction,
28
25
  isSelectable
29
26
  } from '@eclipse-glsp/sprotty';
27
+ import { inject, injectable } from 'inversify';
28
+ import { toArray } from 'sprotty/lib/utils/iterable';
29
+ import { matchesKeystroke } from 'sprotty/lib/utils/keyboard';
30
30
  import { Tool } from '../../../base/tool-manager/tool';
31
- import { SResizeHandle } from '../../change-bounds/model';
31
+ import { GResizeHandle } from '../../change-bounds/model';
32
32
 
33
33
  /**
34
34
  * Deselects the element if there is no interaction possible with element.
@@ -59,7 +59,7 @@ export class DeselectKeyTool implements Tool {
59
59
  export class DeselectKeyListener extends KeyListener {
60
60
  override keyDown(target: GModelElement, event: KeyboardEvent): Action[] {
61
61
  if (this.matchesDeselectKeystroke(event)) {
62
- const isResizeHandleActive = toArray(target.root.index.all().filter(el => el instanceof SResizeHandle)).length > 0;
62
+ const isResizeHandleActive = toArray(target.root.index.all().filter(el => el instanceof GResizeHandle)).length > 0;
63
63
 
64
64
  if (isResizeHandleActive) {
65
65
  return [];
@@ -15,15 +15,20 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import { bindAsService, BindingContext, configureActionHandler, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
18
+ import { KeyboardGridCellSelectedAction, KeyboardGridKeyboardEventAction } from '../keyboard-grid/action';
18
19
  import { DeselectKeyTool } from './deselect-key-tool';
19
20
  import { MovementKeyTool } from './movement-key-tool';
20
21
  import { ZoomKeyTool } from './zoom-key-tool';
21
- import { KeyboardGridCellSelectedAction, KeyboardGridKeyboardEventAction } from '../keyboard-grid/action';
22
22
 
23
- export const viewKeyToolsModule = new FeatureModule((bind, _unbind, isBound, rebind) => {
24
- const context = { bind, isBound, rebind };
25
- configureViewKeyTools(context);
26
- });
23
+ export const viewKeyToolsModule = new FeatureModule(
24
+ (bind, _unbind, isBound, rebind) => {
25
+ const context = { bind, isBound, rebind };
26
+ configureViewKeyTools(context);
27
+ },
28
+ {
29
+ featureId: Symbol('viewKeyTools')
30
+ }
31
+ );
27
32
 
28
33
  export function configureViewKeyTools(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
29
34
  bindAsService(context, TYPES.IDefaultTool, MovementKeyTool);
@@ -35,24 +35,27 @@ import { LocalComputedBoundsCommand } from './local-bounds';
35
35
  import { SetBoundsFeedbackCommand } from './set-bounds-feedback-command';
36
36
  import { VBoxLayouterExt } from './vbox-layout';
37
37
 
38
- export const boundsModule = new FeatureModule((bind, _unbind, isBound, _rebind) => {
39
- const context = { bind, isBound };
40
- configureCommand(context, SetBoundsCommand);
41
- configureCommand(context, RequestBoundsCommand);
42
- bind(HiddenBoundsUpdater).toSelf().inSingletonScope();
43
- bindAsService(context, TYPES.HiddenVNodePostprocessor, GLSPHiddenBoundsUpdater);
38
+ export const boundsModule = new FeatureModule(
39
+ (bind, _unbind, isBound, _rebind) => {
40
+ const context = { bind, isBound };
41
+ configureCommand(context, SetBoundsCommand);
42
+ configureCommand(context, RequestBoundsCommand);
43
+ bind(HiddenBoundsUpdater).toSelf().inSingletonScope();
44
+ bindAsService(context, TYPES.HiddenVNodePostprocessor, GLSPHiddenBoundsUpdater);
44
45
 
45
- configureCommand(context, LocalComputedBoundsCommand);
46
- configureCommand(context, SetBoundsFeedbackCommand);
46
+ configureCommand(context, LocalComputedBoundsCommand);
47
+ configureCommand(context, SetBoundsFeedbackCommand);
47
48
 
48
- bind(TYPES.Layouter).to(LayouterExt).inSingletonScope();
49
- bind(TYPES.LayoutRegistry).to(LayoutRegistry).inSingletonScope();
49
+ bind(TYPES.Layouter).to(LayouterExt).inSingletonScope();
50
+ bind(TYPES.LayoutRegistry).to(LayoutRegistry).inSingletonScope();
50
51
 
51
- configureLayout(context, VBoxLayouter.KIND, VBoxLayouterExt);
52
- configureLayout(context, HBoxLayouter.KIND, HBoxLayouterExt);
53
- configureLayout(context, FreeFormLayouter.KIND, FreeFormLayouter);
52
+ configureLayout(context, VBoxLayouter.KIND, VBoxLayouterExt);
53
+ configureLayout(context, HBoxLayouter.KIND, HBoxLayouterExt);
54
+ configureLayout(context, FreeFormLayouter.KIND, FreeFormLayouter);
54
55
 
55
- // backwards compatibility
56
- // eslint-disable-next-line deprecation/deprecation
57
- bind(PositionSnapper).toSelf();
58
- });
56
+ // backwards compatibility
57
+ // eslint-disable-next-line deprecation/deprecation
58
+ bind(PositionSnapper).toSelf();
59
+ },
60
+ { featureId: Symbol('bounds') }
61
+ );
@@ -109,14 +109,14 @@ export function isBoundsAwareMoveable(element: GModelElement): element is Bounds
109
109
  return isMoveable(element) && isBoundsAware(element);
110
110
  }
111
111
 
112
- export class SResizeHandle extends GChildElement implements Hoverable {
112
+ export class GResizeHandle extends GChildElement implements Hoverable {
113
113
  static readonly TYPE = 'resize-handle';
114
114
 
115
115
  override readonly parent: ResizableModelElement;
116
116
 
117
117
  constructor(
118
118
  readonly location: ResizeHandleLocation,
119
- override readonly type: string = SResizeHandle.TYPE,
119
+ override readonly type: string = GResizeHandle.TYPE,
120
120
  readonly hoverFeedback: boolean = false
121
121
  ) {
122
122
  super();
@@ -166,12 +166,12 @@ export class SResizeHandle extends GChildElement implements Hoverable {
166
166
  return this.isNeResize() || this.isSwResize();
167
167
  }
168
168
 
169
- static getHandlePosition(handle: SResizeHandle): Point;
169
+ static getHandlePosition(handle: GResizeHandle): Point;
170
170
  static getHandlePosition(parent: ResizableModelElement, location: ResizeHandleLocation): Point;
171
171
  static getHandlePosition(bounds: Bounds, location: ResizeHandleLocation): Point;
172
- static getHandlePosition(first: ResizableModelElement | SResizeHandle | Bounds, second?: ResizeHandleLocation): Point {
173
- const bounds = SResizeHandle.is(first) ? first.parent.bounds : first instanceof GModelElement ? first.bounds : first;
174
- const location = SResizeHandle.is(first) ? first.location : second!;
172
+ static getHandlePosition(first: ResizableModelElement | GResizeHandle | Bounds, second?: ResizeHandleLocation): Point {
173
+ const bounds = GResizeHandle.is(first) ? first.parent.bounds : first instanceof GModelElement ? first.bounds : first;
174
+ const location = GResizeHandle.is(first) ? first.location : second!;
175
175
  switch (location) {
176
176
  case ResizeHandleLocation.TopLeft:
177
177
  return Bounds.topLeft(bounds);
@@ -192,7 +192,7 @@ export class SResizeHandle extends GChildElement implements Hoverable {
192
192
  }
193
193
  }
194
194
 
195
- static getCursorCss(handle: SResizeHandle): string {
195
+ static getCursorCss(handle: GResizeHandle): string {
196
196
  switch (handle.location) {
197
197
  case ResizeHandleLocation.TopLeft:
198
198
  return CursorCSS.RESIZE_NW;
@@ -213,17 +213,17 @@ export class SResizeHandle extends GChildElement implements Hoverable {
213
213
  }
214
214
  }
215
215
 
216
- static is(handle: unknown): handle is SResizeHandle {
217
- return typeof handle === 'object' && !!handle && 'type' in handle && handle.type === SResizeHandle.TYPE;
216
+ static is(handle: unknown): handle is GResizeHandle {
217
+ return typeof handle === 'object' && !!handle && 'type' in handle && handle.type === GResizeHandle.TYPE;
218
218
  }
219
219
  }
220
220
 
221
221
  export function addResizeHandles(element: ResizableModelElement, locations: ResizeHandleLocation[] = ResizeHandleLocation.CORNERS): void {
222
222
  for (const location of ResizeHandleLocation.ALL) {
223
- const existing = element.children.find(child => child instanceof SResizeHandle && child.location === location);
223
+ const existing = element.children.find(child => child instanceof GResizeHandle && child.location === location);
224
224
  if (locations.includes(location) && !existing) {
225
225
  // add missing handle
226
- element.add(new SResizeHandle(location));
226
+ element.add(new GResizeHandle(location));
227
227
  } else if (!locations.includes(location) && existing) {
228
228
  // remove existing handle
229
229
  element.remove(existing);
@@ -232,5 +232,10 @@ export function addResizeHandles(element: ResizableModelElement, locations: Resi
232
232
  }
233
233
 
234
234
  export function removeResizeHandles(element: GParentElement): void {
235
- element.removeAll(child => child instanceof SResizeHandle);
235
+ element.removeAll(child => child instanceof GResizeHandle);
236
236
  }
237
+
238
+ export {
239
+ /** @deprecated Use {@link GResizeHandle} instead */
240
+ GResizeHandle as SResizeHandle
241
+ };
@@ -18,7 +18,7 @@ import { injectable } from 'inversify';
18
18
  import { ModifyCSSFeedbackAction } from '../../base/feedback/css-feedback';
19
19
  import { BoundsAwareModelElement } from '../../utils/gmodel-util';
20
20
  import { toAbsoluteBounds } from '../../utils/viewpoint-util';
21
- import { SResizeHandle } from './model';
21
+ import { GResizeHandle } from './model';
22
22
 
23
23
  /**
24
24
  * A `MovementRestrictor` is an optional service that can be used by tools to validate
@@ -86,7 +86,7 @@ export function createMovementRestrictionFeedback(
86
86
  ): ModifyCSSFeedbackAction {
87
87
  const elements: GModelElement[] = [element];
88
88
  if (element instanceof GParentElement) {
89
- element.children.filter(child => child instanceof SResizeHandle).forEach(e => elements.push(e));
89
+ element.children.filter(child => child instanceof GResizeHandle).forEach(e => elements.push(e));
90
90
  }
91
91
  return ModifyCSSFeedbackAction.create({ elements, add: movementRestrictor.cssClasses });
92
92
  }
@@ -103,7 +103,7 @@ export function removeMovementRestrictionFeedback(
103
103
  ): ModifyCSSFeedbackAction {
104
104
  const elements: GModelElement[] = [element];
105
105
  if (element instanceof GParentElement) {
106
- element.children.filter(child => child instanceof SResizeHandle).forEach(e => elements.push(e));
106
+ element.children.filter(child => child instanceof GResizeHandle).forEach(e => elements.push(e));
107
107
  }
108
108
 
109
109
  return ModifyCSSFeedbackAction.create({ elements, remove: movementRestrictor.cssClasses });
@@ -19,9 +19,12 @@ import { GlspCommandPalette } from './command-palette';
19
19
  import { CommandPaletteTool } from './command-palette-tool';
20
20
  import { ServerCommandPaletteActionProvider } from './server-command-palette-provider';
21
21
 
22
- export const commandPaletteModule = new FeatureModule(bind => {
23
- bindAsService(bind, TYPES.IUIExtension, GlspCommandPalette);
24
- bind(TYPES.ICommandPaletteActionProviderRegistry).to(CommandPaletteActionProviderRegistry).inSingletonScope();
25
- bindAsService(bind, TYPES.ICommandPaletteActionProvider, ServerCommandPaletteActionProvider);
26
- bindAsService(bind, TYPES.IDefaultTool, CommandPaletteTool);
27
- });
22
+ export const commandPaletteModule = new FeatureModule(
23
+ bind => {
24
+ bindAsService(bind, TYPES.IUIExtension, GlspCommandPalette);
25
+ bind(TYPES.ICommandPaletteActionProviderRegistry).to(CommandPaletteActionProviderRegistry).inSingletonScope();
26
+ bindAsService(bind, TYPES.ICommandPaletteActionProvider, ServerCommandPaletteActionProvider);
27
+ bindAsService(bind, TYPES.IDefaultTool, CommandPaletteTool);
28
+ },
29
+ { featureId: Symbol('commandPalette') }
30
+ );
@@ -17,17 +17,20 @@ import { ContextMenuProviderRegistry, FeatureModule, IContextMenuService, TYPES,
17
17
  import { GLSPContextMenuMouseListener } from './glsp-context-menu-mouse-listener';
18
18
  import { ServerContextMenuItemProvider } from './server-context-menu-provider';
19
19
 
20
- export const contextMenuModule = new FeatureModule(bind => {
21
- bind(TYPES.IContextMenuServiceProvider).toProvider<IContextMenuService>(ctx => async () => {
22
- if (ctx.container.isBound(TYPES.IContextMenuService)) {
23
- return ctx.container.get<IContextMenuService>(TYPES.IContextMenuService);
24
- }
25
- console.warn("'TYPES.IContextMenuService' is not bound. Use no-op implementation instead");
26
- // eslint-disable-next-line @typescript-eslint/no-empty-function
27
- return { show: () => {} };
28
- });
20
+ export const contextMenuModule = new FeatureModule(
21
+ bind => {
22
+ bind(TYPES.IContextMenuServiceProvider).toProvider<IContextMenuService>(ctx => async () => {
23
+ if (ctx.container.isBound(TYPES.IContextMenuService)) {
24
+ return ctx.container.get<IContextMenuService>(TYPES.IContextMenuService);
25
+ }
26
+ console.warn("'TYPES.IContextMenuService' is not bound. Use no-op implementation instead");
27
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
28
+ return { show: () => {} };
29
+ });
29
30
 
30
- bindAsService(bind, TYPES.MouseListener, GLSPContextMenuMouseListener);
31
- bind(TYPES.IContextMenuProviderRegistry).to(ContextMenuProviderRegistry);
32
- bindAsService(bind, TYPES.IContextMenuItemProvider, ServerContextMenuItemProvider);
33
- });
31
+ bindAsService(bind, TYPES.MouseListener, GLSPContextMenuMouseListener);
32
+ bind(TYPES.IContextMenuProviderRegistry).to(ContextMenuProviderRegistry);
33
+ bindAsService(bind, TYPES.IContextMenuItemProvider, ServerContextMenuItemProvider);
34
+ },
35
+ { featureId: Symbol('contextMenu') }
36
+ );
@@ -17,10 +17,13 @@ import { bindAsService, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
17
17
  import { LocalClipboardService, ServerCopyPasteHandler } from './copy-paste-handler';
18
18
  import { CopyPasteStartup } from './copy-paste-standalone';
19
19
 
20
- export const copyPasteModule = new FeatureModule((bind, _unbind, isBound) => {
21
- bind(TYPES.ICopyPasteHandler).to(ServerCopyPasteHandler);
22
- bind(TYPES.IAsyncClipboardService).to(LocalClipboardService).inSingletonScope();
23
- });
20
+ export const copyPasteModule = new FeatureModule(
21
+ (bind, _unbind, isBound) => {
22
+ bind(TYPES.ICopyPasteHandler).to(ServerCopyPasteHandler);
23
+ bind(TYPES.IAsyncClipboardService).to(LocalClipboardService).inSingletonScope();
24
+ },
25
+ { featureId: Symbol('copyPaste') }
26
+ );
24
27
 
25
28
  /**
26
29
  * Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
@@ -31,5 +34,8 @@ export const standaloneCopyPasteModule = new FeatureModule(
31
34
  (bind, _unbind, isBound) => {
32
35
  bindAsService(bind, TYPES.IDiagramStartup, CopyPasteStartup);
33
36
  },
34
- { requires: copyPasteModule }
37
+ {
38
+ featureId: Symbol('standaloneCopyPaste'),
39
+ requires: copyPasteModule
40
+ }
35
41
  );
@@ -20,13 +20,16 @@ import { DebugBoundsDecorator } from './debug-bounds-decorator';
20
20
  import { DebugManager } from './debug-manager';
21
21
  import { EnableDebugModeAction, EnableDebugModeCommand } from './debug-model';
22
22
 
23
- export const debugModule = new FeatureModule((bind, unbind, isBound, rebind) => {
24
- const context = { bind, unbind, isBound, rebind };
23
+ export const debugModule = new FeatureModule(
24
+ (bind, unbind, isBound, rebind) => {
25
+ const context = { bind, unbind, isBound, rebind };
25
26
 
26
- configureCommand(context, EnableDebugModeCommand);
27
+ configureCommand(context, EnableDebugModeCommand);
27
28
 
28
- bind(DebugManager).toSelf().inSingletonScope();
29
- configureActionHandler(context, EnableDebugModeAction.KIND, DebugManager);
29
+ bind(DebugManager).toSelf().inSingletonScope();
30
+ configureActionHandler(context, EnableDebugModeAction.KIND, DebugManager);
30
31
 
31
- bindAsService(context, TYPES.IVNodePostprocessor, DebugBoundsDecorator);
32
- });
32
+ bindAsService(context, TYPES.IVNodePostprocessor, DebugBoundsDecorator);
33
+ },
34
+ { featureId: Symbol('debug') }
35
+ );