@eclipse-glsp/client 1.1.0-next.4a5a0ee.195 → 1.1.0-next.4e10035.245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{lib/features/change-bounds/snap.spec.d.ts → css/autocomplete-palette.css} +8 -3
- package/css/decoration.css +1 -1
- package/css/glsp-sprotty.css +34 -19
- package/lib/base/action-dispatcher.js.map +1 -1
- package/lib/base/auto-complete/auto-complete-widget.d.ts +10 -4
- package/lib/base/auto-complete/auto-complete-widget.d.ts.map +1 -1
- package/lib/base/auto-complete/auto-complete-widget.js +28 -9
- package/lib/base/auto-complete/auto-complete-widget.js.map +1 -1
- package/lib/base/command-stack.d.ts +1 -2
- package/lib/base/command-stack.d.ts.map +1 -1
- package/lib/base/command-stack.js +5 -14
- package/lib/base/command-stack.js.map +1 -1
- package/lib/base/container-modules.d.ts +32 -2
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +78 -43
- package/lib/base/container-modules.js.map +1 -1
- package/lib/base/di.config.d.ts +1 -1
- package/lib/base/di.config.d.ts.map +1 -1
- package/lib/base/di.config.js +7 -7
- package/lib/base/di.config.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +4 -4
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +3 -3
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/focus-tracker.js.map +1 -1
- package/lib/base/model/model-registry.js.map +1 -1
- package/lib/base/model/update-model-command.js.map +1 -1
- package/lib/base/model-initialization-constraint.js.map +1 -1
- package/lib/base/selection-clearing-mouse-listener.js +1 -1
- package/lib/base/selection-clearing-mouse-listener.js.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.d.ts +4 -5
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.js +15 -8
- package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
- package/lib/base/view/view-registry.js.map +1 -1
- package/lib/features/accessibility/di.config.d.ts +21 -0
- package/lib/features/accessibility/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/di.config.js +28 -0
- package/lib/features/accessibility/di.config.js.map +1 -0
- package/lib/features/accessibility/search/di.config.d.ts +20 -0
- package/lib/features/accessibility/search/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/search/di.config.js +33 -0
- package/lib/features/accessibility/search/di.config.js.map +1 -0
- package/lib/features/accessibility/search/search-palette.d.ts +47 -0
- package/lib/features/accessibility/search/search-palette.d.ts.map +1 -0
- package/lib/features/accessibility/search/search-palette.js +155 -0
- package/lib/features/accessibility/search/search-palette.js.map +1 -0
- package/lib/features/accessibility/search/search-tool.d.ts +30 -0
- package/lib/features/accessibility/search/search-tool.d.ts.map +1 -0
- package/lib/features/accessibility/search/search-tool.js +73 -0
- package/lib/features/accessibility/search/search-tool.js.map +1 -0
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.d.ts +35 -0
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.d.ts.map +1 -0
- package/lib/features/{tools/marquee-behavior.spec.d.ts → autocomplete-palette/autocomplete-suggestion-providers.js} +4 -3
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.js.map +1 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.d.ts +41 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.d.ts.map +1 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.js +82 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.js.map +1 -0
- package/lib/features/bounds/di.config.d.ts +4 -0
- package/lib/features/bounds/di.config.d.ts.map +1 -0
- package/lib/features/bounds/di.config.js +39 -0
- package/lib/features/bounds/di.config.js.map +1 -0
- package/lib/features/{layout → bounds}/freeform-layout.d.ts +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/freeform-layout.js +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.js.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +34 -0
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -0
- package/lib/features/bounds/glsp-hidden-bounds-updater.js +99 -0
- package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -0
- package/lib/features/{layout → bounds}/hbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js.map +1 -1
- package/lib/features/{layout → bounds}/layouter.d.ts +1 -1
- package/lib/features/{layout → bounds}/layouter.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/layouter.js +1 -1
- package/lib/features/{layout → bounds}/layouter.js.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
- package/lib/features/change-bounds/snap.js.map +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-tool.js +3 -3
- package/lib/features/command-palette/command-palette-tool.js.map +1 -1
- package/lib/features/command-palette/di.config.d.ts +0 -15
- package/lib/features/command-palette/di.config.d.ts.map +1 -1
- package/lib/features/command-palette/di.config.js +6 -7
- package/lib/features/command-palette/di.config.js.map +1 -1
- package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
- package/lib/features/context-menu/delete-element-context-menu.js.map +1 -1
- package/lib/features/context-menu/di.config.d.ts +0 -15
- package/lib/features/context-menu/di.config.d.ts.map +1 -1
- package/lib/features/context-menu/di.config.js +4 -3
- package/lib/features/context-menu/di.config.js.map +1 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
- package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts +4 -4
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.js +7 -8
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
- package/lib/features/decoration/decoration-placer.js.map +1 -1
- package/lib/features/decoration/di.config.d.ts +0 -15
- package/lib/features/decoration/di.config.d.ts.map +1 -1
- package/lib/features/decoration/di.config.js +4 -4
- package/lib/features/decoration/di.config.js.map +1 -1
- package/lib/features/edit-label/di.config.d.ts +0 -15
- package/lib/features/edit-label/di.config.d.ts.map +1 -1
- package/lib/features/edit-label/di.config.js +3 -2
- package/lib/features/edit-label/di.config.js.map +1 -1
- package/lib/features/edit-label/edit-label-tool.js.map +1 -1
- package/lib/features/edit-label/edit-label-validator.js.map +1 -1
- package/lib/features/export/di.config.d.ts +4 -0
- package/lib/features/export/di.config.d.ts.map +1 -0
- package/lib/features/export/di.config.js +30 -0
- package/lib/features/export/di.config.js.map +1 -0
- package/lib/features/export/glsp-svg-exporter.d.ts +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
- package/lib/features/export/glsp-svg-exporter.js +1 -2
- package/lib/features/export/glsp-svg-exporter.js.map +1 -1
- package/lib/features/hints/type-hints.js.map +1 -1
- package/lib/features/hover/di.config.d.ts +0 -15
- package/lib/features/hover/di.config.d.ts.map +1 -1
- package/lib/features/hover/di.config.js +7 -7
- package/lib/features/hover/di.config.js.map +1 -1
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +2 -1
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/layout/di.config.d.ts +1 -1
- package/lib/features/layout/di.config.d.ts.map +1 -1
- package/lib/features/layout/di.config.js +1 -9
- package/lib/features/layout/di.config.js.map +1 -1
- package/lib/features/layout/layout-elements-action.d.ts +4 -4
- package/lib/features/layout/layout-elements-action.d.ts.map +1 -1
- package/lib/features/layout/layout-elements-action.js +2 -2
- package/lib/features/layout/layout-elements-action.js.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.d.ts +1 -1
- package/lib/features/mouse-tool/mouse-tool.d.ts.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.js.map +1 -1
- package/lib/features/navigation/di.config.d.ts +2 -1
- package/lib/features/navigation/di.config.d.ts.map +1 -1
- package/lib/features/navigation/di.config.js +3 -3
- package/lib/features/navigation/di.config.js.map +1 -1
- package/lib/features/navigation/navigation-action-handler.d.ts +2 -2
- package/lib/features/navigation/navigation-action-handler.js +2 -2
- package/lib/features/navigation/navigation-action-handler.js.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/features/save/di.config.d.ts +0 -15
- package/lib/features/save/di.config.d.ts.map +1 -1
- package/lib/features/save/di.config.js +3 -2
- package/lib/features/save/di.config.js.map +1 -1
- package/lib/features/save/model.d.ts +1 -1
- package/lib/features/select/di.config.d.ts +0 -15
- package/lib/features/select/di.config.d.ts.map +1 -1
- package/lib/features/select/di.config.js +8 -7
- package/lib/features/select/di.config.js.map +1 -1
- package/lib/features/select/select-feedback-action.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +1 -1
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +2 -1
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/select/selection-service.js.map +1 -1
- package/lib/features/source-model-watcher/di.config.js +1 -1
- package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
- package/lib/features/svg-metadata/di.config.d.ts +19 -0
- package/lib/features/svg-metadata/di.config.d.ts.map +1 -0
- package/lib/features/svg-metadata/di.config.js +26 -0
- package/lib/features/svg-metadata/di.config.js.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts +24 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.js +63 -0
- package/lib/features/svg-metadata/metadata-placer.js.map +1 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +4 -3
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +5 -4
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts +7 -7
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.js +8 -11
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/css-feedback.js.map +1 -1
- package/lib/features/tool-feedback/di.config.d.ts +0 -15
- package/lib/features/tool-feedback/di.config.d.ts.map +1 -1
- package/lib/features/tool-feedback/di.config.js +20 -18
- package/lib/features/tool-feedback/di.config.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +2 -3
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +6 -11
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/feedback-action-dispatcher.js.map +1 -1
- package/lib/features/tool-feedback/marquee-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/view.js.map +1 -1
- package/lib/features/tool-palette/di.config.d.ts +0 -15
- package/lib/features/tool-palette/di.config.d.ts.map +1 -1
- package/lib/features/tool-palette/di.config.js +4 -4
- package/lib/features/tool-palette/di.config.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +2 -2
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/tools/base-glsp-tool.js.map +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds-tool.js +6 -6
- package/lib/features/tools/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/delete-tool.js.map +1 -1
- package/lib/features/tools/di.config.d.ts +18 -5
- package/lib/features/tools/di.config.d.ts.map +1 -1
- package/lib/features/tools/di.config.js +16 -17
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/features/tools/edge-creation-tool.js.map +1 -1
- package/lib/features/tools/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/enable-default-tools-on-focus-loss.js.map +1 -1
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts +20 -0
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts.map +1 -0
- package/lib/features/tools/glsp-manhattan-edge-router.js +69 -0
- package/lib/features/tools/glsp-manhattan-edge-router.js.map +1 -0
- package/lib/features/tools/marquee-mouse-tool.js.map +1 -1
- package/lib/features/tools/marquee-tool.js.map +1 -1
- package/lib/features/tools/node-creation-tool.js.map +1 -1
- package/lib/features/tools/view.js.map +1 -1
- package/lib/features/validation/di.config.js +4 -4
- package/lib/features/validation/di.config.js.map +1 -1
- package/lib/features/validation/issue-marker.d.ts +1 -1
- package/lib/features/validation/issue-marker.js +1 -1
- package/lib/features/validation/marker-navigator.d.ts +1 -1
- package/lib/features/validation/marker-navigator.d.ts.map +1 -1
- package/lib/features/validation/marker-navigator.js.map +1 -1
- package/lib/features/validation/validate.d.ts +6 -6
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +18 -17
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/features/viewport/di.config.d.ts +0 -15
- package/lib/features/viewport/di.config.d.ts.map +1 -1
- package/lib/features/viewport/di.config.js +12 -11
- package/lib/features/viewport/di.config.js.map +1 -1
- package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
- package/lib/index.d.ts +30 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +79 -43
- package/lib/index.js.map +1 -1
- package/lib/lib/model.d.ts +7 -3
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +48 -1
- package/lib/lib/model.js.map +1 -1
- package/lib/model-source/glsp-diagram-server.js.map +1 -1
- package/lib/sprotty-reexport.d.ts +7 -7
- package/lib/sprotty-reexport.d.ts.map +1 -1
- package/lib/sprotty-reexport.js +19 -10
- package/lib/sprotty-reexport.js.map +1 -1
- package/lib/utils/html-utils.d.ts +1 -1
- package/lib/utils/html-utils.js +1 -1
- package/lib/utils/smodel-util.d.ts +28 -7
- package/lib/utils/smodel-util.d.ts.map +1 -1
- package/lib/utils/smodel-util.js +41 -8
- package/lib/utils/smodel-util.js.map +1 -1
- package/lib/views/base-view-module.d.ts +18 -6
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +1 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/lib/views/compartments.js.map +1 -1
- package/lib/views/glsp-edge-view.d.ts +2 -2
- package/lib/views/glsp-edge-view.d.ts.map +1 -1
- package/lib/views/glsp-edge-view.js +2 -2
- package/lib/views/glsp-edge-view.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +1 -1
- package/lib/views/glsp-projection-view.js +1 -1
- package/lib/views/glsp-projection-view.js.map +1 -1
- package/lib/views/index.d.ts +1 -1
- package/lib/views/index.js +1 -1
- package/lib/views/issue-marker-view.js.map +1 -1
- package/lib/views/rounded-corner-view.js +2 -2
- package/lib/views/rounded-corner-view.js.map +1 -1
- package/lib/views/rounded-corner.d.ts +1 -1
- package/lib/views/rounded-corner.js +1 -1
- package/package.json +25 -24
- package/src/base/auto-complete/auto-complete-widget.ts +34 -10
- package/src/base/command-stack.ts +13 -11
- package/src/base/container-modules.ts +44 -11
- package/src/base/di.config.ts +8 -8
- package/src/base/editor-context-service.ts +4 -4
- package/src/base/selection-clearing-mouse-listener.ts +1 -1
- package/src/base/tool-manager/glsp-tool-manager.ts +15 -12
- package/src/features/accessibility/di.config.ts +26 -0
- package/src/features/accessibility/search/di.config.ts +31 -0
- package/src/features/accessibility/search/search-palette.ts +181 -0
- package/src/features/accessibility/search/search-tool.ts +60 -0
- package/src/features/autocomplete-palette/autocomplete-suggestion-providers.ts +37 -0
- package/src/features/autocomplete-palette/base-autocomplete-palette.ts +88 -0
- package/src/features/bounds/di.config.ts +49 -0
- package/src/features/{layout/tests → bounds}/freeform-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/freeform-layout.ts +2 -2
- package/src/features/bounds/glsp-hidden-bounds-updater.ts +85 -0
- package/src/features/{layout/tests → bounds}/hbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/hbox-layout.ts +1 -1
- package/src/features/{layout/tests/layouter-test-util.ts → bounds/layouter-test-util.spec.ts} +6 -6
- package/src/features/{layout → bounds}/layouter.ts +1 -1
- package/src/features/{layout/tests → bounds}/vbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/vbox-layout.ts +1 -1
- package/src/features/command-palette/command-palette-tool.ts +3 -3
- package/src/features/command-palette/di.config.ts +6 -7
- package/src/features/context-menu/di.config.ts +4 -3
- package/src/features/copy-paste/copy-paste-handler.ts +9 -13
- package/src/features/decoration/di.config.ts +4 -4
- package/src/features/edit-label/di.config.ts +3 -2
- package/src/features/export/di.config.ts +29 -0
- package/src/features/export/glsp-svg-exporter.ts +8 -7
- package/src/features/hover/di.config.ts +8 -7
- package/src/features/hover/hover.ts +2 -1
- package/src/features/layout/di.config.ts +2 -11
- package/src/features/layout/layout-elements-action.ts +2 -1
- package/src/features/navigation/di.config.ts +4 -2
- package/src/features/navigation/navigation-action-handler.ts +2 -2
- package/src/features/save/di.config.ts +3 -2
- package/src/features/save/model.ts +1 -1
- package/src/features/select/di.config.ts +8 -7
- package/src/features/select/select-mouse-listener.ts +2 -2
- package/src/features/select/selection-service.spec.ts +4 -5
- package/src/features/source-model-watcher/di.config.ts +1 -1
- package/src/features/svg-metadata/di.config.ts +26 -0
- package/src/features/svg-metadata/metadata-placer.ts +51 -0
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +4 -4
- package/src/features/tool-feedback/creation-tool-feedback.ts +22 -16
- package/src/features/tool-feedback/di.config.ts +20 -18
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +3 -11
- package/src/features/tool-palette/di.config.ts +4 -4
- package/src/features/tool-palette/tool-palette.ts +4 -4
- package/src/features/tools/change-bounds-tool.ts +7 -7
- package/src/features/tools/di.config.ts +20 -21
- package/src/features/tools/glsp-manhattan-edge-router.ts +60 -0
- package/src/features/validation/di.config.ts +5 -5
- package/src/features/validation/issue-marker.ts +1 -1
- package/src/features/validation/validate.ts +16 -19
- package/src/features/viewport/di.config.ts +13 -11
- package/src/index.ts +41 -5
- package/src/lib/model.ts +35 -3
- package/src/sprotty-reexport.ts +24 -8
- package/src/utils/html-utils.ts +1 -1
- package/src/utils/smodel-util.ts +55 -11
- package/src/views/base-view-module.ts +4 -9
- package/src/views/glsp-edge-view.tsx +3 -3
- package/src/views/glsp-projection-view.tsx +1 -1
- package/src/views/index.ts +1 -2
- package/src/views/rounded-corner-view.tsx +2 -2
- package/src/views/rounded-corner.ts +2 -2
- package/lib/features/change-bounds/snap.spec.d.ts.map +0 -1
- package/lib/features/change-bounds/snap.spec.js +0 -82
- package/lib/features/change-bounds/snap.spec.js.map +0 -1
- package/lib/features/layout/layout-elements-action.spec.d.ts +0 -3
- package/lib/features/layout/layout-elements-action.spec.d.ts.map +0 -1
- package/lib/features/layout/layout-elements-action.spec.js +0 -325
- package/lib/features/layout/layout-elements-action.spec.js.map +0 -1
- package/lib/features/layout/tests/freeform-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/freeform-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/freeform-layout.spec.js +0 -201
- package/lib/features/layout/tests/freeform-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/hbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.js +0 -161
- package/lib/features/layout/tests/hbox-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.d.ts +0 -34
- package/lib/features/layout/tests/layouter-test-util.d.ts.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.js +0 -96
- package/lib/features/layout/tests/layouter-test-util.js.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/vbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.js +0 -161
- package/lib/features/layout/tests/vbox-layout.spec.js.map +0 -1
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts +0 -3
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +0 -1
- package/lib/features/navigation/navigation-target-resolver.spec.js +0 -54
- package/lib/features/navigation/navigation-target-resolver.spec.js.map +0 -1
- package/lib/features/select/selection-service.spec.d.ts +0 -2
- package/lib/features/select/selection-service.spec.d.ts.map +0 -1
- package/lib/features/select/selection-service.spec.js +0 -347
- package/lib/features/select/selection-service.spec.js.map +0 -1
- package/lib/features/tools/marquee-behavior.spec.d.ts.map +0 -1
- package/lib/features/tools/marquee-behavior.spec.js +0 -165
- package/lib/features/tools/marquee-behavior.spec.js.map +0 -1
- package/lib/features/validation/marker-navigator.spec.d.ts +0 -3
- package/lib/features/validation/marker-navigator.spec.d.ts.map +0 -1
- package/lib/features/validation/marker-navigator.spec.js +0 -169
- package/lib/features/validation/marker-navigator.spec.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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 { CommandPalette, CommandPaletteActionProviderRegistry } from 'sprotty';
|
|
18
19
|
import '../../../css/command-palette.css';
|
|
@@ -21,12 +22,10 @@ import { CommandPaletteTool } from './command-palette-tool';
|
|
|
21
22
|
import { ServerCommandPaletteActionProvider } from './server-command-palette-provider';
|
|
22
23
|
|
|
23
24
|
const glspCommandPaletteModule = new ContainerModule(bind => {
|
|
24
|
-
bind
|
|
25
|
-
bind(TYPES.
|
|
26
|
-
bind
|
|
27
|
-
bind
|
|
28
|
-
bind(TYPES.ICommandPaletteActionProvider).to(ServerCommandPaletteActionProvider);
|
|
29
|
-
bind(TYPES.IDefaultTool).to(CommandPaletteTool);
|
|
25
|
+
bindAsService(bind, TYPES.IUIExtension, CommandPalette);
|
|
26
|
+
bind(TYPES.ICommandPaletteActionProviderRegistry).to(CommandPaletteActionProviderRegistry).inSingletonScope();
|
|
27
|
+
bindAsService(bind, TYPES.ICommandPaletteActionProvider, ServerCommandPaletteActionProvider);
|
|
28
|
+
bindAsService(bind, TYPES.IDefaultTool, CommandPaletteTool);
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
export default glspCommandPaletteModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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 { ContextMenuProviderRegistry, IContextMenuService } from 'sprotty';
|
|
18
19
|
import { TYPES } from '../../base/types';
|
|
@@ -30,9 +31,9 @@ const glspContextMenuModule = new ContainerModule(bind => {
|
|
|
30
31
|
}
|
|
31
32
|
})
|
|
32
33
|
);
|
|
33
|
-
bind
|
|
34
|
+
bindAsService(bind, TYPES.MouseListener, SelectionServiceAwareContextMenuMouseListener);
|
|
34
35
|
bind(TYPES.IContextMenuProviderRegistry).to(ContextMenuProviderRegistry);
|
|
35
|
-
bind
|
|
36
|
+
bindAsService(bind, TYPES.IContextMenuItemProvider, ServerContextMenuItemProvider);
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
export default glspContextMenuModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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
|
|
@@ -96,7 +96,7 @@ const CLIPBOARD_DATA_FORMAT = 'text/plain';
|
|
|
96
96
|
export class ServerCopyPasteHandler implements ICopyPasteHandler {
|
|
97
97
|
@inject(TYPES.IActionDispatcher) protected actionDispatcher: GLSPActionDispatcher;
|
|
98
98
|
@inject(TYPES.ViewerOptions) protected viewerOptions: ViewerOptions;
|
|
99
|
-
@inject(TYPES.IAsyncClipboardService) protected
|
|
99
|
+
@inject(TYPES.IAsyncClipboardService) protected clipboardService: IAsyncClipboardService;
|
|
100
100
|
@inject(EditorContextService) protected editorContext: EditorContextService;
|
|
101
101
|
|
|
102
102
|
handleCopy(event: ClipboardEvent): void {
|
|
@@ -105,13 +105,13 @@ export class ServerCopyPasteHandler implements ICopyPasteHandler {
|
|
|
105
105
|
event.clipboardData.setData(CLIPBOARD_DATA_FORMAT, toClipboardId(clipboardId));
|
|
106
106
|
this.actionDispatcher
|
|
107
107
|
.request<SetClipboardDataAction>(RequestClipboardDataAction.create(this.editorContext.get()))
|
|
108
|
-
.then(action => this.
|
|
108
|
+
.then(action => this.clipboardService.put(action.clipboardData, clipboardId));
|
|
109
109
|
event.preventDefault();
|
|
110
110
|
} else {
|
|
111
111
|
if (event.clipboardData) {
|
|
112
112
|
event.clipboardData.clearData();
|
|
113
113
|
}
|
|
114
|
-
this.
|
|
114
|
+
this.clipboardService.clear();
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -126,7 +126,7 @@ export class ServerCopyPasteHandler implements ICopyPasteHandler {
|
|
|
126
126
|
handlePaste(event: ClipboardEvent): void {
|
|
127
127
|
if (event.clipboardData && this.shouldPaste(event)) {
|
|
128
128
|
const clipboardId = getClipboardIdFromDataTransfer(event.clipboardData);
|
|
129
|
-
const clipboardData = this.
|
|
129
|
+
const clipboardData = this.clipboardService.get(clipboardId);
|
|
130
130
|
if (clipboardData) {
|
|
131
131
|
this.actionDispatcher.dispatch(PasteOperation.create({ clipboardData, editorContext: this.editorContext.get() }));
|
|
132
132
|
}
|
|
@@ -134,19 +134,15 @@ export class ServerCopyPasteHandler implements ICopyPasteHandler {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
protected shouldCopy(_event: ClipboardEvent): boolean
|
|
137
|
+
protected shouldCopy(_event: ClipboardEvent): boolean {
|
|
138
138
|
return this.editorContext.get().selectedElementIds.length > 0 && this.isDiagramActive();
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
protected shouldPaste(_event: ClipboardEvent): boolean
|
|
141
|
+
protected shouldPaste(_event: ClipboardEvent): boolean {
|
|
142
142
|
return this.isDiagramActive();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
private isDiagramActive(): boolean
|
|
146
|
-
return
|
|
147
|
-
document.activeElement instanceof SVGElement &&
|
|
148
|
-
document.activeElement.parentElement &&
|
|
149
|
-
document.activeElement.parentElement.id === this.viewerOptions.baseDiv
|
|
150
|
-
);
|
|
145
|
+
private isDiagramActive(): boolean {
|
|
146
|
+
return document.activeElement?.parentElement?.id === this.viewerOptions.baseDiv;
|
|
151
147
|
}
|
|
152
148
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c)
|
|
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,14 +13,14 @@
|
|
|
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 '../../../css/decoration.css';
|
|
18
19
|
import { TYPES } from '../../base/types';
|
|
19
20
|
import { GlspDecorationPlacer } from './decoration-placer';
|
|
20
21
|
|
|
21
|
-
const glspDecorationModule = new ContainerModule(
|
|
22
|
-
bind
|
|
23
|
-
bind(TYPES.IVNodePostprocessor).toService(GlspDecorationPlacer);
|
|
22
|
+
const glspDecorationModule = new ContainerModule(bind => {
|
|
23
|
+
bindAsService(bind, TYPES.IVNodePostprocessor, GlspDecorationPlacer);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export default glspDecorationModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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 { ApplyLabelEditCommand, configureCommand } from 'sprotty';
|
|
18
19
|
import { TYPES } from '../../base/types';
|
|
@@ -22,7 +23,7 @@ import { BalloonLabelValidationDecorator, ServerEditLabelValidator } from './edi
|
|
|
22
23
|
const glspEditLabelModule = new ContainerModule((bind, _unbind, isBound, _rebind) => {
|
|
23
24
|
bind(TYPES.IEditLabelValidator).to(ServerEditLabelValidator);
|
|
24
25
|
bind(TYPES.IEditLabelValidationDecorator).to(BalloonLabelValidationDecorator);
|
|
25
|
-
bind
|
|
26
|
+
bindAsService(bind, TYPES.IDefaultTool, DirectLabelEditTool);
|
|
26
27
|
configureCommand({ bind, isBound }, ApplyLabelEditCommand);
|
|
27
28
|
});
|
|
28
29
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource 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
|
+
import { bindAsService } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { ContainerModule } from 'inversify';
|
|
18
|
+
import { configureCommand, ExportSvgCommand, ExportSvgKeyListener, ExportSvgPostprocessor, TYPES } from 'sprotty';
|
|
19
|
+
import { GLSPSvgExporter } from './glsp-svg-exporter';
|
|
20
|
+
|
|
21
|
+
const glspExportSvgModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
22
|
+
const context = { bind, isBound };
|
|
23
|
+
bindAsService(context, TYPES.KeyListener, ExportSvgKeyListener);
|
|
24
|
+
bindAsService(context, TYPES.HiddenVNodePostprocessor, ExportSvgPostprocessor);
|
|
25
|
+
configureCommand(context, ExportSvgCommand);
|
|
26
|
+
bind(TYPES.SvgExporter).to(GLSPSvgExporter).inSingletonScope();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export default glspExportSvgModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-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
|
|
@@ -18,8 +18,8 @@ import { injectable } from 'inversify';
|
|
|
18
18
|
import { ExportSvgAction, SModelRoot, SvgExporter } from 'sprotty';
|
|
19
19
|
import { v4 as uuid } from 'uuid';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
@injectable()
|
|
22
|
+
export class GLSPSvgExporter extends SvgExporter {
|
|
23
23
|
override export(root: SModelRoot, _request?: RequestAction<ExportSvgAction>): void {
|
|
24
24
|
if (typeof document !== 'undefined') {
|
|
25
25
|
const svgElement = this.findSvgElement();
|
|
@@ -30,9 +30,10 @@ import { v4 as uuid } from 'uuid';
|
|
|
30
30
|
svgElement.id = originalId || uuid();
|
|
31
31
|
// provide generated svg code with respective sizing for proper viewing in browser and remove undesired border
|
|
32
32
|
const bounds = this.getBounds(root);
|
|
33
|
-
const svg = this.createSvg(svgElement, root)
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const svg = this.createSvg(svgElement, root).replace(
|
|
34
|
+
'style="',
|
|
35
|
+
`style="width: ${bounds.width}px !important;height: ${bounds.height}px !important;border: none !important;`
|
|
36
|
+
);
|
|
36
37
|
// do not give request/response id here as otherwise the action is treated as an unrequested response
|
|
37
38
|
this.actionDispatcher.dispatch(ExportSvgAction.create(svg, ''));
|
|
38
39
|
} finally {
|
|
@@ -47,4 +48,4 @@ import { v4 as uuid } from 'uuid';
|
|
|
47
48
|
// search for first svg element as hierarchy within Sprotty might change
|
|
48
49
|
return div && div.querySelector('svg');
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
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
|
|
@@ -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 {
|
|
18
19
|
CenterCommand,
|
|
@@ -36,11 +37,12 @@ import { FocusStateChangedAction } from '../../base/actions/focus-change-action'
|
|
|
36
37
|
import { GlspHoverMouseListener } from './hover';
|
|
37
38
|
|
|
38
39
|
const glspHoverModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
39
|
-
bind
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const context = { bind, isBound };
|
|
41
|
+
bindAsService(context, TYPES.PopupVNodePostprocessor, PopupPositionUpdater);
|
|
42
|
+
bindAsService(context, TYPES.MouseListener, GlspHoverMouseListener);
|
|
43
|
+
bindAsService(context, TYPES.PopupMouseListener, PopupHoverMouseListener);
|
|
44
|
+
bindAsService(context, TYPES.KeyListener, HoverKeyListener);
|
|
45
|
+
|
|
44
46
|
bind<HoverState>(TYPES.HoverState).toConstantValue({
|
|
45
47
|
mouseOverTimer: undefined,
|
|
46
48
|
mouseOutTimer: undefined,
|
|
@@ -49,7 +51,6 @@ const glspHoverModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
|
49
51
|
});
|
|
50
52
|
bind(ClosePopupActionHandler).toSelf().inSingletonScope();
|
|
51
53
|
|
|
52
|
-
const context = { bind, isBound };
|
|
53
54
|
configureCommand(context, HoverFeedbackCommand);
|
|
54
55
|
configureCommand(context, SetPopupModelCommand);
|
|
55
56
|
configureActionHandler(context, SetPopupModelCommand.KIND, ClosePopupActionHandler);
|
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
SModelRootSchema
|
|
24
24
|
} from '@eclipse-glsp/protocol';
|
|
25
25
|
import { injectable } from 'inversify';
|
|
26
|
-
import { EMPTY_ROOT,
|
|
26
|
+
import { EMPTY_ROOT, HoverMouseListener, IActionHandler, ICommand, SModelElement } from 'sprotty';
|
|
27
|
+
import { HoverFeedbackAction } from 'sprotty-protocol/lib/actions';
|
|
27
28
|
import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
|
|
28
29
|
import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool-actions';
|
|
29
30
|
import { EdgeCreationTool } from '../tools/edge-creation-tool';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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
|
|
@@ -14,27 +14,18 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { ContainerModule } from 'inversify';
|
|
17
|
-
import { configureActionHandler
|
|
18
|
-
import { FreeFormLayouter } from './freeform-layout';
|
|
19
|
-
import { HBoxLayouterExt } from './hbox-layout';
|
|
17
|
+
import { configureActionHandler } from 'sprotty';
|
|
20
18
|
import {
|
|
21
19
|
AlignElementsAction,
|
|
22
20
|
AlignElementsActionHandler,
|
|
23
21
|
ResizeElementsAction,
|
|
24
22
|
ResizeElementsActionHandler
|
|
25
23
|
} from './layout-elements-action';
|
|
26
|
-
import { LayouterExt } from './layouter';
|
|
27
|
-
import { VBoxLayouterExt } from './vbox-layout';
|
|
28
24
|
|
|
29
25
|
const layoutModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
|
|
30
26
|
const context = { bind, isBound };
|
|
31
27
|
configureActionHandler(context, ResizeElementsAction.KIND, ResizeElementsActionHandler);
|
|
32
28
|
configureActionHandler(context, AlignElementsAction.KIND, AlignElementsActionHandler);
|
|
33
|
-
|
|
34
|
-
rebind(VBoxLayouter).to(VBoxLayouterExt);
|
|
35
|
-
rebind(HBoxLayouter).to(HBoxLayouterExt);
|
|
36
|
-
rebind(TYPES.Layouter).to(LayouterExt);
|
|
37
|
-
configureLayout({ bind, isBound }, FreeFormLayouter.KIND, FreeFormLayouter);
|
|
38
29
|
});
|
|
39
30
|
|
|
40
31
|
export default layoutModule;
|
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
Writable
|
|
25
25
|
} from '@eclipse-glsp/protocol';
|
|
26
26
|
import { inject, injectable, optional } from 'inversify';
|
|
27
|
-
import { ElementMove, IActionDispatcher, IActionHandler, ICommand,
|
|
27
|
+
import { ElementMove, IActionDispatcher, IActionHandler, ICommand, SModelElement } from 'sprotty';
|
|
28
|
+
import { MoveAction } from 'sprotty-protocol/lib/actions';
|
|
28
29
|
import { TYPES } from '../../base/types';
|
|
29
30
|
import { toValidElementAndBounds, toValidElementMove } from '../../utils/layout-utils';
|
|
30
31
|
import { BoundsAwareModelElement, getElements } from '../../utils/smodel-util';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
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
|
|
@@ -19,7 +19,7 @@ import { configureActionHandler } from 'sprotty';
|
|
|
19
19
|
import { NavigateAction, NavigationActionHandler, ProcessNavigationArgumentsAction } from './navigation-action-handler';
|
|
20
20
|
import { NavigationTargetResolver } from './navigation-target-resolver';
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const navigationModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
23
23
|
bind(NavigationTargetResolver).toSelf().inSingletonScope();
|
|
24
24
|
bind(NavigationActionHandler).toSelf().inSingletonScope();
|
|
25
25
|
configureActionHandler({ bind, isBound }, NavigateAction.KIND, NavigationActionHandler);
|
|
@@ -27,3 +27,5 @@ export const navigationModule = new ContainerModule((bind, _unbind, isBound) =>
|
|
|
27
27
|
configureActionHandler({ bind, isBound }, ProcessNavigationArgumentsAction.KIND, NavigationActionHandler);
|
|
28
28
|
configureActionHandler({ bind, isBound }, NavigateToExternalTargetAction.KIND, NavigationActionHandler);
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
export default navigationModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
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
|
|
@@ -123,7 +123,7 @@ export namespace ProcessNavigationArgumentsAction {
|
|
|
123
123
|
* *(a)* the navigation target already specifies element IDs, in which case this action handler navigates
|
|
124
124
|
* to the specified elements directly, by the selecting them and centering them in the viewport.
|
|
125
125
|
* *(b)* the arguments of the navigation targets don't contain element IDs, but other arguments, the
|
|
126
|
-
* navigation target needs to be resolved into actual
|
|
126
|
+
* navigation target needs to be resolved into actual element IDs by the `NavigationTargetResolver`.
|
|
127
127
|
* This can for instance be useful, if the navigation deals with queries or some other more complex
|
|
128
128
|
* logic that can't be dealt with on the client.
|
|
129
129
|
* *(c)* the target isn't resolved by the `NavigationTargetResolver`, e.g. because the `uri` doesn't match
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
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 { TYPES } from '../../base/types';
|
|
18
19
|
import { SaveModelKeyboardListener } from './save-keylistener';
|
|
@@ -22,7 +23,7 @@ import { SaveModelKeyboardListener } from './save-keylistener';
|
|
|
22
23
|
* but only intended to be used in a standalone deployment of GLSP.
|
|
23
24
|
*/
|
|
24
25
|
const saveModule = new ContainerModule(bind => {
|
|
25
|
-
bind
|
|
26
|
+
bindAsService(bind, TYPES.KeyListener, SaveModelKeyboardListener);
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
export default saveModule;
|
|
@@ -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-
|
|
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
|
|
25
|
-
|
|
26
|
-
configureCommand(
|
|
27
|
-
configureCommand(
|
|
28
|
-
configureCommand(
|
|
29
|
-
|
|
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-
|
|
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
|
|
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)
|
|
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-
|
|
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(
|
|
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 =
|
|
233
|
+
newPosition = startPosition;
|
|
234
234
|
}
|
|
235
235
|
} else {
|
|
236
236
|
action = removeMovementRestrictionFeedback(element, this.tool.movementRestrictor);
|