@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 @@
|
|
|
1
|
+
{"version":3,"file":"snap.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEzD,qBACa,WAAY,YAAW,QAAQ;IACxC,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;CAMvD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.GridSnapper = void 0;
|
|
10
|
+
/********************************************************************************
|
|
11
|
+
* Copyright (c) 2020 EclipseSource and others.
|
|
12
|
+
*
|
|
13
|
+
* This program and the accompanying materials are made available under the
|
|
14
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
15
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
16
|
+
*
|
|
17
|
+
* This Source Code may also be made available under the following Secondary
|
|
18
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
19
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
20
|
+
* with the GNU Classpath Exception which is available at
|
|
21
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
22
|
+
*
|
|
23
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
|
+
********************************************************************************/
|
|
25
|
+
const inversify_1 = require("inversify");
|
|
26
|
+
let GridSnapper = class GridSnapper {
|
|
27
|
+
get gridX() {
|
|
28
|
+
return 10;
|
|
29
|
+
}
|
|
30
|
+
get gridY() {
|
|
31
|
+
return 10;
|
|
32
|
+
}
|
|
33
|
+
snap(position, element) {
|
|
34
|
+
return {
|
|
35
|
+
x: Math.round(position.x / this.gridX) * this.gridX,
|
|
36
|
+
y: Math.round(position.y / this.gridY) * this.gridY
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
GridSnapper = __decorate([
|
|
41
|
+
inversify_1.injectable()
|
|
42
|
+
], GridSnapper);
|
|
43
|
+
exports.GridSnapper = GridSnapper;
|
|
44
|
+
//# sourceMappingURL=snap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snap.js","sourceRoot":"","sources":["../../../src/features/change-bounds/snap.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAIvC,IAAa,WAAW,GAAxB,MAAa,WAAW;IACpB,IAAI,KAAK;QACL,OAAO,EAAE,CAAC;IACd,CAAC;IAED,IAAI,KAAK;QACL,OAAO,EAAE,CAAC;IACd,CAAC;IAED,IAAI,CAAC,QAAe,EAAE,OAAsB;QACxC,OAAO;YACH,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK;YACnD,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK;SACtD,CAAC;IACN,CAAC;CACJ,CAAA;AAfY,WAAW;IADvB,sBAAU,EAAE;GACA,WAAW,CAevB;AAfY,kCAAW"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KeyListener, KeyTool, Tool } from 'sprotty';
|
|
2
|
+
export declare class CommandPaletteTool implements Tool {
|
|
3
|
+
static ID: string;
|
|
4
|
+
protected commandPaletteKeyListener: KeyListener;
|
|
5
|
+
protected keyTool: KeyTool;
|
|
6
|
+
protected postConstruct(): void;
|
|
7
|
+
get id(): string;
|
|
8
|
+
enable(): void;
|
|
9
|
+
disable(): void;
|
|
10
|
+
protected createCommandPaleteKeyListener(): KeyListener;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=command-palette-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-palette-tool.d.ts","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette-tool.ts"],"names":[],"mappings":"AAgBA,OAAO,EAA6B,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEhF,qBACa,kBAAmB,YAAW,IAAI;IAC3C,MAAM,CAAC,EAAE,SAA+B;IAExC,SAAS,CAAC,yBAAyB,EAAE,WAAW,CAAC;IAChC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAG5C,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAIf,SAAS,CAAC,8BAA8B,IAAI,WAAW;CAG1D"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 CommandPaletteTool_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.CommandPaletteTool = void 0;
|
|
14
|
+
/********************************************************************************
|
|
15
|
+
* Copyright (c) 2020 EclipseSource and others.
|
|
16
|
+
*
|
|
17
|
+
* This program and the accompanying materials are made available under the
|
|
18
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
19
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
20
|
+
*
|
|
21
|
+
* This Source Code may also be made available under the following Secondary
|
|
22
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
23
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
24
|
+
* with the GNU Classpath Exception which is available at
|
|
25
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
26
|
+
*
|
|
27
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
28
|
+
********************************************************************************/
|
|
29
|
+
const inversify_1 = require("inversify");
|
|
30
|
+
const sprotty_1 = require("sprotty");
|
|
31
|
+
let CommandPaletteTool = CommandPaletteTool_1 = class CommandPaletteTool {
|
|
32
|
+
postConstruct() {
|
|
33
|
+
this.commandPaletteKeyListener = this.createCommandPaleteKeyListener();
|
|
34
|
+
}
|
|
35
|
+
get id() {
|
|
36
|
+
return CommandPaletteTool_1.ID;
|
|
37
|
+
}
|
|
38
|
+
enable() {
|
|
39
|
+
this.keyTool.register(this.commandPaletteKeyListener);
|
|
40
|
+
}
|
|
41
|
+
disable() {
|
|
42
|
+
this.keyTool.deregister(this.commandPaletteKeyListener);
|
|
43
|
+
}
|
|
44
|
+
createCommandPaleteKeyListener() {
|
|
45
|
+
return new sprotty_1.CommandPaletteKeyListener();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
CommandPaletteTool.ID = 'glsp.command-palette-tool';
|
|
49
|
+
__decorate([
|
|
50
|
+
inversify_1.inject(sprotty_1.KeyTool),
|
|
51
|
+
__metadata("design:type", sprotty_1.KeyTool)
|
|
52
|
+
], CommandPaletteTool.prototype, "keyTool", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
inversify_1.postConstruct(),
|
|
55
|
+
__metadata("design:type", Function),
|
|
56
|
+
__metadata("design:paramtypes", []),
|
|
57
|
+
__metadata("design:returntype", void 0)
|
|
58
|
+
], CommandPaletteTool.prototype, "postConstruct", null);
|
|
59
|
+
CommandPaletteTool = CommandPaletteTool_1 = __decorate([
|
|
60
|
+
inversify_1.injectable()
|
|
61
|
+
], CommandPaletteTool);
|
|
62
|
+
exports.CommandPaletteTool = CommandPaletteTool;
|
|
63
|
+
//# sourceMappingURL=command-palette-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-palette-tool.js","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette-tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA8D;AAC9D,qCAAgF;AAGhF,IAAa,kBAAkB,0BAA/B,MAAa,kBAAkB;IAOjB,aAAa;QACnB,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,8BAA8B,EAAE,CAAC;IAC3E,CAAC;IAED,IAAI,EAAE;QACF,OAAO,oBAAkB,CAAC,EAAE,CAAC;IACjC,CAAC;IAED,MAAM;QACF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC5D,CAAC;IAES,8BAA8B;QACpC,OAAO,IAAI,mCAAyB,EAAE,CAAC;IAC3C,CAAC;CACJ,CAAA;AAzBU,qBAAE,GAAG,2BAA2B,CAAC;AAGvB;IAAhB,kBAAM,CAAC,iBAAO,CAAC;8BAAoB,iBAAO;mDAAC;AAG5C;IADC,yBAAa,EAAE;;;;uDAGf;AATQ,kBAAkB;IAD9B,sBAAU,EAAE;GACA,kBAAkB,CA0B9B;AA1BY,gDAAkB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019 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 '../../../css/command-palette.css';
|
|
17
|
+
import { ContainerModule } from 'inversify';
|
|
18
|
+
declare const glspCommandPaletteModule: ContainerModule;
|
|
19
|
+
export default glspCommandPaletteModule;
|
|
20
|
+
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/command-palette/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAO5C,QAAA,MAAM,wBAAwB,iBAO5B,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/********************************************************************************
|
|
4
|
+
* Copyright (c) 2019 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
|
+
require("../../../css/command-palette.css");
|
|
19
|
+
const inversify_1 = require("inversify");
|
|
20
|
+
const sprotty_1 = require("sprotty");
|
|
21
|
+
const types_1 = require("../../base/types");
|
|
22
|
+
const command_palette_tool_1 = require("./command-palette-tool");
|
|
23
|
+
const server_command_palette_provider_1 = require("./server-command-palette-provider");
|
|
24
|
+
const glspCommandPaletteModule = new inversify_1.ContainerModule(bind => {
|
|
25
|
+
bind(sprotty_1.CommandPalette).toSelf().inSingletonScope();
|
|
26
|
+
bind(sprotty_1.TYPES.IUIExtension).toService(sprotty_1.CommandPalette);
|
|
27
|
+
bind(sprotty_1.CommandPaletteActionProviderRegistry).toSelf().inSingletonScope();
|
|
28
|
+
bind(sprotty_1.TYPES.ICommandPaletteActionProviderRegistry).toService(sprotty_1.CommandPaletteActionProviderRegistry);
|
|
29
|
+
bind(sprotty_1.TYPES.ICommandPaletteActionProvider).to(server_command_palette_provider_1.ServerCommandPaletteActionProvider);
|
|
30
|
+
bind(types_1.GLSP_TYPES.IDefaultTool).to(command_palette_tool_1.CommandPaletteTool);
|
|
31
|
+
});
|
|
32
|
+
exports.default = glspCommandPaletteModule;
|
|
33
|
+
//# sourceMappingURL=di.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/command-palette/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4CAA0C;AAE1C,yCAA4C;AAC5C,qCAAsF;AAEtF,4CAA8C;AAC9C,iEAA4D;AAC5D,uFAAuF;AAEvF,MAAM,wBAAwB,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACxD,IAAI,CAAC,wBAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjD,IAAI,CAAC,eAAK,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,wBAAc,CAAC,CAAC;IACnD,IAAI,CAAC,8CAAoC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvE,IAAI,CAAC,eAAK,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,8CAAoC,CAAC,CAAC;IAClG,IAAI,CAAC,eAAK,CAAC,6BAA6B,CAAC,CAAC,EAAE,CAAC,oEAAkC,CAAC,CAAC;IACjF,IAAI,CAAC,kBAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,yCAAkB,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC;AAEH,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action, ICommandPaletteActionProvider, LabeledAction, Point, SModelElement } from 'sprotty';
|
|
2
|
+
import { GLSPActionDispatcher } from '../../base/action-dispatcher';
|
|
3
|
+
import { EditorContextService } from '../../base/editor-context';
|
|
4
|
+
export declare namespace ServerCommandPalette {
|
|
5
|
+
const CONTEXT_ID = "command-palette";
|
|
6
|
+
const TEXT = "text";
|
|
7
|
+
const INDEX = "index";
|
|
8
|
+
}
|
|
9
|
+
export declare class ServerCommandPaletteActionProvider implements ICommandPaletteActionProvider {
|
|
10
|
+
protected actionDispatcher: GLSPActionDispatcher;
|
|
11
|
+
protected editorContext: EditorContextService;
|
|
12
|
+
getActions(_root: Readonly<SModelElement>, text: string, _lastMousePosition?: Point, index?: number): Promise<LabeledAction[]>;
|
|
13
|
+
getPaletteActionsFromResponse(action: Action): LabeledAction[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=server-command-palette-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-command-palette-provider.d.ts","sourceRoot":"","sources":["../../../src/features/command-palette/server-command-palette-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,6BAA6B,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAS,MAAM,SAAS,CAAC;AAE5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,UAAU,oBAAoB,CAAC;IACrC,MAAM,IAAI,SAAS,CAAC;IACpB,MAAM,KAAK,UAAU,CAAC;CAChC;AAED,qBACa,kCAAmC,YAAW,6BAA6B;IACnD,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IACpD,SAAS,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAE5E,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAQ9H,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE;CAMjE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ServerCommandPaletteActionProvider = exports.ServerCommandPalette = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2019 EclipseSource and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const sprotty_1 = require("sprotty");
|
|
30
|
+
const action_dispatcher_1 = require("../../base/action-dispatcher");
|
|
31
|
+
const context_actions_1 = require("../../base/actions/context-actions");
|
|
32
|
+
const editor_context_1 = require("../../base/editor-context");
|
|
33
|
+
var ServerCommandPalette;
|
|
34
|
+
(function (ServerCommandPalette) {
|
|
35
|
+
ServerCommandPalette.CONTEXT_ID = 'command-palette';
|
|
36
|
+
ServerCommandPalette.TEXT = 'text';
|
|
37
|
+
ServerCommandPalette.INDEX = 'index';
|
|
38
|
+
})(ServerCommandPalette = exports.ServerCommandPalette || (exports.ServerCommandPalette = {}));
|
|
39
|
+
let ServerCommandPaletteActionProvider = class ServerCommandPaletteActionProvider {
|
|
40
|
+
getActions(_root, text, _lastMousePosition, index) {
|
|
41
|
+
const requestAction = new context_actions_1.RequestContextActions(ServerCommandPalette.CONTEXT_ID, this.editorContext.get({
|
|
42
|
+
[ServerCommandPalette.TEXT]: text,
|
|
43
|
+
[ServerCommandPalette.INDEX]: index ? index : 0
|
|
44
|
+
}));
|
|
45
|
+
return this.actionDispatcher.requestUntil(requestAction).then(response => this.getPaletteActionsFromResponse(response));
|
|
46
|
+
}
|
|
47
|
+
getPaletteActionsFromResponse(action) {
|
|
48
|
+
if (context_actions_1.isSetContextActionsAction(action)) {
|
|
49
|
+
return action.actions;
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
inversify_1.inject(sprotty_1.TYPES.IActionDispatcher),
|
|
56
|
+
__metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
|
|
57
|
+
], ServerCommandPaletteActionProvider.prototype, "actionDispatcher", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
inversify_1.inject(editor_context_1.EditorContextService),
|
|
60
|
+
__metadata("design:type", editor_context_1.EditorContextService)
|
|
61
|
+
], ServerCommandPaletteActionProvider.prototype, "editorContext", void 0);
|
|
62
|
+
ServerCommandPaletteActionProvider = __decorate([
|
|
63
|
+
inversify_1.injectable()
|
|
64
|
+
], ServerCommandPaletteActionProvider);
|
|
65
|
+
exports.ServerCommandPaletteActionProvider = ServerCommandPaletteActionProvider;
|
|
66
|
+
//# sourceMappingURL=server-command-palette-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-command-palette-provider.js","sourceRoot":"","sources":["../../../src/features/command-palette/server-command-palette-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,qCAA4G;AAE5G,oEAAoE;AACpE,wEAAsG;AACtG,8DAAiE;AAEjE,IAAiB,oBAAoB,CAIpC;AAJD,WAAiB,oBAAoB;IACpB,+BAAU,GAAG,iBAAiB,CAAC;IAC/B,yBAAI,GAAG,MAAM,CAAC;IACd,0BAAK,GAAG,OAAO,CAAC;AACjC,CAAC,EAJgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAIpC;AAGD,IAAa,kCAAkC,GAA/C,MAAa,kCAAkC;IAI3C,UAAU,CAAC,KAA8B,EAAE,IAAY,EAAE,kBAA0B,EAAE,KAAc;QAC/F,MAAM,aAAa,GAAG,IAAI,uCAAqB,CAAC,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;YACpG,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,IAAI;YACjC,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClD,CAAC,CAAC,CAAC;QACJ,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5H,CAAC;IAED,6BAA6B,CAAC,MAAc;QACxC,IAAI,2CAAyB,CAAC,MAAM,CAAC,EAAE;YACnC,OAAO,MAAM,CAAC,OAAO,CAAC;SACzB;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAjBoC;IAAhC,kBAAM,CAAC,eAAK,CAAC,iBAAiB,CAAC;8BAA6B,wCAAoB;4EAAC;AACpD;IAA7B,kBAAM,CAAC,qCAAoB,CAAC;8BAA0B,qCAAoB;yEAAC;AAFnE,kCAAkC;IAD9C,sBAAU,EAAE;GACA,kCAAkC,CAkB9C;AAlBY,gFAAkC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IContextMenuItemProvider, MenuItem, Point, SModelRoot } from 'sprotty';
|
|
2
|
+
import { EditorContextService, EditorContextServiceProvider } from '../../base/editor-context';
|
|
3
|
+
export declare class DeleteElementContextMenuItemProvider implements IContextMenuItemProvider {
|
|
4
|
+
editorContextServiceProvider: EditorContextServiceProvider;
|
|
5
|
+
getItems(_root: Readonly<SModelRoot>, _lastMousePosition?: Point): Promise<MenuItem[]>;
|
|
6
|
+
protected createDeleteMenuItem(editorContextService: EditorContextService): MenuItem;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=delete-element-context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-element-context-menu.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/delete-element-context-menu.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAI/F,qBACa,oCAAqC,YAAW,wBAAwB;IAC/B,4BAA4B,EAAE,4BAA4B,CAAC;IAEvG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAK5F,SAAS,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,QAAQ;CAUvF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeleteElementContextMenuItemProvider = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2020 EclipseSource and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const operation_1 = require("../../base/operations/operation");
|
|
30
|
+
const types_1 = require("../../base/types");
|
|
31
|
+
let DeleteElementContextMenuItemProvider = class DeleteElementContextMenuItemProvider {
|
|
32
|
+
async getItems(_root, _lastMousePosition) {
|
|
33
|
+
const editorContextService = await this.editorContextServiceProvider();
|
|
34
|
+
return [this.createDeleteMenuItem(editorContextService)];
|
|
35
|
+
}
|
|
36
|
+
createDeleteMenuItem(editorContextService) {
|
|
37
|
+
return {
|
|
38
|
+
id: 'delete',
|
|
39
|
+
label: 'Delete',
|
|
40
|
+
sortString: 'd',
|
|
41
|
+
group: 'edit',
|
|
42
|
+
actions: [new operation_1.DeleteElementOperation(editorContextService.selectedElements.map(e => e.id))],
|
|
43
|
+
isEnabled: () => !editorContextService.isReadonly && editorContextService.selectedElements.length > 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
__decorate([
|
|
48
|
+
inversify_1.inject(types_1.GLSP_TYPES.IEditorContextServiceProvider),
|
|
49
|
+
__metadata("design:type", Function)
|
|
50
|
+
], DeleteElementContextMenuItemProvider.prototype, "editorContextServiceProvider", void 0);
|
|
51
|
+
DeleteElementContextMenuItemProvider = __decorate([
|
|
52
|
+
inversify_1.injectable()
|
|
53
|
+
], DeleteElementContextMenuItemProvider);
|
|
54
|
+
exports.DeleteElementContextMenuItemProvider = DeleteElementContextMenuItemProvider;
|
|
55
|
+
//# sourceMappingURL=delete-element-context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-element-context-menu.js","sourceRoot":"","sources":["../../../src/features/context-menu/delete-element-context-menu.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAI/C,+DAAyE;AACzE,4CAA8C;AAG9C,IAAa,oCAAoC,GAAjD,MAAa,oCAAoC;IAG7C,KAAK,CAAC,QAAQ,CAAC,KAA2B,EAAE,kBAA0B;QAClE,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,4BAA4B,EAAE,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAES,oBAAoB,CAAC,oBAA0C;QACrE,OAAO;YACH,EAAE,EAAE,QAAQ;YACZ,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE,GAAG;YACf,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,IAAI,kCAAsB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3F,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,oBAAoB,CAAC,UAAU,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC;SACxG,CAAC;IACN,CAAC;CACJ,CAAA;AAjBqD;IAAjD,kBAAM,CAAC,kBAAU,CAAC,6BAA6B,CAAC;;0FAA4D;AADpG,oCAAoC;IADhD,sBAAU,EAAE;GACA,oCAAoC,CAkBhD;AAlBY,oFAAoC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019 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 glspContextMenuModule: ContainerModule;
|
|
18
|
+
export default glspContextMenuModule;
|
|
19
|
+
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,QAAA,MAAM,qBAAqB,iBAWzB,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/********************************************************************************
|
|
4
|
+
* Copyright (c) 2019 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
|
+
const inversify_1 = require("inversify");
|
|
19
|
+
const sprotty_1 = require("sprotty");
|
|
20
|
+
const selection_service_aware_context_menu_mouse_listener_1 = require("./selection-service-aware-context-menu-mouse-listener");
|
|
21
|
+
const server_context_menu_provider_1 = require("./server-context-menu-provider");
|
|
22
|
+
const glspContextMenuModule = new inversify_1.ContainerModule(bind => {
|
|
23
|
+
bind(sprotty_1.TYPES.IContextMenuServiceProvider).toProvider(ctx => () => new Promise((resolve, reject) => {
|
|
24
|
+
if (ctx.container.isBound(sprotty_1.TYPES.IContextMenuService)) {
|
|
25
|
+
resolve(ctx.container.get(sprotty_1.TYPES.IContextMenuService));
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
reject();
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
bind(sprotty_1.TYPES.MouseListener).to(selection_service_aware_context_menu_mouse_listener_1.SelectionServiceAwareContextMenuMouseListener);
|
|
32
|
+
bind(sprotty_1.TYPES.IContextMenuProviderRegistry).to(sprotty_1.ContextMenuProviderRegistry);
|
|
33
|
+
bind(sprotty_1.TYPES.IContextMenuItemProvider).to(server_context_menu_provider_1.ServerContextMenuItemProvider);
|
|
34
|
+
});
|
|
35
|
+
exports.default = glspContextMenuModule;
|
|
36
|
+
//# sourceMappingURL=di.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/context-menu/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA4C;AAC5C,qCAAkF;AAElF,+HAAsH;AACtH,iFAA+E;AAE/E,MAAM,qBAAqB,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACrD,IAAI,CAAC,eAAK,CAAC,2BAA2B,CAAC,CAAC,UAAU,CAAsB,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,OAAO,CAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtI,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,eAAK,CAAC,mBAAmB,CAAC,EAAE;YAClD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAsB,eAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;SAC9E;aAAM;YACH,MAAM,EAAE,CAAC;SACZ;IACL,CAAC,CAAC,CAAC,CAAC;IACJ,IAAI,CAAC,eAAK,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,mGAA6C,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAK,CAAC,4BAA4B,CAAC,CAAC,EAAE,CAAC,qCAA2B,CAAC,CAAC;IACzE,IAAI,CAAC,eAAK,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,4DAA6B,CAAC,CAAC;AAC3E,CAAC,CAAC,CAAC;AAEH,kBAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action, ContextMenuProviderRegistry, IContextMenuServiceProvider, MouseListener, SModelElement } from 'sprotty';
|
|
2
|
+
import { SelectionService } from '../select/selection-service';
|
|
3
|
+
export declare class SelectionServiceAwareContextMenuMouseListener extends MouseListener {
|
|
4
|
+
protected readonly contextMenuService: IContextMenuServiceProvider;
|
|
5
|
+
protected readonly menuProvider: ContextMenuProviderRegistry;
|
|
6
|
+
protected selectionService: SelectionService;
|
|
7
|
+
mouseDown(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[];
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=selection-service-aware-context-menu-mouse-listener.d.ts.map
|
package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,2BAA2B,EAE3B,2BAA2B,EAE3B,aAAa,EACb,aAAa,EAEhB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBACa,6CAA8C,SAAQ,aAAa;IACrB,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;IAClE,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAC;IAChF,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAElF,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;CAapF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SelectionServiceAwareContextMenuMouseListener = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2019 EclipseSource and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const sprotty_1 = require("sprotty");
|
|
30
|
+
const types_1 = require("../../base/types");
|
|
31
|
+
const selection_service_1 = require("../select/selection-service");
|
|
32
|
+
let SelectionServiceAwareContextMenuMouseListener = class SelectionServiceAwareContextMenuMouseListener extends sprotty_1.MouseListener {
|
|
33
|
+
mouseDown(target, event) {
|
|
34
|
+
if (event.button === 2 && this.contextMenuService && this.menuProvider) {
|
|
35
|
+
const mousePosition = { x: event.x, y: event.y };
|
|
36
|
+
const selectableTarget = sprotty_1.findParentByFeature(target, sprotty_1.isSelectable);
|
|
37
|
+
if (selectableTarget) {
|
|
38
|
+
selectableTarget.selected = true;
|
|
39
|
+
this.selectionService.updateSelection(target.root, [selectableTarget.id], []);
|
|
40
|
+
}
|
|
41
|
+
Promise.all([this.contextMenuService(), this.menuProvider.getItems(target.root, mousePosition)])
|
|
42
|
+
.then(([menuService, menuItems]) => menuService.show(menuItems, mousePosition));
|
|
43
|
+
}
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
__decorate([
|
|
48
|
+
inversify_1.inject(sprotty_1.TYPES.IContextMenuServiceProvider),
|
|
49
|
+
inversify_1.optional(),
|
|
50
|
+
__metadata("design:type", Function)
|
|
51
|
+
], SelectionServiceAwareContextMenuMouseListener.prototype, "contextMenuService", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
inversify_1.inject(sprotty_1.TYPES.IContextMenuProviderRegistry),
|
|
54
|
+
inversify_1.optional(),
|
|
55
|
+
__metadata("design:type", sprotty_1.ContextMenuProviderRegistry)
|
|
56
|
+
], SelectionServiceAwareContextMenuMouseListener.prototype, "menuProvider", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
inversify_1.inject(types_1.GLSP_TYPES.SelectionService),
|
|
59
|
+
__metadata("design:type", selection_service_1.SelectionService)
|
|
60
|
+
], SelectionServiceAwareContextMenuMouseListener.prototype, "selectionService", void 0);
|
|
61
|
+
SelectionServiceAwareContextMenuMouseListener = __decorate([
|
|
62
|
+
inversify_1.injectable()
|
|
63
|
+
], SelectionServiceAwareContextMenuMouseListener);
|
|
64
|
+
exports.SelectionServiceAwareContextMenuMouseListener = SelectionServiceAwareContextMenuMouseListener;
|
|
65
|
+
//# sourceMappingURL=selection-service-aware-context-menu-mouse-listener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAyD;AACzD,qCASiB;AAEjB,4CAA8C;AAC9C,mEAA+D;AAG/D,IAAa,6CAA6C,GAA1D,MAAa,6CAA8C,SAAQ,uBAAa;IAK5E,SAAS,CAAC,MAAqB,EAAE,KAAiB;QAC9C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,YAAY,EAAE;YACpE,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;YACjD,MAAM,gBAAgB,GAAG,6BAAmB,CAAC,MAAM,EAAE,sBAAY,CAAC,CAAC;YACnE,IAAI,gBAAgB,EAAE;gBAClB,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACjC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACjF;YACD,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;iBAC3F,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;SACvF;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAjB0D;IAAtD,kBAAM,CAAC,eAAK,CAAC,2BAA2B,CAAC;IAAE,oBAAQ,EAAE;;yFAAoE;AAClE;IAAvD,kBAAM,CAAC,eAAK,CAAC,4BAA4B,CAAC;IAAE,oBAAQ,EAAE;8BAAkC,qCAA2B;mFAAC;AAChF;IAApC,kBAAM,CAAC,kBAAU,CAAC,gBAAgB,CAAC;8BAA6B,oCAAgB;uFAAC;AAHzE,6CAA6C;IADzD,sBAAU,EAAE;GACA,6CAA6C,CAkBzD;AAlBY,sGAA6C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action, IContextMenuItemProvider, LabeledAction, Point, SModelElement } from 'sprotty';
|
|
2
|
+
import { GLSPActionDispatcher } from '../../base/action-dispatcher';
|
|
3
|
+
import { EditorContextService } from '../../base/editor-context';
|
|
4
|
+
export declare namespace ServerContextMenu {
|
|
5
|
+
const CONTEXT_ID = "context-menu";
|
|
6
|
+
}
|
|
7
|
+
export declare class ServerContextMenuItemProvider implements IContextMenuItemProvider {
|
|
8
|
+
protected actionDispatcher: GLSPActionDispatcher;
|
|
9
|
+
protected editorContext: EditorContextService;
|
|
10
|
+
getItems(root: Readonly<SModelElement>, lastMousePosition?: Point): Promise<LabeledAction[]>;
|
|
11
|
+
getContextActionsFromResponse(action: Action): LabeledAction[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=server-context-menu-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-context-menu-provider.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/server-context-menu-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,wBAAwB,EAAc,aAAa,EAAE,KAAK,EAAE,aAAa,EAAS,MAAM,SAAS,CAAC;AAEnH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,UAAU,iBAAiB,CAAC;CAC5C;AAED,qBACa,6BAA8B,YAAW,wBAAwB;IAEzC,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IACpD,SAAS,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAE5E,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAO5F,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE;CAMjE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ServerContextMenuItemProvider = exports.ServerContextMenu = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2019 EclipseSource and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const sprotty_1 = require("sprotty");
|
|
30
|
+
const action_dispatcher_1 = require("../../base/action-dispatcher");
|
|
31
|
+
const context_actions_1 = require("../../base/actions/context-actions");
|
|
32
|
+
const editor_context_1 = require("../../base/editor-context");
|
|
33
|
+
var ServerContextMenu;
|
|
34
|
+
(function (ServerContextMenu) {
|
|
35
|
+
ServerContextMenu.CONTEXT_ID = 'context-menu';
|
|
36
|
+
})(ServerContextMenu = exports.ServerContextMenu || (exports.ServerContextMenu = {}));
|
|
37
|
+
let ServerContextMenuItemProvider = class ServerContextMenuItemProvider {
|
|
38
|
+
getItems(root, lastMousePosition) {
|
|
39
|
+
const selectedElementIds = Array.from(root.index.all().filter(sprotty_1.isSelected).map(e => e.id));
|
|
40
|
+
const context = this.editorContext.getWithSelection(selectedElementIds);
|
|
41
|
+
const requestAction = new context_actions_1.RequestContextActions(ServerContextMenu.CONTEXT_ID, context);
|
|
42
|
+
return this.actionDispatcher.requestUntil(requestAction).then(response => this.getContextActionsFromResponse(response));
|
|
43
|
+
}
|
|
44
|
+
getContextActionsFromResponse(action) {
|
|
45
|
+
if (context_actions_1.isSetContextActionsAction(action)) {
|
|
46
|
+
return action.actions;
|
|
47
|
+
}
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
inversify_1.inject(sprotty_1.TYPES.IActionDispatcher),
|
|
53
|
+
__metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
|
|
54
|
+
], ServerContextMenuItemProvider.prototype, "actionDispatcher", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
inversify_1.inject(editor_context_1.EditorContextService),
|
|
57
|
+
__metadata("design:type", editor_context_1.EditorContextService)
|
|
58
|
+
], ServerContextMenuItemProvider.prototype, "editorContext", void 0);
|
|
59
|
+
ServerContextMenuItemProvider = __decorate([
|
|
60
|
+
inversify_1.injectable()
|
|
61
|
+
], ServerContextMenuItemProvider);
|
|
62
|
+
exports.ServerContextMenuItemProvider = ServerContextMenuItemProvider;
|
|
63
|
+
//# sourceMappingURL=server-context-menu-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-context-menu-provider.js","sourceRoot":"","sources":["../../../src/features/context-menu/server-context-menu-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,qCAAmH;AAEnH,oEAAoE;AACpE,wEAAsG;AACtG,8DAAiE;AAEjE,IAAiB,iBAAiB,CAEjC;AAFD,WAAiB,iBAAiB;IACjB,4BAAU,GAAG,cAAc,CAAC;AAC7C,CAAC,EAFgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAEjC;AAGD,IAAa,6BAA6B,GAA1C,MAAa,6BAA6B;IAKtC,QAAQ,CAAC,IAA6B,EAAE,iBAAyB;QAC7D,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,oBAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,IAAI,uCAAqB,CAAC,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5H,CAAC;IAED,6BAA6B,CAAC,MAAc;QACxC,IAAI,2CAAyB,CAAC,MAAM,CAAC,EAAE;YACnC,OAAO,MAAM,CAAC,OAAO,CAAC;SACzB;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAhBoC;IAAhC,kBAAM,CAAC,eAAK,CAAC,iBAAiB,CAAC;8BAA6B,wCAAoB;uEAAC;AACpD;IAA7B,kBAAM,CAAC,qCAAoB,CAAC;8BAA0B,qCAAoB;oEAAC;AAHnE,6BAA6B;IADzC,sBAAU,EAAE;GACA,6BAA6B,CAkBzC;AAlBY,sEAA6B"}
|