@eclipse-glsp/client 0.9.0-next.c5944e10
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/LICENSE +277 -0
- package/README.md +12 -0
- package/css/command-palette.css +58 -0
- package/css/decoration.css +37 -0
- package/css/glsp-sprotty.css +106 -0
- package/css/tool-palette.css +138 -0
- package/lib/base/action-dispatcher.d.ts +25 -0
- package/lib/base/action-dispatcher.d.ts.map +1 -0
- package/lib/base/action-dispatcher.js +110 -0
- package/lib/base/action-dispatcher.js.map +1 -0
- package/lib/base/actions/context-actions.d.ts +36 -0
- package/lib/base/actions/context-actions.d.ts.map +1 -0
- package/lib/base/actions/context-actions.js +45 -0
- package/lib/base/actions/context-actions.js.map +1 -0
- package/lib/base/actions/edit-mode-action.d.ts +13 -0
- package/lib/base/actions/edit-mode-action.d.ts.map +1 -0
- package/lib/base/actions/edit-mode-action.js +52 -0
- package/lib/base/actions/edit-mode-action.js.map +1 -0
- package/lib/base/actions/edit-validation-actions.d.ts +78 -0
- package/lib/base/actions/edit-validation-actions.d.ts.map +1 -0
- package/lib/base/actions/edit-validation-actions.js +77 -0
- package/lib/base/actions/edit-validation-actions.js.map +1 -0
- package/lib/base/actions/focus-change-action.d.ts +24 -0
- package/lib/base/actions/focus-change-action.d.ts.map +1 -0
- package/lib/base/actions/focus-change-action.js +16 -0
- package/lib/base/actions/focus-change-action.js.map +1 -0
- package/lib/base/args.d.ts +24 -0
- package/lib/base/args.d.ts.map +1 -0
- package/lib/base/args.js +8 -0
- package/lib/base/args.js.map +1 -0
- package/lib/base/auto-complete/auto-complete-actions.d.ts +21 -0
- package/lib/base/auto-complete/auto-complete-actions.d.ts.map +1 -0
- package/lib/base/auto-complete/auto-complete-actions.js +8 -0
- package/lib/base/auto-complete/auto-complete-actions.js.map +1 -0
- package/lib/base/auto-complete/auto-complete-widget.d.ts +88 -0
- package/lib/base/auto-complete/auto-complete-widget.d.ts.map +1 -0
- package/lib/base/auto-complete/auto-complete-widget.js +233 -0
- package/lib/base/auto-complete/auto-complete-widget.js.map +1 -0
- package/lib/base/auto-complete/validation-decorator.d.ts +47 -0
- package/lib/base/auto-complete/validation-decorator.d.ts.map +1 -0
- package/lib/base/auto-complete/validation-decorator.js +113 -0
- package/lib/base/auto-complete/validation-decorator.js.map +1 -0
- package/lib/base/command-stack.d.ts +7 -0
- package/lib/base/command-stack.d.ts.map +1 -0
- package/lib/base/command-stack.js +49 -0
- package/lib/base/command-stack.js.map +1 -0
- package/lib/base/di.config.d.ts +28 -0
- package/lib/base/di.config.d.ts.map +1 -0
- package/lib/base/di.config.js +81 -0
- package/lib/base/di.config.js.map +1 -0
- package/lib/base/drag-aware-mouse-listener.d.ts +36 -0
- package/lib/base/drag-aware-mouse-listener.d.ts.map +1 -0
- package/lib/base/drag-aware-mouse-listener.js +66 -0
- package/lib/base/drag-aware-mouse-listener.js.map +1 -0
- package/lib/base/editor-context.d.ts +46 -0
- package/lib/base/editor-context.d.ts.map +1 -0
- package/lib/base/editor-context.js +110 -0
- package/lib/base/editor-context.js.map +1 -0
- package/lib/base/focus-tracker.d.ts +9 -0
- package/lib/base/focus-tracker.d.ts.map +1 -0
- package/lib/base/focus-tracker.js +65 -0
- package/lib/base/focus-tracker.js.map +1 -0
- package/lib/base/model/model-registry.d.ts +5 -0
- package/lib/base/model/model-registry.d.ts.map +1 -0
- package/lib/base/model/model-registry.js +43 -0
- package/lib/base/model/model-registry.js.map +1 -0
- package/lib/base/model/update-model-command.d.ts +26 -0
- package/lib/base/model/update-model-command.d.ts.map +1 -0
- package/lib/base/model/update-model-command.js +132 -0
- package/lib/base/model/update-model-command.js.map +1 -0
- package/lib/base/model-initialization-constraint.d.ts +39 -0
- package/lib/base/model-initialization-constraint.d.ts.map +1 -0
- package/lib/base/model-initialization-constraint.js +106 -0
- package/lib/base/model-initialization-constraint.js.map +1 -0
- package/lib/base/operations/operation.d.ts +135 -0
- package/lib/base/operations/operation.d.ts.map +1 -0
- package/lib/base/operations/operation.js +182 -0
- package/lib/base/operations/operation.js.map +1 -0
- package/lib/base/selection-clearing-mouse-listener.d.ts +17 -0
- package/lib/base/selection-clearing-mouse-listener.d.ts.map +1 -0
- package/lib/base/selection-clearing-mouse-listener.js +55 -0
- package/lib/base/selection-clearing-mouse-listener.js.map +1 -0
- package/lib/base/source-uri-aware.d.ts +20 -0
- package/lib/base/source-uri-aware.d.ts.map +1 -0
- package/lib/base/source-uri-aware.js +26 -0
- package/lib/base/source-uri-aware.js.map +1 -0
- package/lib/base/tool-manager/glsp-tool-manager.d.ts +22 -0
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -0
- package/lib/base/tool-manager/glsp-tool-manager.js +110 -0
- package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -0
- package/lib/base/types.d.ts +38 -0
- package/lib/base/types.d.ts.map +1 -0
- package/lib/base/types.js +41 -0
- package/lib/base/types.js.map +1 -0
- package/lib/base/view/view-registry.d.ts +5 -0
- package/lib/base/view/view-registry.d.ts.map +1 -0
- package/lib/base/view/view-registry.js +43 -0
- package/lib/base/view/view-registry.js.map +1 -0
- package/lib/features/change-bounds/model.d.ts +38 -0
- package/lib/features/change-bounds/model.d.ts.map +1 -0
- package/lib/features/change-bounds/model.js +61 -0
- package/lib/features/change-bounds/model.js.map +1 -0
- package/lib/features/change-bounds/movement-restrictor.d.ts +14 -0
- package/lib/features/change-bounds/movement-restrictor.d.ts.map +1 -0
- package/lib/features/change-bounds/movement-restrictor.js +90 -0
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -0
- package/lib/features/change-bounds/snap.d.ts +7 -0
- package/lib/features/change-bounds/snap.d.ts.map +1 -0
- package/lib/features/change-bounds/snap.js +44 -0
- package/lib/features/change-bounds/snap.js.map +1 -0
- package/lib/features/command-palette/command-palette-tool.d.ts +12 -0
- package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -0
- package/lib/features/command-palette/command-palette-tool.js +63 -0
- package/lib/features/command-palette/command-palette-tool.js.map +1 -0
- package/lib/features/command-palette/di.config.d.ts +20 -0
- package/lib/features/command-palette/di.config.d.ts.map +1 -0
- package/lib/features/command-palette/di.config.js +33 -0
- package/lib/features/command-palette/di.config.js.map +1 -0
- package/lib/features/command-palette/server-command-palette-provider.d.ts +15 -0
- package/lib/features/command-palette/server-command-palette-provider.d.ts.map +1 -0
- package/lib/features/command-palette/server-command-palette-provider.js +66 -0
- package/lib/features/command-palette/server-command-palette-provider.js.map +1 -0
- package/lib/features/context-menu/delete-element-context-menu.d.ts +8 -0
- package/lib/features/context-menu/delete-element-context-menu.d.ts.map +1 -0
- package/lib/features/context-menu/delete-element-context-menu.js +55 -0
- package/lib/features/context-menu/delete-element-context-menu.js.map +1 -0
- package/lib/features/context-menu/di.config.d.ts +19 -0
- package/lib/features/context-menu/di.config.d.ts.map +1 -0
- package/lib/features/context-menu/di.config.js +36 -0
- package/lib/features/context-menu/di.config.js.map +1 -0
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts +9 -0
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +1 -0
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js +65 -0
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -0
- package/lib/features/context-menu/server-context-menu-provider.d.ts +13 -0
- package/lib/features/context-menu/server-context-menu-provider.d.ts.map +1 -0
- package/lib/features/context-menu/server-context-menu-provider.js +63 -0
- package/lib/features/context-menu/server-context-menu-provider.js.map +1 -0
- package/lib/features/copy-paste/copy-paste-actions.d.ts +50 -0
- package/lib/features/copy-paste/copy-paste-actions.d.ts.map +1 -0
- package/lib/features/copy-paste/copy-paste-actions.js +58 -0
- package/lib/features/copy-paste/copy-paste-actions.js.map +1 -0
- package/lib/features/copy-paste/copy-paste-context-menu.d.ts +32 -0
- package/lib/features/copy-paste/copy-paste-context-menu.d.ts.map +1 -0
- package/lib/features/copy-paste/copy-paste-context-menu.js +151 -0
- package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -0
- package/lib/features/copy-paste/copy-paste-handler.d.ts +50 -0
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -0
- package/lib/features/copy-paste/copy-paste-handler.js +149 -0
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -0
- package/lib/features/copy-paste/di.config.d.ts +24 -0
- package/lib/features/copy-paste/di.config.d.ts.map +1 -0
- package/lib/features/copy-paste/di.config.js +40 -0
- package/lib/features/copy-paste/di.config.js.map +1 -0
- package/lib/features/decoration/decoration-placer.d.ts +6 -0
- package/lib/features/decoration/decoration-placer.d.ts.map +1 -0
- package/lib/features/decoration/decoration-placer.js +47 -0
- package/lib/features/decoration/decoration-placer.js.map +1 -0
- package/lib/features/decoration/di.config.d.ts +20 -0
- package/lib/features/decoration/di.config.d.ts.map +1 -0
- package/lib/features/decoration/di.config.js +27 -0
- package/lib/features/decoration/di.config.js.map +1 -0
- package/lib/features/edit-label/di.config.d.ts +19 -0
- package/lib/features/edit-label/di.config.d.ts.map +1 -0
- package/lib/features/edit-label/di.config.js +30 -0
- package/lib/features/edit-label/di.config.js.map +1 -0
- package/lib/features/edit-label/edit-label-tool.d.ts +13 -0
- package/lib/features/edit-label/edit-label-tool.d.ts.map +1 -0
- package/lib/features/edit-label/edit-label-tool.js +55 -0
- package/lib/features/edit-label/edit-label-tool.js.map +1 -0
- package/lib/features/edit-label/edit-label-validator.d.ts +20 -0
- package/lib/features/edit-label/edit-label-validator.d.ts.map +1 -0
- package/lib/features/edit-label/edit-label-validator.js +111 -0
- package/lib/features/edit-label/edit-label-validator.js.map +1 -0
- package/lib/features/hints/di.config.d.ts +19 -0
- package/lib/features/hints/di.config.d.ts.map +1 -0
- package/lib/features/hints/di.config.js +30 -0
- package/lib/features/hints/di.config.js.map +1 -0
- package/lib/features/hints/model.d.ts +26 -0
- package/lib/features/hints/model.d.ts.map +1 -0
- package/lib/features/hints/model.js +14 -0
- package/lib/features/hints/model.js.map +1 -0
- package/lib/features/hints/request-type-hints-action.d.ts +32 -0
- package/lib/features/hints/request-type-hints-action.d.ts.map +1 -0
- package/lib/features/hints/request-type-hints-action.js +26 -0
- package/lib/features/hints/request-type-hints-action.js.map +1 -0
- package/lib/features/hints/type-hints.d.ts +75 -0
- package/lib/features/hints/type-hints.d.ts.map +1 -0
- package/lib/features/hints/type-hints.js +199 -0
- package/lib/features/hints/type-hints.js.map +1 -0
- package/lib/features/hover/di.config.d.ts +19 -0
- package/lib/features/hover/di.config.d.ts.map +1 -0
- package/lib/features/hover/di.config.js +46 -0
- package/lib/features/hover/di.config.js.map +1 -0
- package/lib/features/hover/hover.d.ts +11 -0
- package/lib/features/hover/hover.d.ts.map +1 -0
- package/lib/features/hover/hover.js +88 -0
- package/lib/features/hover/hover.js.map +1 -0
- package/lib/features/layout/di.config.d.ts +19 -0
- package/lib/features/layout/di.config.d.ts.map +1 -0
- package/lib/features/layout/di.config.js +26 -0
- package/lib/features/layout/di.config.js.map +1 -0
- package/lib/features/layout/layout-commands.d.ts +137 -0
- package/lib/features/layout/layout-commands.d.ts.map +1 -0
- package/lib/features/layout/layout-commands.js +411 -0
- package/lib/features/layout/layout-commands.js.map +1 -0
- package/lib/features/layout/layout-commands.spec.d.ts +18 -0
- package/lib/features/layout/layout-commands.spec.d.ts.map +1 -0
- package/lib/features/layout/layout-commands.spec.js +297 -0
- package/lib/features/layout/layout-commands.spec.js.map +1 -0
- package/lib/features/model-source-watcher/di.config.d.ts +19 -0
- package/lib/features/model-source-watcher/di.config.d.ts.map +1 -0
- package/lib/features/model-source-watcher/di.config.js +26 -0
- package/lib/features/model-source-watcher/di.config.js.map +1 -0
- package/lib/features/model-source-watcher/model-source-changed-action-handler.d.ts +23 -0
- package/lib/features/model-source-watcher/model-source-changed-action-handler.d.ts.map +1 -0
- package/lib/features/model-source-watcher/model-source-changed-action-handler.js +83 -0
- package/lib/features/model-source-watcher/model-source-changed-action-handler.js.map +1 -0
- package/lib/features/model-source-watcher/model-source-changed-action.d.ts +24 -0
- package/lib/features/model-source-watcher/model-source-changed-action.d.ts.map +1 -0
- package/lib/features/model-source-watcher/model-source-changed-action.js +16 -0
- package/lib/features/model-source-watcher/model-source-changed-action.js.map +1 -0
- package/lib/features/mouse-tool/di.config.d.ts +19 -0
- package/lib/features/mouse-tool/di.config.d.ts.map +1 -0
- package/lib/features/mouse-tool/di.config.js +28 -0
- package/lib/features/mouse-tool/di.config.js.map +1 -0
- package/lib/features/mouse-tool/mouse-tool.d.ts +19 -0
- package/lib/features/mouse-tool/mouse-tool.d.ts.map +1 -0
- package/lib/features/mouse-tool/mouse-tool.js +140 -0
- package/lib/features/mouse-tool/mouse-tool.js.map +1 -0
- package/lib/features/navigation/di.config.d.ts +18 -0
- package/lib/features/navigation/di.config.d.ts.map +1 -0
- package/lib/features/navigation/di.config.js +31 -0
- package/lib/features/navigation/di.config.js.map +1 -0
- package/lib/features/navigation/navigation-action-handler.d.ts +117 -0
- package/lib/features/navigation/navigation-action-handler.d.ts.map +1 -0
- package/lib/features/navigation/navigation-action-handler.js +293 -0
- package/lib/features/navigation/navigation-action-handler.js.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.d.ts +55 -0
- package/lib/features/navigation/navigation-target-resolver.d.ts.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.js +157 -0
- package/lib/features/navigation/navigation-target-resolver.js.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts +18 -0
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.spec.js +54 -0
- package/lib/features/navigation/navigation-target-resolver.spec.js.map +1 -0
- package/lib/features/rank/model.d.ts +22 -0
- package/lib/features/rank/model.d.ts.map +1 -0
- package/lib/features/rank/model.js +28 -0
- package/lib/features/rank/model.js.map +1 -0
- package/lib/features/reconnect/model.d.ts +30 -0
- package/lib/features/reconnect/model.d.ts.map +1 -0
- package/lib/features/reconnect/model.js +66 -0
- package/lib/features/reconnect/model.js.map +1 -0
- package/lib/features/save/di.config.d.ts +23 -0
- package/lib/features/save/di.config.d.ts.map +1 -0
- package/lib/features/save/di.config.js +29 -0
- package/lib/features/save/di.config.js.map +1 -0
- package/lib/features/save/model.d.ts +22 -0
- package/lib/features/save/model.d.ts.map +1 -0
- package/lib/features/save/model.js +9 -0
- package/lib/features/save/model.js.map +1 -0
- package/lib/features/save/save.d.ts +27 -0
- package/lib/features/save/save.d.ts.map +1 -0
- package/lib/features/save/save.js +42 -0
- package/lib/features/save/save.js.map +1 -0
- package/lib/features/select/di.config.d.ts +19 -0
- package/lib/features/select/di.config.d.ts.map +1 -0
- package/lib/features/select/di.config.js +35 -0
- package/lib/features/select/di.config.js.map +1 -0
- package/lib/features/select/select-feedback-action.d.ts +34 -0
- package/lib/features/select/select-feedback-action.d.ts.map +1 -0
- package/lib/features/select/select-feedback-action.js +97 -0
- package/lib/features/select/select-feedback-action.js.map +1 -0
- package/lib/features/select/select-mouse-listener.d.ts +25 -0
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -0
- package/lib/features/select/select-mouse-listener.js +32 -0
- package/lib/features/select/select-mouse-listener.js.map +1 -0
- package/lib/features/select/selection-service.d.ts +52 -0
- package/lib/features/select/selection-service.d.ts.map +1 -0
- package/lib/features/select/selection-service.js +226 -0
- package/lib/features/select/selection-service.js.map +1 -0
- package/lib/features/select/selection-service.spec.d.ts +2 -0
- package/lib/features/select/selection-service.spec.d.ts.map +1 -0
- package/lib/features/select/selection-service.spec.js +360 -0
- package/lib/features/select/selection-service.spec.js.map +1 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +47 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +236 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -0
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts +43 -0
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -0
- package/lib/features/tool-feedback/creation-tool-feedback.js +181 -0
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -0
- package/lib/features/tool-feedback/css-feedback.d.ts +32 -0
- package/lib/features/tool-feedback/css-feedback.d.ts.map +1 -0
- package/lib/features/tool-feedback/css-feedback.js +111 -0
- package/lib/features/tool-feedback/css-feedback.js.map +1 -0
- package/lib/features/tool-feedback/di.config.d.ts +19 -0
- package/lib/features/tool-feedback/di.config.d.ts.map +1 -0
- package/lib/features/tool-feedback/di.config.js +53 -0
- package/lib/features/tool-feedback/di.config.js.map +1 -0
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +82 -0
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -0
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +315 -0
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -0
- package/lib/features/tool-feedback/feedback-action-dispatcher.d.ts +50 -0
- package/lib/features/tool-feedback/feedback-action-dispatcher.d.ts.map +1 -0
- package/lib/features/tool-feedback/feedback-action-dispatcher.js +75 -0
- package/lib/features/tool-feedback/feedback-action-dispatcher.js.map +1 -0
- package/lib/features/tool-feedback/marquee-tool-feedback.d.ts +32 -0
- package/lib/features/tool-feedback/marquee-tool-feedback.d.ts.map +1 -0
- package/lib/features/tool-feedback/marquee-tool-feedback.js +111 -0
- package/lib/features/tool-feedback/marquee-tool-feedback.js.map +1 -0
- package/lib/features/tool-feedback/model.d.ts +23 -0
- package/lib/features/tool-feedback/model.d.ts.map +1 -0
- package/lib/features/tool-feedback/model.js +34 -0
- package/lib/features/tool-feedback/model.js.map +1 -0
- package/lib/features/tool-feedback/view.d.ts +16 -0
- package/lib/features/tool-feedback/view.d.ts.map +1 -0
- package/lib/features/tool-feedback/view.js +81 -0
- package/lib/features/tool-feedback/view.js.map +1 -0
- package/lib/features/tool-palette/di.config.d.ts +20 -0
- package/lib/features/tool-palette/di.config.d.ts.map +1 -0
- package/lib/features/tool-palette/di.config.js +29 -0
- package/lib/features/tool-palette/di.config.js.map +1 -0
- package/lib/features/tool-palette/palette-item.d.ts +27 -0
- package/lib/features/tool-palette/palette-item.d.ts.map +1 -0
- package/lib/features/tool-palette/palette-item.js +37 -0
- package/lib/features/tool-palette/palette-item.js.map +1 -0
- package/lib/features/tool-palette/tool-palette.d.ts +56 -0
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -0
- package/lib/features/tool-palette/tool-palette.js +401 -0
- package/lib/features/tool-palette/tool-palette.js.map +1 -0
- package/lib/features/tools/base-glsp-tool.d.ts +20 -0
- package/lib/features/tools/base-glsp-tool.d.ts.map +1 -0
- package/lib/features/tools/base-glsp-tool.js +70 -0
- package/lib/features/tools/base-glsp-tool.js.map +1 -0
- package/lib/features/tools/change-bounds-tool.d.ts +71 -0
- package/lib/features/tools/change-bounds-tool.d.ts.map +1 -0
- package/lib/features/tools/change-bounds-tool.js +371 -0
- package/lib/features/tools/change-bounds-tool.js.map +1 -0
- package/lib/features/tools/delete-tool.d.ts +36 -0
- package/lib/features/tools/delete-tool.d.ts.map +1 -0
- package/lib/features/tools/delete-tool.js +129 -0
- package/lib/features/tools/delete-tool.js.map +1 -0
- package/lib/features/tools/di.config.d.ts +23 -0
- package/lib/features/tools/di.config.d.ts.map +1 -0
- package/lib/features/tools/di.config.js +55 -0
- package/lib/features/tools/di.config.js.map +1 -0
- package/lib/features/tools/edge-creation-tool.d.ts +37 -0
- package/lib/features/tools/edge-creation-tool.d.ts.map +1 -0
- package/lib/features/tools/edge-creation-tool.js +158 -0
- package/lib/features/tools/edge-creation-tool.js.map +1 -0
- package/lib/features/tools/edge-edit-tool.d.ts +50 -0
- package/lib/features/tools/edge-edit-tool.d.ts.map +1 -0
- package/lib/features/tools/edge-edit-tool.js +281 -0
- package/lib/features/tools/edge-edit-tool.js.map +1 -0
- package/lib/features/tools/marquee-mouse-tool.d.ts +37 -0
- package/lib/features/tools/marquee-mouse-tool.d.ts.map +1 -0
- package/lib/features/tools/marquee-mouse-tool.js +226 -0
- package/lib/features/tools/marquee-mouse-tool.js.map +1 -0
- package/lib/features/tools/marquee-tool.d.ts +14 -0
- package/lib/features/tools/marquee-tool.d.ts.map +1 -0
- package/lib/features/tools/marquee-tool.js +69 -0
- package/lib/features/tools/marquee-tool.js.map +1 -0
- package/lib/features/tools/model.d.ts +22 -0
- package/lib/features/tools/model.d.ts.map +1 -0
- package/lib/features/tools/model.js +24 -0
- package/lib/features/tools/model.js.map +1 -0
- package/lib/features/tools/node-creation-tool.d.ts +26 -0
- package/lib/features/tools/node-creation-tool.d.ts.map +1 -0
- package/lib/features/tools/node-creation-tool.js +117 -0
- package/lib/features/tools/node-creation-tool.js.map +1 -0
- package/lib/features/tools/view.d.ts +7 -0
- package/lib/features/tools/view.d.ts.map +1 -0
- package/lib/features/tools/view.js +40 -0
- package/lib/features/tools/view.js.map +1 -0
- package/lib/features/undo-redo/model.d.ts +27 -0
- package/lib/features/undo-redo/model.d.ts.map +1 -0
- package/lib/features/undo-redo/model.js +18 -0
- package/lib/features/undo-redo/model.js.map +1 -0
- package/lib/features/validation/di.config.d.ts +25 -0
- package/lib/features/validation/di.config.d.ts.map +1 -0
- package/lib/features/validation/di.config.js +44 -0
- package/lib/features/validation/di.config.js.map +1 -0
- package/lib/features/validation/issue-marker.d.ts +43 -0
- package/lib/features/validation/issue-marker.d.ts.map +1 -0
- package/lib/features/validation/issue-marker.js +89 -0
- package/lib/features/validation/issue-marker.js.map +1 -0
- package/lib/features/validation/marker-navigator.d.ts +55 -0
- package/lib/features/validation/marker-navigator.d.ts.map +1 -0
- package/lib/features/validation/marker-navigator.js +247 -0
- package/lib/features/validation/marker-navigator.js.map +1 -0
- package/lib/features/validation/marker-navigator.spec.d.ts +18 -0
- package/lib/features/validation/marker-navigator.spec.d.ts.map +1 -0
- package/lib/features/validation/marker-navigator.spec.js +177 -0
- package/lib/features/validation/marker-navigator.spec.js.map +1 -0
- package/lib/features/validation/validate.d.ts +111 -0
- package/lib/features/validation/validate.d.ts.map +1 -0
- package/lib/features/validation/validate.js +290 -0
- package/lib/features/validation/validate.js.map +1 -0
- package/lib/features/viewport/di.config.d.ts +19 -0
- package/lib/features/viewport/di.config.d.ts.map +1 -0
- package/lib/features/viewport/di.config.js +34 -0
- package/lib/features/viewport/di.config.js.map +1 -0
- package/lib/features/viewport/glsp-scroll-mouse-listener.d.ts +7 -0
- package/lib/features/viewport/glsp-scroll-mouse-listener.d.ts.map +1 -0
- package/lib/features/viewport/glsp-scroll-mouse-listener.js +54 -0
- package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -0
- package/lib/index.d.ts +110 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +144 -0
- package/lib/index.js.map +1 -0
- package/lib/lib/model.d.ts +24 -0
- package/lib/lib/model.d.ts.map +1 -0
- package/lib/lib/model.js +33 -0
- package/lib/lib/model.js.map +1 -0
- package/lib/model-source/glsp-diagram-server.d.ts +38 -0
- package/lib/model-source/glsp-diagram-server.d.ts.map +1 -0
- package/lib/model-source/glsp-diagram-server.js +88 -0
- package/lib/model-source/glsp-diagram-server.js.map +1 -0
- package/lib/model-source/glsp-server-status.d.ts +30 -0
- package/lib/model-source/glsp-server-status.d.ts.map +1 -0
- package/lib/model-source/glsp-server-status.js +44 -0
- package/lib/model-source/glsp-server-status.js.map +1 -0
- package/lib/utils/argument-utils.d.ts +50 -0
- package/lib/utils/argument-utils.d.ts.map +1 -0
- package/lib/utils/argument-utils.js +112 -0
- package/lib/utils/argument-utils.js.map +1 -0
- package/lib/utils/array-utils.d.ts +28 -0
- package/lib/utils/array-utils.d.ts.map +1 -0
- package/lib/utils/array-utils.js +56 -0
- package/lib/utils/array-utils.js.map +1 -0
- package/lib/utils/html-utils.d.ts +17 -0
- package/lib/utils/html-utils.d.ts.map +1 -0
- package/lib/utils/html-utils.js +30 -0
- package/lib/utils/html-utils.js.map +1 -0
- package/lib/utils/layout-utils.d.ts +41 -0
- package/lib/utils/layout-utils.d.ts.map +1 -0
- package/lib/utils/layout-utils.js +61 -0
- package/lib/utils/layout-utils.js.map +1 -0
- package/lib/utils/marker.d.ts +48 -0
- package/lib/utils/marker.d.ts.map +1 -0
- package/lib/utils/marker.js +48 -0
- package/lib/utils/marker.js.map +1 -0
- package/lib/utils/smodel-util.d.ts +41 -0
- package/lib/utils/smodel-util.d.ts.map +1 -0
- package/lib/utils/smodel-util.js +134 -0
- package/lib/utils/smodel-util.js.map +1 -0
- package/lib/utils/viewpoint-util.d.ts +52 -0
- package/lib/utils/viewpoint-util.d.ts.map +1 -0
- package/lib/utils/viewpoint-util.js +89 -0
- package/lib/utils/viewpoint-util.js.map +1 -0
- package/lib/views/base-view-module.d.ts +24 -0
- package/lib/views/base-view-module.d.ts.map +1 -0
- package/lib/views/base-view-module.js +59 -0
- package/lib/views/base-view-module.js.map +1 -0
- package/lib/views/default-types.d.ts +37 -0
- package/lib/views/default-types.d.ts.map +1 -0
- package/lib/views/default-types.js +47 -0
- package/lib/views/default-types.js.map +1 -0
- package/lib/views/glsp-edge-view.d.ts +11 -0
- package/lib/views/glsp-edge-view.d.ts.map +1 -0
- package/lib/views/glsp-edge-view.js +70 -0
- package/lib/views/glsp-edge-view.js.map +1 -0
- package/lib/views/index.d.ts +22 -0
- package/lib/views/index.d.ts.map +1 -0
- package/lib/views/index.js +34 -0
- package/lib/views/index.js.map +1 -0
- package/lib/views/issue-marker-view.d.ts +8 -0
- package/lib/views/issue-marker-view.d.ts.map +1 -0
- package/lib/views/issue-marker-view.js +59 -0
- package/lib/views/issue-marker-view.js.map +1 -0
- package/lib/views/rounded-corner-view.d.ts +13 -0
- package/lib/views/rounded-corner-view.d.ts.map +1 -0
- package/lib/views/rounded-corner-view.js +82 -0
- package/lib/views/rounded-corner-view.js.map +1 -0
- package/lib/views/rounded-corner.d.ts +37 -0
- package/lib/views/rounded-corner.d.ts.map +1 -0
- package/lib/views/rounded-corner.js +62 -0
- package/lib/views/rounded-corner.js.map +1 -0
- package/package.json +68 -0
- package/src/base/action-dispatcher.ts +103 -0
- package/src/base/actions/context-actions.ts +43 -0
- package/src/base/actions/edit-mode-action.ts +33 -0
- package/src/base/actions/edit-validation-actions.ts +103 -0
- package/src/base/actions/focus-change-action.ts +26 -0
- package/src/base/args.ts +26 -0
- package/src/base/auto-complete/auto-complete-actions.ts +24 -0
- package/src/base/auto-complete/auto-complete-widget.ts +314 -0
- package/src/base/auto-complete/validation-decorator.ts +126 -0
- package/src/base/command-stack.ts +36 -0
- package/src/base/di.config.ts +96 -0
- package/src/base/drag-aware-mouse-listener.ts +69 -0
- package/src/base/editor-context.ts +124 -0
- package/src/base/focus-tracker.ts +50 -0
- package/src/base/model/model-registry.ts +31 -0
- package/src/base/model/update-model-command.ts +118 -0
- package/src/base/model-initialization-constraint.ts +94 -0
- package/src/base/operations/operation.ts +178 -0
- package/src/base/selection-clearing-mouse-listener.ts +43 -0
- package/src/base/source-uri-aware.ts +22 -0
- package/src/base/tool-manager/glsp-tool-manager.ts +97 -0
- package/src/base/types.ts +37 -0
- package/src/base/view/view-registry.ts +31 -0
- package/src/features/change-bounds/model.ts +74 -0
- package/src/features/change-bounds/movement-restrictor.ts +89 -0
- package/src/features/change-bounds/snap.ts +35 -0
- package/src/features/command-palette/command-palette-tool.ts +46 -0
- package/src/features/command-palette/di.config.ts +34 -0
- package/src/features/command-palette/server-command-palette-provider.ts +48 -0
- package/src/features/context-menu/delete-element-context-menu.ts +42 -0
- package/src/features/context-menu/di.config.ts +35 -0
- package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +50 -0
- package/src/features/context-menu/server-context-menu-provider.ts +46 -0
- package/src/features/copy-paste/copy-paste-actions.ts +60 -0
- package/src/features/copy-paste/copy-paste-context-menu.ts +138 -0
- package/src/features/copy-paste/copy-paste-handler.ts +152 -0
- package/src/features/copy-paste/di.config.ts +45 -0
- package/src/features/decoration/decoration-placer.ts +46 -0
- package/src/features/decoration/di.config.ts +28 -0
- package/src/features/edit-label/di.config.ts +30 -0
- package/src/features/edit-label/edit-label-tool.ts +51 -0
- package/src/features/edit-label/edit-label-validator.ts +104 -0
- package/src/features/hints/di.config.ts +30 -0
- package/src/features/hints/model.ts +34 -0
- package/src/features/hints/request-type-hints-action.ts +36 -0
- package/src/features/hints/type-hints.ts +257 -0
- package/src/features/hover/di.config.ts +61 -0
- package/src/features/hover/hover.ts +95 -0
- package/src/features/layout/di.config.ts +26 -0
- package/src/features/layout/layout-commands.spec.ts +366 -0
- package/src/features/layout/layout-commands.ts +415 -0
- package/src/features/model-source-watcher/di.config.ts +26 -0
- package/src/features/model-source-watcher/model-source-changed-action-handler.ts +70 -0
- package/src/features/model-source-watcher/model-source-changed-action.ts +26 -0
- package/src/features/mouse-tool/di.config.ts +28 -0
- package/src/features/mouse-tool/mouse-tool.ts +139 -0
- package/src/features/navigation/di.config.ts +35 -0
- package/src/features/navigation/navigation-action-handler.ts +272 -0
- package/src/features/navigation/navigation-target-resolver.spec.ts +61 -0
- package/src/features/navigation/navigation-target-resolver.ts +146 -0
- package/src/features/rank/model.ts +29 -0
- package/src/features/reconnect/model.ts +76 -0
- package/src/features/save/di.config.ts +30 -0
- package/src/features/save/model.ts +26 -0
- package/src/features/save/save.ts +35 -0
- package/src/features/select/di.config.ts +35 -0
- package/src/features/select/select-feedback-action.ts +87 -0
- package/src/features/select/select-mouse-listener.ts +26 -0
- package/src/features/select/selection-service.spec.ts +372 -0
- package/src/features/select/selection-service.ts +239 -0
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +244 -0
- package/src/features/tool-feedback/creation-tool-feedback.ts +190 -0
- package/src/features/tool-feedback/css-feedback.ts +98 -0
- package/src/features/tool-feedback/di.config.ts +69 -0
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +327 -0
- package/src/features/tool-feedback/feedback-action-dispatcher.ts +101 -0
- package/src/features/tool-feedback/marquee-tool-feedback.ts +104 -0
- package/src/features/tool-feedback/model.ts +32 -0
- package/src/features/tool-feedback/view.tsx +70 -0
- package/src/features/tool-palette/di.config.ts +30 -0
- package/src/features/tool-palette/palette-item.ts +40 -0
- package/src/features/tool-palette/tool-palette.ts +416 -0
- package/src/features/tools/base-glsp-tool.ts +53 -0
- package/src/features/tools/change-bounds-tool.ts +445 -0
- package/src/features/tools/delete-tool.ts +120 -0
- package/src/features/tools/di.config.ts +56 -0
- package/src/features/tools/edge-creation-tool.ts +171 -0
- package/src/features/tools/edge-edit-tool.ts +325 -0
- package/src/features/tools/marquee-mouse-tool.ts +244 -0
- package/src/features/tools/marquee-tool.ts +52 -0
- package/src/features/tools/model.ts +22 -0
- package/src/features/tools/node-creation-tool.ts +123 -0
- package/src/features/tools/view.tsx +38 -0
- package/src/features/undo-redo/model.ts +26 -0
- package/src/features/validation/di.config.ts +51 -0
- package/src/features/validation/issue-marker.ts +93 -0
- package/src/features/validation/marker-navigator.spec.ts +207 -0
- package/src/features/validation/marker-navigator.ts +249 -0
- package/src/features/validation/validate.ts +274 -0
- package/src/features/viewport/di.config.ts +47 -0
- package/src/features/viewport/glsp-scroll-mouse-listener.ts +50 -0
- package/src/index.ts +115 -0
- package/src/lib/model.ts +27 -0
- package/src/model-source/glsp-diagram-server.ts +114 -0
- package/src/model-source/glsp-server-status.ts +38 -0
- package/src/utils/argument-utils.ts +127 -0
- package/src/utils/array-utils.ts +55 -0
- package/src/utils/html-utils.ts +25 -0
- package/src/utils/layout-utils.ts +97 -0
- package/src/utils/marker.ts +63 -0
- package/src/utils/smodel-util.ts +149 -0
- package/src/utils/viewpoint-util.ts +99 -0
- package/src/views/base-view-module.ts +98 -0
- package/src/views/default-types.ts +48 -0
- package/src/views/glsp-edge-view.tsx +70 -0
- package/src/views/index.ts +21 -0
- package/src/views/issue-marker-view.tsx +55 -0
- package/src/views/rounded-corner-view.tsx +88 -0
- package/src/views/rounded-corner.ts +88 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/********************************************************************************
|
|
4
|
+
* Copyright (c) 2020 EclipseSource and others.
|
|
5
|
+
*
|
|
6
|
+
* This program and the accompanying materials are made available under the
|
|
7
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
8
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
9
|
+
*
|
|
10
|
+
* This Source Code may also be made available under the following Secondary
|
|
11
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
12
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
13
|
+
* with the GNU Classpath Exception which is available at
|
|
14
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
15
|
+
*
|
|
16
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
|
+
********************************************************************************/
|
|
18
|
+
/* eslint-disable import/no-deprecated,no-unused-expressions */
|
|
19
|
+
require("mocha");
|
|
20
|
+
require("reflect-metadata");
|
|
21
|
+
const chai_1 = require("chai");
|
|
22
|
+
const inversify_1 = require("inversify");
|
|
23
|
+
const lib_1 = require("sprotty/lib");
|
|
24
|
+
const di_config_1 = require("sprotty/lib/base/di.config");
|
|
25
|
+
const sgraph_factory_1 = require("sprotty/lib/graph/sgraph-factory");
|
|
26
|
+
const di_config_2 = require("./di.config");
|
|
27
|
+
const marker_navigator_1 = require("./marker-navigator");
|
|
28
|
+
describe('MarkerNavigator', () => {
|
|
29
|
+
const container = new inversify_1.Container();
|
|
30
|
+
container.load(di_config_1.default, lib_1.decorationModule, di_config_2.markerNavigatorModule);
|
|
31
|
+
container.rebind(lib_1.TYPES.IModelFactory).to(sgraph_factory_1.SGraphFactory).inSingletonScope();
|
|
32
|
+
const graphFactory = container.get(lib_1.TYPES.IModelFactory);
|
|
33
|
+
const markerNavigator = container.get(marker_navigator_1.MarkerNavigator);
|
|
34
|
+
const rootWithoutAnyMarkers = graphFactory.createRoot({
|
|
35
|
+
id: 'root', type: 'graph',
|
|
36
|
+
children: [
|
|
37
|
+
{
|
|
38
|
+
id: '1',
|
|
39
|
+
type: 'node'
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
const rootWithMarkers = graphFactory.createRoot({
|
|
44
|
+
id: 'root', type: 'graph',
|
|
45
|
+
children: [
|
|
46
|
+
{
|
|
47
|
+
id: 'bottom-right', type: 'node'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'top-right', type: 'node'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'top-left', type: 'node'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'bottom-left', type: 'node'
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
const elementTopLeft = rootWithMarkers.children[2];
|
|
61
|
+
elementTopLeft.bounds = { width: 10, height: 10, x: 100, y: 100 };
|
|
62
|
+
const elementTopRight = rootWithMarkers.children[1];
|
|
63
|
+
elementTopRight.bounds = { width: 10, height: 10, x: 200, y: 100 };
|
|
64
|
+
const elementBottomLeft = rootWithMarkers.children[3];
|
|
65
|
+
elementBottomLeft.bounds = { width: 10, height: 10, x: 100, y: 200 };
|
|
66
|
+
const elementBottomRight = rootWithMarkers.children[0];
|
|
67
|
+
elementBottomRight.bounds = { width: 10, height: 10, x: 200, y: 200 };
|
|
68
|
+
beforeEach('clear issue marker', () => {
|
|
69
|
+
[elementTopLeft, elementTopRight, elementBottomLeft, elementBottomRight].forEach(clearMarker);
|
|
70
|
+
});
|
|
71
|
+
it('next(undefined) without any markers returns undefined', () => {
|
|
72
|
+
chai_1.expect(markerNavigator.next(rootWithoutAnyMarkers)).to.be.undefined;
|
|
73
|
+
});
|
|
74
|
+
it('previous(undefined) without any markers returns undefined', () => {
|
|
75
|
+
chai_1.expect(markerNavigator.previous(rootWithoutAnyMarkers)).to.be.undefined;
|
|
76
|
+
});
|
|
77
|
+
it('next(undefined) with one marker returns the one marker', () => {
|
|
78
|
+
const marker = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
79
|
+
const next = markerNavigator.next(rootWithMarkers);
|
|
80
|
+
chai_1.expect(next).to.eql(marker);
|
|
81
|
+
});
|
|
82
|
+
it('next(firstMarker) with only one marker returns again the first marker', () => {
|
|
83
|
+
const marker = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
84
|
+
const next = markerNavigator.next(rootWithMarkers, marker);
|
|
85
|
+
chai_1.expect(next).to.eql(marker);
|
|
86
|
+
// and again and again
|
|
87
|
+
const nextNext = markerNavigator.next(rootWithMarkers, next);
|
|
88
|
+
chai_1.expect(nextNext).to.eql(marker);
|
|
89
|
+
});
|
|
90
|
+
it('previous(firstMarker) with only one marker returns again the first marker', () => {
|
|
91
|
+
const marker = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
92
|
+
const previous = markerNavigator.previous(rootWithMarkers, marker);
|
|
93
|
+
chai_1.expect(previous).to.eql(marker);
|
|
94
|
+
// and again and again
|
|
95
|
+
const previousPrevious = markerNavigator.previous(rootWithMarkers, previous);
|
|
96
|
+
chai_1.expect(previousPrevious).to.eql(marker);
|
|
97
|
+
});
|
|
98
|
+
it('next(firstMarker) with two marker returns second marker then again first marker', () => {
|
|
99
|
+
const marker1 = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
100
|
+
const marker2 = setIssues(elementTopRight, [{ message: 'msg', severity: 'error' }]);
|
|
101
|
+
const next = markerNavigator.next(rootWithMarkers, marker1);
|
|
102
|
+
chai_1.expect(next).to.eql(marker2);
|
|
103
|
+
// and again and again
|
|
104
|
+
const nextNext = markerNavigator.next(rootWithMarkers, next);
|
|
105
|
+
chai_1.expect(nextNext).to.eql(marker1);
|
|
106
|
+
});
|
|
107
|
+
it('previous(firstMarker) with two marker returns second marker then again first marker', () => {
|
|
108
|
+
const marker1 = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
109
|
+
const marker2 = setIssues(elementTopRight, [{ message: 'msg', severity: 'error' }]);
|
|
110
|
+
const next = markerNavigator.previous(rootWithMarkers, marker1);
|
|
111
|
+
chai_1.expect(next).to.eql(marker2);
|
|
112
|
+
// and again and again
|
|
113
|
+
const nextNext = markerNavigator.previous(rootWithMarkers, next);
|
|
114
|
+
chai_1.expect(nextNext).to.eql(marker1);
|
|
115
|
+
});
|
|
116
|
+
it('returns markers in the order left-to-right, top-to-bottom with next()', () => {
|
|
117
|
+
const marker1 = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
118
|
+
const marker2 = setIssues(elementTopRight, [{ message: 'msg', severity: 'error' }]);
|
|
119
|
+
const marker3 = setIssues(elementBottomLeft, [{ message: 'msg', severity: 'error' }]);
|
|
120
|
+
const marker4 = setIssues(elementBottomRight, [{ message: 'msg', severity: 'error' }]);
|
|
121
|
+
const found1 = markerNavigator.next(rootWithMarkers);
|
|
122
|
+
const found2 = markerNavigator.next(rootWithMarkers, found1);
|
|
123
|
+
const found3 = markerNavigator.next(rootWithMarkers, found2);
|
|
124
|
+
const found4 = markerNavigator.next(rootWithMarkers, found3);
|
|
125
|
+
const found5 = markerNavigator.next(rootWithMarkers, found4);
|
|
126
|
+
chai_1.expect(found1).to.eql(marker1);
|
|
127
|
+
chai_1.expect(found2).to.eql(marker2);
|
|
128
|
+
chai_1.expect(found3).to.eql(marker3);
|
|
129
|
+
chai_1.expect(found4).to.eql(marker4);
|
|
130
|
+
chai_1.expect(found5).to.eql(marker1);
|
|
131
|
+
});
|
|
132
|
+
it('returns markers in the order left-to-right, top-to-bottom with previous()', () => {
|
|
133
|
+
const marker1 = setIssues(elementTopLeft, [{ message: 'msg', severity: 'error' }]);
|
|
134
|
+
const marker2 = setIssues(elementTopRight, [{ message: 'msg', severity: 'error' }]);
|
|
135
|
+
const marker3 = setIssues(elementBottomLeft, [{ message: 'msg', severity: 'error' }]);
|
|
136
|
+
const marker4 = setIssues(elementBottomRight, [{ message: 'msg', severity: 'error' }]);
|
|
137
|
+
const found1 = markerNavigator.previous(rootWithMarkers);
|
|
138
|
+
const found2 = markerNavigator.previous(rootWithMarkers, found1);
|
|
139
|
+
const found3 = markerNavigator.previous(rootWithMarkers, found2);
|
|
140
|
+
const found4 = markerNavigator.previous(rootWithMarkers, found3);
|
|
141
|
+
const found5 = markerNavigator.previous(rootWithMarkers, found4);
|
|
142
|
+
chai_1.expect(found1).to.eql(marker1);
|
|
143
|
+
chai_1.expect(found2).to.eql(marker4);
|
|
144
|
+
chai_1.expect(found3).to.eql(marker3);
|
|
145
|
+
chai_1.expect(found4).to.eql(marker2);
|
|
146
|
+
chai_1.expect(found5).to.eql(marker1);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
function clearMarker(elem) {
|
|
150
|
+
elem.children.filter(isMarker).forEach(marker => elem.remove(marker));
|
|
151
|
+
}
|
|
152
|
+
function setIssues(elem, issues) {
|
|
153
|
+
const marker = getOrCreateMarker(elem);
|
|
154
|
+
marker.issues = issues;
|
|
155
|
+
return marker;
|
|
156
|
+
}
|
|
157
|
+
function getOrCreateMarker(elem) {
|
|
158
|
+
const marker = findMarker(elem);
|
|
159
|
+
if (marker instanceof lib_1.SIssueMarker) {
|
|
160
|
+
return marker;
|
|
161
|
+
}
|
|
162
|
+
return createMarker(elem);
|
|
163
|
+
}
|
|
164
|
+
function findMarker(elem) {
|
|
165
|
+
return elem.children.find(isMarker);
|
|
166
|
+
}
|
|
167
|
+
function isMarker(element) {
|
|
168
|
+
return element instanceof lib_1.SIssueMarker;
|
|
169
|
+
}
|
|
170
|
+
function createMarker(elem) {
|
|
171
|
+
const newMarker = new lib_1.SIssueMarker();
|
|
172
|
+
newMarker.type = 'marker';
|
|
173
|
+
newMarker.id = `${elem.id}_marker`;
|
|
174
|
+
elem.add(newMarker);
|
|
175
|
+
return newMarker;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=marker-navigator.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker-navigator.spec.js","sourceRoot":"","sources":["../../../src/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AAC,CAAC;AAChD,CAAC;AAED,SAAS,UAAU,CAAC,IAAoB;IACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,QAAQ,CAAC,OAAsB;IACpC,OAAO,OAAO,YAAY,kBAAY,CAAC;AAC3C,CAAC;AAED,SAAS,YAAY,CAAC,IAAoB;IACtC,MAAM,SAAS,GAAG,IAAI,kBAAY,EAAE,CAAC;IACrC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE,SAAS,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACpB,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Action, Command, CommandExecutionContext, CommandReturn, IActionDispatcher, SModelRoot } from 'sprotty';
|
|
2
|
+
import { EditorContextService } from '../../base/editor-context';
|
|
3
|
+
import { Marker } from '../../utils/marker';
|
|
4
|
+
import { IFeedbackActionDispatcher, IFeedbackEmitter } from '../tool-feedback/feedback-action-dispatcher';
|
|
5
|
+
import { FeedbackCommand } from '../tool-feedback/model';
|
|
6
|
+
/**
|
|
7
|
+
* Feedback emitter sending actions for visualizing model validation feedback and
|
|
8
|
+
* re-establishing this feedback visualization after the model has been updated.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ValidationFeedbackEmitter implements IFeedbackEmitter {
|
|
11
|
+
protected feedbackActionDispatcher: IFeedbackActionDispatcher;
|
|
12
|
+
protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
13
|
+
private registeredAction;
|
|
14
|
+
private constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Register the action that should be emitted for visualizing validation feedback.
|
|
17
|
+
* @param action the action that should be emitted when the model is updated and that will visualize the model validation feedback.
|
|
18
|
+
*/
|
|
19
|
+
registerValidationFeedbackAction(action: MarkersAction): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Action to set markers for a model
|
|
23
|
+
*/
|
|
24
|
+
export declare class SetMarkersAction implements MarkersAction {
|
|
25
|
+
readonly markers: Marker[];
|
|
26
|
+
readonly kind: string;
|
|
27
|
+
constructor(markers: Marker[], kind?: string);
|
|
28
|
+
}
|
|
29
|
+
export declare function isSetMarkersAction(action: Action): action is SetMarkersAction;
|
|
30
|
+
/**
|
|
31
|
+
* Manages current markers for the outside of the GLSP.
|
|
32
|
+
*
|
|
33
|
+
* Typically this is rebound by the surrounding tool, e.g. Theia, to be aware of
|
|
34
|
+
* and propagate current markers.
|
|
35
|
+
*/
|
|
36
|
+
export declare abstract class ExternalMarkerManager {
|
|
37
|
+
languageLabel: string;
|
|
38
|
+
protected actionDispatcher?: IActionDispatcher;
|
|
39
|
+
connect(actionDispatcher: IActionDispatcher): void;
|
|
40
|
+
removeMarkers(markers: Marker[]): void;
|
|
41
|
+
abstract setMarkers(markers: Marker[], sourceUri?: string): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Command for handling `SetMarkersAction`
|
|
45
|
+
*/
|
|
46
|
+
export declare class SetMarkersCommand extends Command {
|
|
47
|
+
action: SetMarkersAction;
|
|
48
|
+
protected validationFeedbackEmitter: ValidationFeedbackEmitter;
|
|
49
|
+
protected externalMarkerManager?: ExternalMarkerManager;
|
|
50
|
+
protected editorContextService: EditorContextService;
|
|
51
|
+
static readonly KIND = "setMarkers";
|
|
52
|
+
constructor(action: SetMarkersAction);
|
|
53
|
+
execute(context: CommandExecutionContext): Promise<SModelRoot>;
|
|
54
|
+
undo(context: CommandExecutionContext): CommandReturn;
|
|
55
|
+
redo(context: CommandExecutionContext): CommandReturn;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Action to retrieve markers for a model
|
|
59
|
+
*/
|
|
60
|
+
export declare class RequestMarkersAction implements Action {
|
|
61
|
+
readonly elementsIDs: string[];
|
|
62
|
+
readonly kind: string;
|
|
63
|
+
static readonly KIND = "requestMarkers";
|
|
64
|
+
constructor(elementsIDs?: string[], kind?: string);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Interface for actions processing markers
|
|
68
|
+
*/
|
|
69
|
+
export interface MarkersAction extends Action {
|
|
70
|
+
readonly markers: Marker[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Action for applying makers to a model
|
|
74
|
+
*/
|
|
75
|
+
export declare class ApplyMarkersAction implements MarkersAction {
|
|
76
|
+
readonly markers: Marker[];
|
|
77
|
+
readonly kind: string;
|
|
78
|
+
constructor(markers: Marker[], kind?: string);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Command for handling `ApplyMarkersAction`
|
|
82
|
+
*/
|
|
83
|
+
export declare class ApplyMarkersCommand extends FeedbackCommand {
|
|
84
|
+
protected action: ApplyMarkersAction;
|
|
85
|
+
static KIND: string;
|
|
86
|
+
readonly priority = 0;
|
|
87
|
+
constructor(action: ApplyMarkersAction);
|
|
88
|
+
execute(context: CommandExecutionContext): CommandReturn;
|
|
89
|
+
undo(context: CommandExecutionContext): CommandReturn;
|
|
90
|
+
redo(context: CommandExecutionContext): CommandReturn;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Action for clearing makers of a model
|
|
94
|
+
*/
|
|
95
|
+
export declare class DeleteMarkersAction implements MarkersAction {
|
|
96
|
+
readonly markers: Marker[];
|
|
97
|
+
readonly kind: string;
|
|
98
|
+
constructor(markers: Marker[], kind?: string);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Command for handling `DeleteMarkersAction`
|
|
102
|
+
*/
|
|
103
|
+
export declare class DeleteMarkersCommand extends Command {
|
|
104
|
+
protected action: DeleteMarkersAction;
|
|
105
|
+
static KIND: string;
|
|
106
|
+
constructor(action: DeleteMarkersAction);
|
|
107
|
+
execute(context: CommandExecutionContext): CommandReturn;
|
|
108
|
+
undo(context: CommandExecutionContext): CommandReturn;
|
|
109
|
+
redo(context: CommandExecutionContext): CommandReturn;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/features/validation/validate.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EAIjB,UAAU,EAGb,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD;;;GAGG;AACH,qBACa,yBAA0B,YAAW,gBAAgB;IAEhB,SAAS,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;IAEnE,SAAS,CAAC,gBAAgB,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEtG,OAAO,CAAC,gBAAgB,CAAgB;IAGxC,OAAO;IAEP;;;OAGG;IACH,gCAAgC,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;CAchE;AAED;;GAEG;AACH,qBAAa,gBAAiB,YAAW,aAAa;aACtB,OAAO,EAAE,MAAM,EAAE;aAAkB,IAAI;gBAAvC,OAAO,EAAE,MAAM,EAAE,EAAkB,IAAI,SAAyB;CAC/F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED;;;;;GAKG;AACH,8BACsB,qBAAqB;IAEvC,aAAa,EAAE,MAAM,CAAC;IAEtB,SAAS,CAAC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IAE/C,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI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BAEsB,MAAM,EAAE,kBAAkB;IAItE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAcxD,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAIrD,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;CAGxD;AAiBD;;GAEG;AACH,qBACa,mBAAoB,YAAW,aAAa;aACzB,OAAO,EAAE,MAAM,EAAE;aAAkB,IAAI;gBAAvC,OAAO,EAAE,MAAM,EAAE,EAAkB,IAAI,SAA4B;CAClG;AAED;;GAEG;AACH,qBACa,oBAAqB,SAAQ,OAAO;IAGX,SAAS,CAAC,MAAM,EAAE,mBAAmB;IAFvE,MAAM,CAAC,IAAI,SAAmB;gBAEc,MAAM,EAAE,mBAAmB;IAIvE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAyBxD,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAIrD,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;CAGxD"}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DeleteMarkersCommand = exports.DeleteMarkersAction = exports.ApplyMarkersCommand = exports.ApplyMarkersAction = exports.RequestMarkersAction = exports.SetMarkersCommand = exports.ExternalMarkerManager = exports.isSetMarkersAction = exports.SetMarkersAction = exports.ValidationFeedbackEmitter = void 0;
|
|
16
|
+
/********************************************************************************
|
|
17
|
+
* Copyright (c) 2019-2020 EclipseSource and others.
|
|
18
|
+
*
|
|
19
|
+
* This program and the accompanying materials are made available under the
|
|
20
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
21
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
22
|
+
*
|
|
23
|
+
* This Source Code may also be made available under the following Secondary
|
|
24
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
25
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
26
|
+
* with the GNU Classpath Exception which is available at
|
|
27
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
28
|
+
*
|
|
29
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
30
|
+
********************************************************************************/
|
|
31
|
+
const inversify_1 = require("inversify");
|
|
32
|
+
const sprotty_1 = require("sprotty");
|
|
33
|
+
const editor_context_1 = require("../../base/editor-context");
|
|
34
|
+
const types_1 = require("../../base/types");
|
|
35
|
+
const smodel_util_1 = require("../../utils/smodel-util");
|
|
36
|
+
const hover_1 = require("../hover/hover");
|
|
37
|
+
const model_1 = require("../tool-feedback/model");
|
|
38
|
+
const issue_marker_1 = require("./issue-marker");
|
|
39
|
+
/**
|
|
40
|
+
* Feedback emitter sending actions for visualizing model validation feedback and
|
|
41
|
+
* re-establishing this feedback visualization after the model has been updated.
|
|
42
|
+
*/
|
|
43
|
+
let ValidationFeedbackEmitter = class ValidationFeedbackEmitter {
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
45
|
+
constructor() { }
|
|
46
|
+
/**
|
|
47
|
+
* Register the action that should be emitted for visualizing validation feedback.
|
|
48
|
+
* @param action the action that should be emitted when the model is updated and that will visualize the model validation feedback.
|
|
49
|
+
*/
|
|
50
|
+
registerValidationFeedbackAction(action) {
|
|
51
|
+
// De-register old action responsible for applying markers and re-applying them when the model is updated
|
|
52
|
+
this.feedbackActionDispatcher.deregisterFeedback(this, []);
|
|
53
|
+
// Clear existing markers
|
|
54
|
+
if (this.registeredAction !== undefined) {
|
|
55
|
+
const deleteMarkersAction = new DeleteMarkersAction(this.registeredAction.markers);
|
|
56
|
+
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(deleteMarkersAction));
|
|
57
|
+
}
|
|
58
|
+
// Register new action responsible for applying markers and re-applying them when the model is updated
|
|
59
|
+
this.feedbackActionDispatcher.registerFeedback(this, [action]);
|
|
60
|
+
this.registeredAction = action;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
__decorate([
|
|
64
|
+
inversify_1.inject(types_1.GLSP_TYPES.IFeedbackActionDispatcher),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], ValidationFeedbackEmitter.prototype, "feedbackActionDispatcher", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
inversify_1.inject(sprotty_1.TYPES.IActionDispatcherProvider),
|
|
69
|
+
__metadata("design:type", Function)
|
|
70
|
+
], ValidationFeedbackEmitter.prototype, "actionDispatcher", void 0);
|
|
71
|
+
ValidationFeedbackEmitter = __decorate([
|
|
72
|
+
inversify_1.injectable(),
|
|
73
|
+
__metadata("design:paramtypes", [])
|
|
74
|
+
], ValidationFeedbackEmitter);
|
|
75
|
+
exports.ValidationFeedbackEmitter = ValidationFeedbackEmitter;
|
|
76
|
+
/**
|
|
77
|
+
* Action to set markers for a model
|
|
78
|
+
*/
|
|
79
|
+
class SetMarkersAction {
|
|
80
|
+
constructor(markers, kind = SetMarkersCommand.KIND) {
|
|
81
|
+
this.markers = markers;
|
|
82
|
+
this.kind = kind;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.SetMarkersAction = SetMarkersAction;
|
|
86
|
+
function isSetMarkersAction(action) {
|
|
87
|
+
return SetMarkersCommand.KIND === action.kind && ('markers' in action);
|
|
88
|
+
}
|
|
89
|
+
exports.isSetMarkersAction = isSetMarkersAction;
|
|
90
|
+
/**
|
|
91
|
+
* Manages current markers for the outside of the GLSP.
|
|
92
|
+
*
|
|
93
|
+
* Typically this is rebound by the surrounding tool, e.g. Theia, to be aware of
|
|
94
|
+
* and propagate current markers.
|
|
95
|
+
*/
|
|
96
|
+
let ExternalMarkerManager = class ExternalMarkerManager {
|
|
97
|
+
connect(actionDispatcher) {
|
|
98
|
+
this.actionDispatcher = actionDispatcher;
|
|
99
|
+
}
|
|
100
|
+
removeMarkers(markers) {
|
|
101
|
+
if (this.actionDispatcher) {
|
|
102
|
+
this.actionDispatcher.dispatch(new DeleteMarkersAction(markers));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
ExternalMarkerManager = __decorate([
|
|
107
|
+
inversify_1.injectable()
|
|
108
|
+
], ExternalMarkerManager);
|
|
109
|
+
exports.ExternalMarkerManager = ExternalMarkerManager;
|
|
110
|
+
/**
|
|
111
|
+
* Command for handling `SetMarkersAction`
|
|
112
|
+
*/
|
|
113
|
+
let SetMarkersCommand = class SetMarkersCommand extends sprotty_1.Command {
|
|
114
|
+
constructor(action) {
|
|
115
|
+
super();
|
|
116
|
+
this.action = action;
|
|
117
|
+
}
|
|
118
|
+
async execute(context) {
|
|
119
|
+
const markers = this.action.markers;
|
|
120
|
+
const uri = await this.editorContextService.getSourceUri();
|
|
121
|
+
if (this.externalMarkerManager) {
|
|
122
|
+
this.externalMarkerManager.setMarkers(markers, uri);
|
|
123
|
+
}
|
|
124
|
+
const applyMarkersAction = new ApplyMarkersAction(markers);
|
|
125
|
+
this.validationFeedbackEmitter.registerValidationFeedbackAction(applyMarkersAction);
|
|
126
|
+
return context.root;
|
|
127
|
+
}
|
|
128
|
+
undo(context) {
|
|
129
|
+
return context.root;
|
|
130
|
+
}
|
|
131
|
+
redo(context) {
|
|
132
|
+
return this.execute(context);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
SetMarkersCommand.KIND = 'setMarkers';
|
|
136
|
+
__decorate([
|
|
137
|
+
inversify_1.inject(ValidationFeedbackEmitter),
|
|
138
|
+
__metadata("design:type", ValidationFeedbackEmitter)
|
|
139
|
+
], SetMarkersCommand.prototype, "validationFeedbackEmitter", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
inversify_1.inject(ExternalMarkerManager),
|
|
142
|
+
inversify_1.optional(),
|
|
143
|
+
__metadata("design:type", ExternalMarkerManager)
|
|
144
|
+
], SetMarkersCommand.prototype, "externalMarkerManager", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
inversify_1.inject(editor_context_1.EditorContextService),
|
|
147
|
+
__metadata("design:type", editor_context_1.EditorContextService)
|
|
148
|
+
], SetMarkersCommand.prototype, "editorContextService", void 0);
|
|
149
|
+
SetMarkersCommand = __decorate([
|
|
150
|
+
inversify_1.injectable(),
|
|
151
|
+
__param(0, inversify_1.inject(sprotty_1.TYPES.Action)),
|
|
152
|
+
__metadata("design:paramtypes", [SetMarkersAction])
|
|
153
|
+
], SetMarkersCommand);
|
|
154
|
+
exports.SetMarkersCommand = SetMarkersCommand;
|
|
155
|
+
/**
|
|
156
|
+
* Action to retrieve markers for a model
|
|
157
|
+
*/
|
|
158
|
+
class RequestMarkersAction {
|
|
159
|
+
constructor(elementsIDs = [], kind = RequestMarkersAction.KIND) {
|
|
160
|
+
this.elementsIDs = elementsIDs;
|
|
161
|
+
this.kind = kind;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.RequestMarkersAction = RequestMarkersAction;
|
|
165
|
+
RequestMarkersAction.KIND = 'requestMarkers';
|
|
166
|
+
/**
|
|
167
|
+
* Action for applying makers to a model
|
|
168
|
+
*/
|
|
169
|
+
let ApplyMarkersAction = class ApplyMarkersAction {
|
|
170
|
+
constructor(markers, kind = ApplyMarkersCommand.KIND) {
|
|
171
|
+
this.markers = markers;
|
|
172
|
+
this.kind = kind;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
ApplyMarkersAction = __decorate([
|
|
176
|
+
inversify_1.injectable(),
|
|
177
|
+
__metadata("design:paramtypes", [Array, Object])
|
|
178
|
+
], ApplyMarkersAction);
|
|
179
|
+
exports.ApplyMarkersAction = ApplyMarkersAction;
|
|
180
|
+
/**
|
|
181
|
+
* Command for handling `ApplyMarkersAction`
|
|
182
|
+
*/
|
|
183
|
+
let ApplyMarkersCommand = class ApplyMarkersCommand extends model_1.FeedbackCommand {
|
|
184
|
+
constructor(action) {
|
|
185
|
+
super();
|
|
186
|
+
this.action = action;
|
|
187
|
+
this.priority = 0;
|
|
188
|
+
}
|
|
189
|
+
execute(context) {
|
|
190
|
+
const markers = this.action.markers;
|
|
191
|
+
for (const marker of markers) {
|
|
192
|
+
const modelElement = context.root.index.getById(marker.elementId);
|
|
193
|
+
if (modelElement instanceof sprotty_1.SParentElement) {
|
|
194
|
+
const issueMarker = issue_marker_1.getOrCreateSIssueMarker(modelElement);
|
|
195
|
+
const issue = issue_marker_1.createSIssue(marker);
|
|
196
|
+
issueMarker.issues.push(issue);
|
|
197
|
+
addMaxSeverityCSSClassToIssueParent(modelElement, issueMarker);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return context.root;
|
|
201
|
+
}
|
|
202
|
+
undo(context) {
|
|
203
|
+
return context.root;
|
|
204
|
+
}
|
|
205
|
+
redo(context) {
|
|
206
|
+
return this.execute(context);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
ApplyMarkersCommand.KIND = 'applyMarkers';
|
|
210
|
+
ApplyMarkersCommand = __decorate([
|
|
211
|
+
inversify_1.injectable(),
|
|
212
|
+
__param(0, inversify_1.inject(sprotty_1.TYPES.Action)),
|
|
213
|
+
__metadata("design:paramtypes", [ApplyMarkersAction])
|
|
214
|
+
], ApplyMarkersCommand);
|
|
215
|
+
exports.ApplyMarkersCommand = ApplyMarkersCommand;
|
|
216
|
+
function addMaxSeverityCSSClassToIssueParent(modelElement, issueMarker) {
|
|
217
|
+
const maxSeverityCSSClass = hover_1.getSeverity(issueMarker);
|
|
218
|
+
if (!modelElement.cssClasses) {
|
|
219
|
+
modelElement.cssClasses = [maxSeverityCSSClass];
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
modelElement.cssClasses = modelElement.cssClasses.filter((value) => !value.match('info|warning|error'));
|
|
223
|
+
modelElement.cssClasses.push(maxSeverityCSSClass);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function removeCSSClassFromIssueParent(modelElement, issueMarker) {
|
|
227
|
+
smodel_util_1.removeCssClasses(modelElement, [hover_1.getSeverity(issueMarker)]);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Action for clearing makers of a model
|
|
231
|
+
*/
|
|
232
|
+
let DeleteMarkersAction = class DeleteMarkersAction {
|
|
233
|
+
constructor(markers, kind = DeleteMarkersCommand.KIND) {
|
|
234
|
+
this.markers = markers;
|
|
235
|
+
this.kind = kind;
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
DeleteMarkersAction = __decorate([
|
|
239
|
+
inversify_1.injectable(),
|
|
240
|
+
__metadata("design:paramtypes", [Array, Object])
|
|
241
|
+
], DeleteMarkersAction);
|
|
242
|
+
exports.DeleteMarkersAction = DeleteMarkersAction;
|
|
243
|
+
/**
|
|
244
|
+
* Command for handling `DeleteMarkersAction`
|
|
245
|
+
*/
|
|
246
|
+
let DeleteMarkersCommand = class DeleteMarkersCommand extends sprotty_1.Command {
|
|
247
|
+
constructor(action) {
|
|
248
|
+
super();
|
|
249
|
+
this.action = action;
|
|
250
|
+
}
|
|
251
|
+
execute(context) {
|
|
252
|
+
const markers = this.action.markers;
|
|
253
|
+
for (const marker of markers) {
|
|
254
|
+
const modelElement = context.root.index.getById(marker.elementId);
|
|
255
|
+
if (modelElement instanceof sprotty_1.SParentElement) {
|
|
256
|
+
const issueMarker = issue_marker_1.getSIssueMarker(modelElement);
|
|
257
|
+
if (issueMarker !== undefined) {
|
|
258
|
+
removeCSSClassFromIssueParent(modelElement, issueMarker);
|
|
259
|
+
for (let index = 0; index < issueMarker.issues.length; ++index) {
|
|
260
|
+
const issue = issueMarker.issues[index];
|
|
261
|
+
if (issue.message === marker.description) {
|
|
262
|
+
issueMarker.issues.splice(index--, 1);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (issueMarker.issues.length === 0) {
|
|
266
|
+
modelElement.remove(issueMarker);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
addMaxSeverityCSSClassToIssueParent(modelElement, issueMarker);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return context.root;
|
|
275
|
+
}
|
|
276
|
+
undo(context) {
|
|
277
|
+
return context.root;
|
|
278
|
+
}
|
|
279
|
+
redo(context) {
|
|
280
|
+
return this.execute(context);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
DeleteMarkersCommand.KIND = 'deleteMarkers';
|
|
284
|
+
DeleteMarkersCommand = __decorate([
|
|
285
|
+
inversify_1.injectable(),
|
|
286
|
+
__param(0, inversify_1.inject(sprotty_1.TYPES.Action)),
|
|
287
|
+
__metadata("design:paramtypes", [DeleteMarkersAction])
|
|
288
|
+
], DeleteMarkersCommand);
|
|
289
|
+
exports.DeleteMarkersCommand = DeleteMarkersCommand;
|
|
290
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/features/validation/validate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AA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AAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;wBAChD,IAAI,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC,WAAW,EAAE;4BACtC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;yBACzC;qBACJ;oBACD,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;wBACjC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;qBACpC;yBAAM;wBACH,mCAAmC,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;qBAClE;iBACJ;aACJ;SACJ;QACD,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,OAAgC;QACjC,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,OAAgC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;CACJ,CAAA;AAtCU,yBAAI,GAAG,eAAe,CAAC;AADrB,oBAAoB;IADhC,sBAAU,EAAE;IAII,WAAA,kBAAM,CAAC,eAAK,CAAC,MAAM,CAAC,CAAA;qCAAmB,mBAAmB;GAH9D,oBAAoB,CAuChC;AAvCY,oDAAoB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2021 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 { ContainerModule } from 'inversify';
|
|
17
|
+
declare const glspViewportModule: ContainerModule;
|
|
18
|
+
export default glspViewportModule;
|
|
19
|
+
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/viewport/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAiB5C,QAAA,MAAM,kBAAkB,iBAYtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|