@eclipse-glsp/server 1.1.0-RC05
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 +642 -0
- package/README.md +8 -0
- package/browser.d.ts +16 -0
- package/browser.js +18 -0
- package/lib/browser/di/app-module.d.ts +24 -0
- package/lib/browser/di/app-module.d.ts.map +1 -0
- package/lib/browser/di/app-module.js +55 -0
- package/lib/browser/di/app-module.js.map +1 -0
- package/lib/browser/di/console-logger.d.ts +29 -0
- package/lib/browser/di/console-logger.d.ts.map +1 -0
- package/lib/browser/di/console-logger.js +81 -0
- package/lib/browser/di/console-logger.js.map +1 -0
- package/lib/browser/index.d.ts +20 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +36 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/launch/worker-server-launcher.d.ts +26 -0
- package/lib/browser/launch/worker-server-launcher.d.ts.map +1 -0
- package/lib/browser/launch/worker-server-launcher.js +65 -0
- package/lib/browser/launch/worker-server-launcher.js.map +1 -0
- package/lib/common/actions/action-dispatcher.d.ts +74 -0
- package/lib/common/actions/action-dispatcher.d.ts.map +1 -0
- package/lib/common/actions/action-dispatcher.js +128 -0
- package/lib/common/actions/action-dispatcher.js.map +1 -0
- package/lib/common/actions/action-dispatcher.spec.d.ts +2 -0
- package/lib/common/actions/action-dispatcher.spec.d.ts.map +1 -0
- package/lib/common/actions/action-dispatcher.spec.js +264 -0
- package/lib/common/actions/action-dispatcher.spec.js.map +1 -0
- package/lib/common/actions/action-handler-registry.d.ts +40 -0
- package/lib/common/actions/action-handler-registry.d.ts.map +1 -0
- package/lib/common/actions/action-handler-registry.js +65 -0
- package/lib/common/actions/action-handler-registry.js.map +1 -0
- package/lib/common/actions/action-handler-registry.spec.d.ts +2 -0
- package/lib/common/actions/action-handler-registry.spec.d.ts.map +1 -0
- package/lib/common/actions/action-handler-registry.spec.js +50 -0
- package/lib/common/actions/action-handler-registry.spec.js.map +1 -0
- package/lib/common/actions/action-handler.d.ts +55 -0
- package/lib/common/actions/action-handler.d.ts.map +1 -0
- package/lib/common/actions/action-handler.js +7 -0
- package/lib/common/actions/action-handler.js.map +1 -0
- package/lib/common/actions/client-action-handler.d.ts +30 -0
- package/lib/common/actions/client-action-handler.d.ts.map +1 -0
- package/lib/common/actions/client-action-handler.js +56 -0
- package/lib/common/actions/client-action-handler.js.map +1 -0
- package/lib/common/actions/global-action-provider.d.ts +30 -0
- package/lib/common/actions/global-action-provider.d.ts.map +1 -0
- package/lib/common/actions/global-action-provider.js +81 -0
- package/lib/common/actions/global-action-provider.js.map +1 -0
- package/lib/common/actions/global-action-provider.spec.d.ts +2 -0
- package/lib/common/actions/global-action-provider.spec.d.ts.map +1 -0
- package/lib/common/actions/global-action-provider.spec.js +70 -0
- package/lib/common/actions/global-action-provider.spec.js.map +1 -0
- package/lib/common/command/command-stack.d.ts +67 -0
- package/lib/common/command/command-stack.d.ts.map +1 -0
- package/lib/common/command/command-stack.js +117 -0
- package/lib/common/command/command-stack.js.map +1 -0
- package/lib/common/command/command-stack.spec.d.ts +2 -0
- package/lib/common/command/command-stack.spec.d.ts.map +1 -0
- package/lib/common/command/command-stack.spec.js +207 -0
- package/lib/common/command/command-stack.spec.js.map +1 -0
- package/lib/common/command/command.d.ts +63 -0
- package/lib/common/command/command.d.ts.map +1 -0
- package/lib/common/command/command.js +87 -0
- package/lib/common/command/command.js.map +1 -0
- package/lib/common/command/command.spec.d.ts +2 -0
- package/lib/common/command/command.spec.d.ts.map +1 -0
- package/lib/common/command/command.spec.js +86 -0
- package/lib/common/command/command.spec.js.map +1 -0
- package/lib/common/command/recording-command.d.ts +75 -0
- package/lib/common/command/recording-command.d.ts.map +1 -0
- package/lib/common/command/recording-command.js +99 -0
- package/lib/common/command/recording-command.js.map +1 -0
- package/lib/common/command/recording-command.spec.d.ts +17 -0
- package/lib/common/command/recording-command.spec.d.ts.map +1 -0
- package/lib/common/command/recording-command.spec.js +62 -0
- package/lib/common/command/recording-command.spec.js.map +1 -0
- package/lib/common/command/undo-redo-action-handler.d.ts +28 -0
- package/lib/common/command/undo-redo-action-handler.d.ts.map +1 -0
- package/lib/common/command/undo-redo-action-handler.js +72 -0
- package/lib/common/command/undo-redo-action-handler.js.map +1 -0
- package/lib/common/di/binding-target.d.ts +73 -0
- package/lib/common/di/binding-target.d.ts.map +1 -0
- package/lib/common/di/binding-target.js +143 -0
- package/lib/common/di/binding-target.js.map +1 -0
- package/lib/common/di/binding-target.spec.d.ts +2 -0
- package/lib/common/di/binding-target.spec.d.ts.map +1 -0
- package/lib/common/di/binding-target.spec.js +121 -0
- package/lib/common/di/binding-target.spec.js.map +1 -0
- package/lib/common/di/client-session-module.d.ts +19 -0
- package/lib/common/di/client-session-module.d.ts.map +1 -0
- package/lib/common/di/client-session-module.js +34 -0
- package/lib/common/di/client-session-module.js.map +1 -0
- package/lib/common/di/diagram-module.d.ts +130 -0
- package/lib/common/di/diagram-module.d.ts.map +1 -0
- package/lib/common/di/diagram-module.js +295 -0
- package/lib/common/di/diagram-module.js.map +1 -0
- package/lib/common/di/glsp-module.d.ts +47 -0
- package/lib/common/di/glsp-module.d.ts.map +1 -0
- package/lib/common/di/glsp-module.js +59 -0
- package/lib/common/di/glsp-module.js.map +1 -0
- package/lib/common/di/multi-binding.d.ts +41 -0
- package/lib/common/di/multi-binding.d.ts.map +1 -0
- package/lib/common/di/multi-binding.js +82 -0
- package/lib/common/di/multi-binding.js.map +1 -0
- package/lib/common/di/multi-bindings.spec.d.ts +2 -0
- package/lib/common/di/multi-bindings.spec.d.ts.map +1 -0
- package/lib/common/di/multi-bindings.spec.js +137 -0
- package/lib/common/di/multi-bindings.spec.js.map +1 -0
- package/lib/common/di/server-module.d.ts +73 -0
- package/lib/common/di/server-module.d.ts.map +1 -0
- package/lib/common/di/server-module.js +103 -0
- package/lib/common/di/server-module.js.map +1 -0
- package/lib/common/di/service-identifiers.d.ts +29 -0
- package/lib/common/di/service-identifiers.d.ts.map +1 -0
- package/lib/common/di/service-identifiers.js +14 -0
- package/lib/common/di/service-identifiers.js.map +1 -0
- package/lib/common/diagram/diagram-configuration.d.ts +89 -0
- package/lib/common/diagram/diagram-configuration.d.ts.map +1 -0
- package/lib/common/diagram/diagram-configuration.js +30 -0
- package/lib/common/diagram/diagram-configuration.js.map +1 -0
- package/lib/common/diagram/request-type-hints-action-handler.d.ts +25 -0
- package/lib/common/diagram/request-type-hints-action-handler.d.ts.map +1 -0
- package/lib/common/diagram/request-type-hints-action-handler.js +53 -0
- package/lib/common/diagram/request-type-hints-action-handler.js.map +1 -0
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +2 -0
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +1 -0
- package/lib/common/diagram/request-type-hints-action-handler.spec.js +57 -0
- package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +1 -0
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.d.ts +26 -0
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.d.ts.map +1 -0
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +61 -0
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -0
- package/lib/common/features/contextactions/command-palette-action-provider.d.ts +63 -0
- package/lib/common/features/contextactions/command-palette-action-provider.d.ts.map +1 -0
- package/lib/common/features/contextactions/command-palette-action-provider.js +72 -0
- package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.d.ts +12 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.d.ts.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.js +70 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +2 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +34 -0
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider.d.ts +34 -0
- package/lib/common/features/contextactions/context-actions-provider.d.ts.map +1 -0
- package/lib/common/features/contextactions/context-actions-provider.js +5 -0
- package/lib/common/features/contextactions/context-actions-provider.js.map +1 -0
- package/lib/common/features/contextactions/context-menu-item-provider.d.ts +43 -0
- package/lib/common/features/contextactions/context-menu-item-provider.d.ts.map +1 -0
- package/lib/common/features/contextactions/context-menu-item-provider.js +36 -0
- package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -0
- package/lib/common/features/contextactions/request-context-actions-handler.d.ts +24 -0
- package/lib/common/features/contextactions/request-context-actions-handler.d.ts.map +1 -0
- package/lib/common/features/contextactions/request-context-actions-handler.js +53 -0
- package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -0
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +2 -0
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +1 -0
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js +63 -0
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +1 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts +50 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts.map +1 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.js +86 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +2 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +1 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +48 -0
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +1 -0
- package/lib/common/features/directediting/context-edit-validator-registry.d.ts +14 -0
- package/lib/common/features/directediting/context-edit-validator-registry.d.ts.map +1 -0
- package/lib/common/features/directediting/context-edit-validator-registry.js +57 -0
- package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -0
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +2 -0
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +1 -0
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js +44 -0
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +1 -0
- package/lib/common/features/directediting/context-edit-validator.d.ts +25 -0
- package/lib/common/features/directediting/context-edit-validator.d.ts.map +1 -0
- package/lib/common/features/directediting/context-edit-validator.js +40 -0
- package/lib/common/features/directediting/context-edit-validator.js.map +1 -0
- package/lib/common/features/directediting/label-edit-validator.d.ts +32 -0
- package/lib/common/features/directediting/label-edit-validator.d.ts.map +1 -0
- package/lib/common/features/directediting/label-edit-validator.js +21 -0
- package/lib/common/features/directediting/label-edit-validator.js.map +1 -0
- package/lib/common/features/directediting/request-edit-validation-handler.d.ts +26 -0
- package/lib/common/features/directediting/request-edit-validation-handler.d.ts.map +1 -0
- package/lib/common/features/directediting/request-edit-validation-handler.js +61 -0
- package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -0
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +2 -0
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +1 -0
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js +97 -0
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +1 -0
- package/lib/common/features/layout/computed-bounds-action-handler.d.ts +34 -0
- package/lib/common/features/layout/computed-bounds-action-handler.d.ts.map +1 -0
- package/lib/common/features/layout/computed-bounds-action-handler.js +55 -0
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -0
- package/lib/common/features/layout/layout-engine.d.ts +29 -0
- package/lib/common/features/layout/layout-engine.d.ts.map +1 -0
- package/lib/common/features/layout/layout-engine.js +20 -0
- package/lib/common/features/layout/layout-engine.js.map +1 -0
- package/lib/common/features/layout/layout-operation-handler.d.ts +37 -0
- package/lib/common/features/layout/layout-operation-handler.d.ts.map +1 -0
- package/lib/common/features/layout/layout-operation-handler.js +82 -0
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -0
- package/lib/common/features/model/gmodel-factory.d.ts +39 -0
- package/lib/common/features/model/gmodel-factory.d.ts.map +1 -0
- package/lib/common/features/model/gmodel-factory.js +39 -0
- package/lib/common/features/model/gmodel-factory.js.map +1 -0
- package/lib/common/features/model/gmodel-index.d.ts +107 -0
- package/lib/common/features/model/gmodel-index.d.ts.map +1 -0
- package/lib/common/features/model/gmodel-index.js +193 -0
- package/lib/common/features/model/gmodel-index.js.map +1 -0
- package/lib/common/features/model/gmodel-serializer.d.ts +67 -0
- package/lib/common/features/model/gmodel-serializer.d.ts.map +1 -0
- package/lib/common/features/model/gmodel-serializer.js +143 -0
- package/lib/common/features/model/gmodel-serializer.js.map +1 -0
- package/lib/common/features/model/gmodel-serializer.spec.d.ts +2 -0
- package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +1 -0
- package/lib/common/features/model/gmodel-serializer.spec.js +124 -0
- package/lib/common/features/model/gmodel-serializer.spec.js.map +1 -0
- package/lib/common/features/model/model-state.d.ts +51 -0
- package/lib/common/features/model/model-state.d.ts.map +1 -0
- package/lib/common/features/model/model-state.js +74 -0
- package/lib/common/features/model/model-state.js.map +1 -0
- package/lib/common/features/model/model-submission-handler.d.ts +58 -0
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -0
- package/lib/common/features/model/model-submission-handler.js +102 -0
- package/lib/common/features/model/model-submission-handler.js.map +1 -0
- package/lib/common/features/model/request-model-action-handler.d.ts +37 -0
- package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -0
- package/lib/common/features/model/request-model-action-handler.js +83 -0
- package/lib/common/features/model/request-model-action-handler.js.map +1 -0
- package/lib/common/features/model/save-model-action-handler.d.ts +26 -0
- package/lib/common/features/model/save-model-action-handler.d.ts.map +1 -0
- package/lib/common/features/model/save-model-action-handler.js +54 -0
- package/lib/common/features/model/save-model-action-handler.js.map +1 -0
- package/lib/common/features/model/source-model-storage.d.ts +47 -0
- package/lib/common/features/model/source-model-storage.d.ts.map +1 -0
- package/lib/common/features/model/source-model-storage.js +5 -0
- package/lib/common/features/model/source-model-storage.js.map +1 -0
- package/lib/common/features/navigation/json-opener-options.d.ts +36 -0
- package/lib/common/features/navigation/json-opener-options.d.ts.map +1 -0
- package/lib/common/features/navigation/json-opener-options.js +60 -0
- package/lib/common/features/navigation/json-opener-options.js.map +1 -0
- package/lib/common/features/navigation/navigation-target-provider-registry.d.ts +12 -0
- package/lib/common/features/navigation/navigation-target-provider-registry.d.ts.map +1 -0
- package/lib/common/features/navigation/navigation-target-provider-registry.js +47 -0
- package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -0
- package/lib/common/features/navigation/navigation-target-provider.d.ts +48 -0
- package/lib/common/features/navigation/navigation-target-provider.d.ts.map +1 -0
- package/lib/common/features/navigation/navigation-target-provider.js +5 -0
- package/lib/common/features/navigation/navigation-target-provider.js.map +1 -0
- package/lib/common/features/navigation/navigation-target-resolution.d.ts +23 -0
- package/lib/common/features/navigation/navigation-target-resolution.d.ts.map +1 -0
- package/lib/common/features/navigation/navigation-target-resolution.js +12 -0
- package/lib/common/features/navigation/navigation-target-resolution.js.map +1 -0
- package/lib/common/features/navigation/navigation-target-resolver.d.ts +31 -0
- package/lib/common/features/navigation/navigation-target-resolver.d.ts.map +1 -0
- package/lib/common/features/navigation/navigation-target-resolver.js +49 -0
- package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -0
- package/lib/common/features/navigation/request-navigation-targets-action-handler.d.ts +24 -0
- package/lib/common/features/navigation/request-navigation-targets-action-handler.d.ts.map +1 -0
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js +55 -0
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -0
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.d.ts +26 -0
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.d.ts.map +1 -0
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +59 -0
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -0
- package/lib/common/features/popup/popup-model-factory.d.ts +36 -0
- package/lib/common/features/popup/popup-model-factory.d.ts.map +1 -0
- package/lib/common/features/popup/popup-model-factory.js +20 -0
- package/lib/common/features/popup/popup-model-factory.js.map +1 -0
- package/lib/common/features/popup/request-popup-model-action-handler.d.ts +31 -0
- package/lib/common/features/popup/request-popup-model-action-handler.d.ts.map +1 -0
- package/lib/common/features/popup/request-popup-model-action-handler.js +77 -0
- package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -0
- package/lib/common/features/validation/model-validator.d.ts +33 -0
- package/lib/common/features/validation/model-validator.d.ts.map +1 -0
- package/lib/common/features/validation/model-validator.js +5 -0
- package/lib/common/features/validation/model-validator.js.map +1 -0
- package/lib/common/features/validation/request-markers-handler.d.ts +11 -0
- package/lib/common/features/validation/request-markers-handler.d.ts.map +1 -0
- package/lib/common/features/validation/request-markers-handler.js +70 -0
- package/lib/common/features/validation/request-markers-handler.js.map +1 -0
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts +8 -0
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +46 -0
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -0
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts +13 -0
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/change-bounds-operation-handler.js +71 -0
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -0
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts +24 -0
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/change-routing-points-operation-handler.js +50 -0
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -0
- package/lib/common/gmodel/cut-operation-handler.d.ts +26 -0
- package/lib/common/gmodel/cut-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/cut-operation-handler.js +55 -0
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -0
- package/lib/common/gmodel/delete-operation-handler.d.ts +32 -0
- package/lib/common/gmodel/delete-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/delete-operation-handler.js +119 -0
- package/lib/common/gmodel/delete-operation-handler.js.map +1 -0
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts +35 -0
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +64 -0
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -0
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts +58 -0
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js +100 -0
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -0
- package/lib/common/gmodel/gmodel-diagram-module.d.ts +31 -0
- package/lib/common/gmodel/gmodel-diagram-module.d.ts.map +1 -0
- package/lib/common/gmodel/gmodel-diagram-module.js +80 -0
- package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -0
- package/lib/common/gmodel/gmodel-operation-handler.d.ts +23 -0
- package/lib/common/gmodel/gmodel-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/gmodel-operation-handler.js +43 -0
- package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -0
- package/lib/common/gmodel/index.d.ts +27 -0
- package/lib/common/gmodel/index.d.ts.map +1 -0
- package/lib/common/gmodel/index.js +43 -0
- package/lib/common/gmodel/index.js.map +1 -0
- package/lib/common/gmodel/paste-operation-handler.d.ts +36 -0
- package/lib/common/gmodel/paste-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/paste-operation-handler.js +136 -0
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -0
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts +9 -0
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +64 -0
- package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -0
- package/lib/common/index.d.ts +89 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +105 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/launch/glsp-server-launcher.d.ts +34 -0
- package/lib/common/launch/glsp-server-launcher.d.ts.map +1 -0
- package/lib/common/launch/glsp-server-launcher.js +64 -0
- package/lib/common/launch/glsp-server-launcher.js.map +1 -0
- package/lib/common/operations/compound-operation-handler.d.ts +25 -0
- package/lib/common/operations/compound-operation-handler.d.ts.map +1 -0
- package/lib/common/operations/compound-operation-handler.js +82 -0
- package/lib/common/operations/compound-operation-handler.js.map +1 -0
- package/lib/common/operations/create-operation-handler.d.ts +32 -0
- package/lib/common/operations/create-operation-handler.d.ts.map +1 -0
- package/lib/common/operations/create-operation-handler.js +31 -0
- package/lib/common/operations/create-operation-handler.js.map +1 -0
- package/lib/common/operations/operation-action-handler.d.ts +42 -0
- package/lib/common/operations/operation-action-handler.d.ts.map +1 -0
- package/lib/common/operations/operation-action-handler.js +109 -0
- package/lib/common/operations/operation-action-handler.js.map +1 -0
- package/lib/common/operations/operation-handler-registry.d.ts +38 -0
- package/lib/common/operations/operation-handler-registry.d.ts.map +1 -0
- package/lib/common/operations/operation-handler-registry.js +87 -0
- package/lib/common/operations/operation-handler-registry.js.map +1 -0
- package/lib/common/operations/operation-handler-registry.spec.d.ts +2 -0
- package/lib/common/operations/operation-handler-registry.spec.d.ts.map +1 -0
- package/lib/common/operations/operation-handler-registry.spec.js +50 -0
- package/lib/common/operations/operation-handler-registry.spec.js.map +1 -0
- package/lib/common/operations/operation-handler.d.ts +67 -0
- package/lib/common/operations/operation-handler.d.ts.map +1 -0
- package/lib/common/operations/operation-handler.js +56 -0
- package/lib/common/operations/operation-handler.js.map +1 -0
- package/lib/common/protocol/glsp-client-proxy.d.ts +45 -0
- package/lib/common/protocol/glsp-client-proxy.d.ts.map +1 -0
- package/lib/common/protocol/glsp-client-proxy.js +53 -0
- package/lib/common/protocol/glsp-client-proxy.js.map +1 -0
- package/lib/common/protocol/glsp-server-listener.d.ts +37 -0
- package/lib/common/protocol/glsp-server-listener.d.ts.map +1 -0
- package/lib/common/protocol/glsp-server-listener.js +5 -0
- package/lib/common/protocol/glsp-server-listener.js.map +1 -0
- package/lib/common/protocol/glsp-server.d.ts +150 -0
- package/lib/common/protocol/glsp-server.d.ts.map +1 -0
- package/lib/common/protocol/glsp-server.js +188 -0
- package/lib/common/protocol/glsp-server.js.map +1 -0
- package/lib/common/protocol/glsp-server.spec.d.ts +2 -0
- package/lib/common/protocol/glsp-server.spec.d.ts.map +1 -0
- package/lib/common/protocol/glsp-server.spec.js +119 -0
- package/lib/common/protocol/glsp-server.spec.js.map +1 -0
- package/lib/common/session/client-session-factory.d.ts +42 -0
- package/lib/common/session/client-session-factory.d.ts.map +1 -0
- package/lib/common/session/client-session-factory.js +54 -0
- package/lib/common/session/client-session-factory.js.map +1 -0
- package/lib/common/session/client-session-factory.spec.d.ts +2 -0
- package/lib/common/session/client-session-factory.spec.d.ts.map +1 -0
- package/lib/common/session/client-session-factory.spec.js +56 -0
- package/lib/common/session/client-session-factory.spec.js.map +1 -0
- package/lib/common/session/client-session-initializer.d.ts +26 -0
- package/lib/common/session/client-session-initializer.d.ts.map +1 -0
- package/lib/common/session/client-session-initializer.js +5 -0
- package/lib/common/session/client-session-initializer.js.map +1 -0
- package/lib/common/session/client-session-listener.d.ts +40 -0
- package/lib/common/session/client-session-listener.d.ts.map +1 -0
- package/lib/common/session/client-session-listener.js +3 -0
- package/lib/common/session/client-session-listener.js.map +1 -0
- package/lib/common/session/client-session-manager.d.ts +102 -0
- package/lib/common/session/client-session-manager.d.ts.map +1 -0
- package/lib/common/session/client-session-manager.js +116 -0
- package/lib/common/session/client-session-manager.js.map +1 -0
- package/lib/common/session/client-session-manager.spec.d.ts +2 -0
- package/lib/common/session/client-session-manager.spec.d.ts.map +1 -0
- package/lib/common/session/client-session-manager.spec.js +74 -0
- package/lib/common/session/client-session-manager.spec.js.map +1 -0
- package/lib/common/session/client-session.d.ts +52 -0
- package/lib/common/session/client-session.d.ts.map +1 -0
- package/lib/common/session/client-session.js +34 -0
- package/lib/common/session/client-session.js.map +1 -0
- package/lib/common/test/mock-util.d.ts +117 -0
- package/lib/common/test/mock-util.d.ts.map +1 -0
- package/lib/common/test/mock-util.js +194 -0
- package/lib/common/test/mock-util.js.map +1 -0
- package/lib/common/utils/args-util.d.ts +38 -0
- package/lib/common/utils/args-util.d.ts.map +1 -0
- package/lib/common/utils/args-util.js +81 -0
- package/lib/common/utils/args-util.js.map +1 -0
- package/lib/common/utils/client-options-util.d.ts +20 -0
- package/lib/common/utils/client-options-util.d.ts.map +1 -0
- package/lib/common/utils/client-options-util.js +26 -0
- package/lib/common/utils/client-options-util.js.map +1 -0
- package/lib/common/utils/glsp-server-error.d.ts +21 -0
- package/lib/common/utils/glsp-server-error.d.ts.map +1 -0
- package/lib/common/utils/glsp-server-error.js +33 -0
- package/lib/common/utils/glsp-server-error.js.map +1 -0
- package/lib/common/utils/layout-util.d.ts +74 -0
- package/lib/common/utils/layout-util.d.ts.map +1 -0
- package/lib/common/utils/layout-util.js +166 -0
- package/lib/common/utils/layout-util.js.map +1 -0
- package/lib/common/utils/logger.d.ts +27 -0
- package/lib/common/utils/logger.d.ts.map +1 -0
- package/lib/common/utils/logger.js +67 -0
- package/lib/common/utils/logger.js.map +1 -0
- package/lib/common/utils/promise-queue.d.ts +48 -0
- package/lib/common/utils/promise-queue.d.ts.map +1 -0
- package/lib/common/utils/promise-queue.js +93 -0
- package/lib/common/utils/promise-queue.js.map +1 -0
- package/lib/common/utils/promise-queue.spec.d.ts +2 -0
- package/lib/common/utils/promise-queue.spec.d.ts.map +1 -0
- package/lib/common/utils/promise-queue.spec.js +117 -0
- package/lib/common/utils/promise-queue.spec.js.map +1 -0
- package/lib/common/utils/registry.d.ts +73 -0
- package/lib/common/utils/registry.d.ts.map +1 -0
- package/lib/common/utils/registry.js +160 -0
- package/lib/common/utils/registry.js.map +1 -0
- package/lib/common/utils/registry.spec.d.ts +2 -0
- package/lib/common/utils/registry.spec.d.ts.map +1 -0
- package/lib/common/utils/registry.spec.js +199 -0
- package/lib/common/utils/registry.spec.js.map +1 -0
- package/lib/node/abstract-json-model-storage.d.ts +45 -0
- package/lib/node/abstract-json-model-storage.d.ts.map +1 -0
- package/lib/node/abstract-json-model-storage.js +103 -0
- package/lib/node/abstract-json-model-storage.js.map +1 -0
- package/lib/node/di/app-module.d.ts +36 -0
- package/lib/node/di/app-module.d.ts.map +1 -0
- package/lib/node/di/app-module.js +91 -0
- package/lib/node/di/app-module.js.map +1 -0
- package/lib/node/di/winston-logger.d.ts +32 -0
- package/lib/node/di/winston-logger.d.ts.map +1 -0
- package/lib/node/di/winston-logger.js +57 -0
- package/lib/node/di/winston-logger.js.map +1 -0
- package/lib/node/gmodel/gmodel-storage.d.ts +34 -0
- package/lib/node/gmodel/gmodel-storage.d.ts.map +1 -0
- package/lib/node/gmodel/gmodel-storage.js +68 -0
- package/lib/node/gmodel/gmodel-storage.js.map +1 -0
- package/lib/node/index.d.ts +24 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +40 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/launch/cli-parser.d.ts +34 -0
- package/lib/node/launch/cli-parser.d.ts.map +1 -0
- package/lib/node/launch/cli-parser.js +71 -0
- package/lib/node/launch/cli-parser.js.map +1 -0
- package/lib/node/launch/cli-parser.spec.d.ts +2 -0
- package/lib/node/launch/cli-parser.spec.d.ts.map +1 -0
- package/lib/node/launch/cli-parser.spec.js +56 -0
- package/lib/node/launch/cli-parser.spec.js.map +1 -0
- package/lib/node/launch/socket-cli-parser.d.ts +9 -0
- package/lib/node/launch/socket-cli-parser.d.ts.map +1 -0
- package/lib/node/launch/socket-cli-parser.js +43 -0
- package/lib/node/launch/socket-cli-parser.js.map +1 -0
- package/lib/node/launch/socket-cli-parser.spec.d.ts +2 -0
- package/lib/node/launch/socket-cli-parser.spec.d.ts.map +1 -0
- package/lib/node/launch/socket-cli-parser.spec.js +66 -0
- package/lib/node/launch/socket-cli-parser.spec.js.map +1 -0
- package/lib/node/launch/socket-server-launcher.d.ts +34 -0
- package/lib/node/launch/socket-server-launcher.d.ts.map +1 -0
- package/lib/node/launch/socket-server-launcher.js +104 -0
- package/lib/node/launch/socket-server-launcher.js.map +1 -0
- package/lib/node/launch/socket-server-launcher.spec.d.ts +17 -0
- package/lib/node/launch/socket-server-launcher.spec.d.ts.map +1 -0
- package/lib/node/launch/socket-server-launcher.spec.js +70 -0
- package/lib/node/launch/socket-server-launcher.spec.js.map +1 -0
- package/node.d.ts +16 -0
- package/node.js +18 -0
- package/package.json +77 -0
- package/src/browser/di/app-module.ts +55 -0
- package/src/browser/di/console-logger.ts +71 -0
- package/src/browser/index.ts +19 -0
- package/src/browser/launch/worker-server-launcher.ts +58 -0
- package/src/common/actions/action-dispatcher.spec.ts +290 -0
- package/src/common/actions/action-dispatcher.ts +152 -0
- package/src/common/actions/action-handler-registry.spec.ts +52 -0
- package/src/common/actions/action-handler-registry.ts +60 -0
- package/src/common/actions/action-handler.ts +62 -0
- package/src/common/actions/client-action-handler.ts +50 -0
- package/src/common/actions/global-action-provider.spec.ts +79 -0
- package/src/common/actions/global-action-provider.ts +72 -0
- package/src/common/command/command-stack.spec.ts +239 -0
- package/src/common/command/command-stack.ts +159 -0
- package/src/common/command/command.spec.ts +93 -0
- package/src/common/command/command.ts +124 -0
- package/src/common/command/recording-command.spec.ts +74 -0
- package/src/common/command/recording-command.ts +119 -0
- package/src/common/command/undo-redo-action-handler.ts +57 -0
- package/src/common/di/binding-target.spec.ts +147 -0
- package/src/common/di/binding-target.ts +188 -0
- package/src/common/di/client-session-module.ts +29 -0
- package/src/common/di/diagram-module.ts +410 -0
- package/src/common/di/glsp-module.ts +66 -0
- package/src/common/di/multi-binding.ts +89 -0
- package/src/common/di/multi-bindings.spec.ts +133 -0
- package/src/common/di/server-module.ts +131 -0
- package/src/common/di/service-identifiers.ts +39 -0
- package/src/common/diagram/diagram-configuration.ts +97 -0
- package/src/common/diagram/request-type-hints-action-handler.spec.ts +59 -0
- package/src/common/diagram/request-type-hints-action-handler.ts +36 -0
- package/src/common/features/clipboard/request-clipboard-data-action-handler.ts +51 -0
- package/src/common/features/contextactions/command-palette-action-provider.ts +94 -0
- package/src/common/features/contextactions/context-actions-provider-registry.spec.ts +69 -0
- package/src/common/features/contextactions/context-actions-provider-registry.ts +47 -0
- package/src/common/features/contextactions/context-actions-provider.ts +36 -0
- package/src/common/features/contextactions/context-menu-item-provider.ts +52 -0
- package/src/common/features/contextactions/request-context-actions-handler.spec.ts +75 -0
- package/src/common/features/contextactions/request-context-actions-handler.ts +37 -0
- package/src/common/features/contextactions/tool-palette-item-provider.spec.ts +46 -0
- package/src/common/features/contextactions/tool-palette-item-provider.ts +88 -0
- package/src/common/features/directediting/context-edit-validator-registry.spec.ts +54 -0
- package/src/common/features/directediting/context-edit-validator-registry.ts +43 -0
- package/src/common/features/directediting/context-edit-validator.ts +55 -0
- package/src/common/features/directediting/label-edit-validator.ts +35 -0
- package/src/common/features/directediting/request-edit-validation-handler.spec.ts +131 -0
- package/src/common/features/directediting/request-edit-validation-handler.ts +43 -0
- package/src/common/features/layout/computed-bounds-action-handler.ts +56 -0
- package/src/common/features/layout/layout-engine.ts +31 -0
- package/src/common/features/layout/layout-operation-handler.ts +62 -0
- package/src/common/features/model/gmodel-factory.ts +60 -0
- package/src/common/features/model/gmodel-index.ts +195 -0
- package/src/common/features/model/gmodel-serializer.spec.ts +141 -0
- package/src/common/features/model/gmodel-serializer.ts +175 -0
- package/src/common/features/model/model-state.ts +98 -0
- package/src/common/features/model/model-submission-handler.ts +110 -0
- package/src/common/features/model/request-model-action-handler.ts +67 -0
- package/src/common/features/model/save-model-action-handler.ts +37 -0
- package/src/common/features/model/source-model-storage.ts +49 -0
- package/src/common/features/navigation/json-opener-options.ts +69 -0
- package/src/common/features/navigation/navigation-target-provider-registry.ts +36 -0
- package/src/common/features/navigation/navigation-target-provider.ts +50 -0
- package/src/common/features/navigation/navigation-target-resolution.ts +22 -0
- package/src/common/features/navigation/navigation-target-resolver.ts +61 -0
- package/src/common/features/navigation/request-navigation-targets-action-handler.ts +39 -0
- package/src/common/features/navigation/resolve-navigation-targets-action-handler.ts +42 -0
- package/src/common/features/popup/popup-model-factory.ts +38 -0
- package/src/common/features/popup/request-popup-model-action-handler.ts +60 -0
- package/src/common/features/validation/model-validator.ts +34 -0
- package/src/common/features/validation/request-markers-handler.ts +51 -0
- package/src/common/gmodel/README.md +7 -0
- package/src/common/gmodel/apply-label-edit-operation-handler.ts +36 -0
- package/src/common/gmodel/change-bounds-operation-handler.ts +62 -0
- package/src/common/gmodel/change-routing-points-operation-handler.ts +40 -0
- package/src/common/gmodel/cut-operation-handler.ts +39 -0
- package/src/common/gmodel/delete-operation-handler.ts +121 -0
- package/src/common/gmodel/gmodel-create-edge-operation-handler.ts +64 -0
- package/src/common/gmodel/gmodel-create-node-operation-handler.ts +95 -0
- package/src/common/gmodel/gmodel-diagram-module.ts +76 -0
- package/src/common/gmodel/gmodel-operation-handler.ts +31 -0
- package/src/common/gmodel/index.ts +27 -0
- package/src/common/gmodel/paste-operation-handler.ts +127 -0
- package/src/common/gmodel/reconnect-edge-operation-handler.ts +56 -0
- package/src/common/index.ts +89 -0
- package/src/common/launch/glsp-server-launcher.ts +70 -0
- package/src/common/operations/compound-operation-handler.ts +40 -0
- package/src/common/operations/create-operation-handler.ts +49 -0
- package/src/common/operations/operation-action-handler.ts +93 -0
- package/src/common/operations/operation-handler-registry.spec.ts +50 -0
- package/src/common/operations/operation-handler-registry.ts +66 -0
- package/src/common/operations/operation-handler.ts +82 -0
- package/src/common/protocol/glsp-client-proxy.ts +65 -0
- package/src/common/protocol/glsp-server-listener.ts +39 -0
- package/src/common/protocol/glsp-server.spec.ts +150 -0
- package/src/common/protocol/glsp-server.ts +320 -0
- package/src/common/session/client-session-factory.spec.ts +60 -0
- package/src/common/session/client-session-factory.ts +70 -0
- package/src/common/session/client-session-initializer.ts +27 -0
- package/src/common/session/client-session-listener.ts +41 -0
- package/src/common/session/client-session-manager.spec.ts +82 -0
- package/src/common/session/client-session-manager.ts +182 -0
- package/src/common/session/client-session.ts +62 -0
- package/src/common/test/mock-util.ts +241 -0
- package/src/common/utils/args-util.ts +98 -0
- package/src/common/utils/client-options-util.ts +22 -0
- package/src/common/utils/glsp-server-error.ts +27 -0
- package/src/common/utils/layout-util.ts +164 -0
- package/src/common/utils/logger.ts +72 -0
- package/src/common/utils/promise-queue.spec.ts +138 -0
- package/src/common/utils/promise-queue.ts +103 -0
- package/src/common/utils/registry.spec.ts +223 -0
- package/src/common/utils/registry.ts +154 -0
- package/src/node/abstract-json-model-storage.ts +114 -0
- package/src/node/di/app-module.ts +102 -0
- package/src/node/di/winston-logger.ts +76 -0
- package/src/node/gmodel/gmodel-storage.ts +53 -0
- package/src/node/index.ts +23 -0
- package/src/node/launch/cli-parser.spec.ts +61 -0
- package/src/node/launch/cli-parser.ts +86 -0
- package/src/node/launch/socket-cli-parser.spec.ts +73 -0
- package/src/node/launch/socket-cli-parser.ts +52 -0
- package/src/node/launch/socket-server-launcher.spec.ts +68 -0
- package/src/node/launch/socket-server-launcher.ts +90 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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 { Container, ContainerModule } from 'inversify';
|
|
17
|
+
export declare const GlobalActionProvider: unique symbol;
|
|
18
|
+
export interface GlobalActionProvider {
|
|
19
|
+
readonly serverActionKinds: Map<string, string[]>;
|
|
20
|
+
readonly clientActionKinds: Map<string, string[]>;
|
|
21
|
+
}
|
|
22
|
+
export declare class DefaultGlobalActionProvider implements GlobalActionProvider {
|
|
23
|
+
readonly serverActionKinds: Map<string, string[]>;
|
|
24
|
+
readonly clientActionKinds: Map<string, string[]>;
|
|
25
|
+
constructor(serverContainer: Container, diagramModules: Map<string, ContainerModule[]>);
|
|
26
|
+
createDiagramContainer(serverContainer: Container, modules: ContainerModule[]): Container;
|
|
27
|
+
loadServerActionKinds(diagramType: string, diagramContainer: Container): void;
|
|
28
|
+
loadClientActionKinds(diagramType: string, diagramContainer: Container): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=global-action-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-action-provider.d.ts","sourceRoot":"","sources":["../../../src/common/actions/global-action-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAsB,MAAM,WAAW,CAAC;AAM3E,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACrD;AAED,qBACa,2BAA4B,YAAW,oBAAoB;IACpE,SAAgB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,SAAgB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;gBAGzB,eAAe,EAAE,SAAS,EAC9B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;IAc1E,sBAAsB,CAAC,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS;IAMzF,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,GAAG,IAAI;IAU7E,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,GAAG,IAAI;CAMhF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.DefaultGlobalActionProvider = exports.GlobalActionProvider = void 0;
|
|
16
|
+
/********************************************************************************
|
|
17
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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 service_identifiers_1 = require("../di/service-identifiers");
|
|
33
|
+
const client_session_initializer_1 = require("../session/client-session-initializer");
|
|
34
|
+
const action_handler_registry_1 = require("./action-handler-registry");
|
|
35
|
+
const client_action_handler_1 = require("./client-action-handler");
|
|
36
|
+
exports.GlobalActionProvider = Symbol('GlobalActionProvider');
|
|
37
|
+
let DefaultGlobalActionProvider = class DefaultGlobalActionProvider {
|
|
38
|
+
constructor(serverContainer, diagramModules) {
|
|
39
|
+
this.serverActionKinds = new Map();
|
|
40
|
+
this.clientActionKinds = new Map();
|
|
41
|
+
diagramModules.forEach((modules, diagramType) => {
|
|
42
|
+
const container = this.createDiagramContainer(serverContainer, modules);
|
|
43
|
+
const initializers = container.getAll(client_session_initializer_1.ClientSessionInitializer);
|
|
44
|
+
initializers.forEach(service => service.initialize());
|
|
45
|
+
this.loadServerActionKinds(diagramType, container);
|
|
46
|
+
this.loadClientActionKinds(diagramType, container);
|
|
47
|
+
container.unbindAll();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
createDiagramContainer(serverContainer, modules) {
|
|
51
|
+
const container = serverContainer.createChild();
|
|
52
|
+
container.load(...modules);
|
|
53
|
+
return container;
|
|
54
|
+
}
|
|
55
|
+
loadServerActionKinds(diagramType, diagramContainer) {
|
|
56
|
+
var _a;
|
|
57
|
+
const handlerRegistry = diagramContainer.get(action_handler_registry_1.ActionHandlerRegistry);
|
|
58
|
+
const diagramServerActions = (_a = this.serverActionKinds.get(diagramType)) !== null && _a !== void 0 ? _a : [];
|
|
59
|
+
handlerRegistry
|
|
60
|
+
.getAll()
|
|
61
|
+
.filter(handler => !(handler instanceof client_action_handler_1.ClientActionHandler))
|
|
62
|
+
.forEach(handler => diagramServerActions.push(...handler.actionKinds));
|
|
63
|
+
this.serverActionKinds.set(diagramType, [...new Set(diagramServerActions)]);
|
|
64
|
+
}
|
|
65
|
+
loadClientActionKinds(diagramType, diagramContainer) {
|
|
66
|
+
var _a;
|
|
67
|
+
const clientActionKinds = diagramContainer.getAll(service_identifiers_1.ClientActionKinds);
|
|
68
|
+
const diagramClientActions = (_a = this.clientActionKinds.get(diagramType)) !== null && _a !== void 0 ? _a : [];
|
|
69
|
+
diagramClientActions.push(...clientActionKinds);
|
|
70
|
+
this.clientActionKinds.set(diagramType, diagramClientActions);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
DefaultGlobalActionProvider = __decorate([
|
|
74
|
+
(0, inversify_1.injectable)(),
|
|
75
|
+
__param(0, (0, inversify_1.inject)(service_identifiers_1.InjectionContainer)),
|
|
76
|
+
__param(1, (0, inversify_1.inject)(service_identifiers_1.DiagramModules)),
|
|
77
|
+
__metadata("design:paramtypes", [inversify_1.Container,
|
|
78
|
+
Map])
|
|
79
|
+
], DefaultGlobalActionProvider);
|
|
80
|
+
exports.DefaultGlobalActionProvider = DefaultGlobalActionProvider;
|
|
81
|
+
//# sourceMappingURL=global-action-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-action-provider.js","sourceRoot":"","sources":["../../../src/common/actions/global-action-provider.ts"],"names":[],"mappings":";;;;;;;;;;;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,CAAC,WAAW,CAAC,mCAAI,EAAE,CAAC;QAC3E,eAAe;aACV,MAAM,EAAE;aACR,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,YAAY,2CAAmB,CAAC,CAAC;aAC5D,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,qBAAqB,CAAC,WAAmB,EAAE,gBAA2B;;QAClE,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,MAAM,CAAS,uCAAiB,CAAC,CAAC;QAC7E,MAAM,oBAAoB,GAAG,MAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,mCAAI,EAAE,CAAC;QAC3E,oBAAoB,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,CAAC;QAChD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AA1CY,2BAA2B;IADvC,IAAA,sBAAU,GAAE;IAMJ,WAAA,IAAA,kBAAM,EAAC,wCAAkB,CAAC,CAAA;IAC1B,WAAA,IAAA,kBAAM,EAAC,oCAAc,CAAC,CAAA;qCADsB,qBAAS;QACd,GAAG;GANtC,2BAA2B,CA0CvC;AA1CY,kEAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-action-provider.spec.d.ts","sourceRoot":"","sources":["../../../src/common/actions/global-action-provider.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/********************************************************************************
|
|
4
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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 service_identifiers_1 = require("../di/service-identifiers");
|
|
20
|
+
const client_session_initializer_1 = require("../session/client-session-initializer");
|
|
21
|
+
const mock = require("../test/mock-util");
|
|
22
|
+
const logger_1 = require("../utils/logger");
|
|
23
|
+
const action_handler_1 = require("./action-handler");
|
|
24
|
+
const action_handler_registry_1 = require("./action-handler-registry");
|
|
25
|
+
const global_action_provider_1 = require("./global-action-provider");
|
|
26
|
+
const sinon = require("sinon");
|
|
27
|
+
const chai_1 = require("chai");
|
|
28
|
+
describe('test DefaultGlobalActionProvider', () => {
|
|
29
|
+
const container = new inversify_1.Container();
|
|
30
|
+
const serverActions = ['A1', 'A2', 'A3'];
|
|
31
|
+
const clientActions = ['C1', 'C2'];
|
|
32
|
+
const diagramType = 'myDiagramType';
|
|
33
|
+
const handler1Actions = ['A1', 'A2'];
|
|
34
|
+
const handler2Actions = ['A2', 'A3'];
|
|
35
|
+
const h1 = new mock.StubActionHandler(handler1Actions);
|
|
36
|
+
const h2 = new mock.StubActionHandler(handler2Actions);
|
|
37
|
+
const handlerRegistry = new action_handler_registry_1.ActionHandlerRegistry();
|
|
38
|
+
sinon.stub(handlerRegistry, 'getAll').returns([h1, h2]);
|
|
39
|
+
const diagramModule1 = new inversify_1.ContainerModule(bind => {
|
|
40
|
+
bind(client_session_initializer_1.ClientSessionInitializer).toConstantValue(new mock.StubClientSessionInitializer());
|
|
41
|
+
bind(action_handler_1.ActionHandler).toConstantValue(new mock.StubActionHandler(handler1Actions));
|
|
42
|
+
bind(action_handler_1.ActionHandler).toConstantValue(new mock.StubActionHandler(handler2Actions));
|
|
43
|
+
bind(action_handler_registry_1.ActionHandlerRegistry).toConstantValue(handlerRegistry);
|
|
44
|
+
bind(service_identifiers_1.ClientActionKinds).toConstantValue(clientActions[0]);
|
|
45
|
+
bind(service_identifiers_1.ClientActionKinds).toConstantValue(clientActions[1]);
|
|
46
|
+
});
|
|
47
|
+
const diagramModules = new Map();
|
|
48
|
+
diagramModules.set(diagramType, [diagramModule1]);
|
|
49
|
+
container.load(new inversify_1.ContainerModule(bind => {
|
|
50
|
+
bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
|
|
51
|
+
bind(service_identifiers_1.InjectionContainer).toConstantValue(container);
|
|
52
|
+
bind(service_identifiers_1.DiagramModules).toConstantValue(diagramModules);
|
|
53
|
+
}));
|
|
54
|
+
const actionProvider = container.resolve(global_action_provider_1.DefaultGlobalActionProvider);
|
|
55
|
+
it('serverActionsKinds', () => {
|
|
56
|
+
const result = actionProvider.serverActionKinds;
|
|
57
|
+
(0, chai_1.expect)(result.size).to.be.equal(1);
|
|
58
|
+
const resultServerActions = result.get(diagramType);
|
|
59
|
+
(0, chai_1.expect)(resultServerActions).to.not.be.undefined;
|
|
60
|
+
(0, chai_1.expect)(serverActions.every(action => resultServerActions.includes(action))).true;
|
|
61
|
+
});
|
|
62
|
+
it('clientActionKinds', () => {
|
|
63
|
+
const result = actionProvider.clientActionKinds;
|
|
64
|
+
(0, chai_1.expect)(result.size).to.be.equal(1);
|
|
65
|
+
const resultClientActions = result.get(diagramType);
|
|
66
|
+
(0, chai_1.expect)(resultClientActions).to.not.be.undefined;
|
|
67
|
+
(0, chai_1.expect)(clientActions.every(action => resultClientActions.includes(action))).true;
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=global-action-provider.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-action-provider.spec.js","sourceRoot":"","sources":["../../../src/common/actions/global-action-provider.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuD;AACvD,mEAAkG;AAClG,sFAAiF;AACjF,0CAA0C;AAC1C,4CAAyC;AACzC,qDAAiD;AACjD,uEAAkE;AAClE,qEAAuE;AACvE,+BAA+B;AAC/B,+BAA8B;AAE9B,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,eAAe,CAAC;IAEpC,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErC,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAEvD,MAAM,eAAe,GAAG,IAAI,+CAAqB,EAAE,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAExD,MAAM,cAAc,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;QAC9C,IAAI,CAAC,qDAAwB,CAAC,CAAC,e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AAC,CAAC,CAAC,CAAC;QACnC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,IAAA,aAAM,EAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC;QAChD,IAAA,aAAM,EAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG,cAAc,CAAC,iBAAiB,CAAC;QAChD,IAAA,aAAM,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,IAAA,aAAM,EAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC;QAChD,IAAA,aAAM,EAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Logger } from '../utils/logger';
|
|
2
|
+
import { Command } from './command';
|
|
3
|
+
export declare const CommandStack: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* A command stack keeps track of {@link Command commands} that have been executed.
|
|
6
|
+
* Executed commands can be undone in the reverse order of their original execution.
|
|
7
|
+
* Unless a new command has been executed after an undo operation, commands can be
|
|
8
|
+
* redone in the original order of their execution.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export interface CommandStack {
|
|
12
|
+
/**
|
|
13
|
+
* Clears any redoable commands not yet redone, adds the command to the stack and then invokes {@link Command.execute}.
|
|
14
|
+
* @param command the command to execute.
|
|
15
|
+
*/
|
|
16
|
+
execute(command: Command): void;
|
|
17
|
+
/**
|
|
18
|
+
* Removes the topmost (i.e. last executed) command from the stack and invokes {@link Command.undo}.
|
|
19
|
+
*/
|
|
20
|
+
undo(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns `true` if the top command on the stack can be undone.
|
|
23
|
+
*/
|
|
24
|
+
canUndo(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Re-adds the last undo command on top of the stack and invokes {@link Command.redo}
|
|
27
|
+
*/
|
|
28
|
+
redo(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns `true` if there are redoable commands in the stack.
|
|
31
|
+
*/
|
|
32
|
+
canRedo(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Called after a save has been successfully performed.
|
|
35
|
+
*/
|
|
36
|
+
saveIsDone(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Indicates wether the command stack has unsaved changes.
|
|
39
|
+
*/
|
|
40
|
+
readonly isDirty: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Disposes all the commands in the stack.
|
|
43
|
+
*/
|
|
44
|
+
flush(): void;
|
|
45
|
+
}
|
|
46
|
+
export declare class DefaultCommandStack implements CommandStack {
|
|
47
|
+
protected logger: Logger;
|
|
48
|
+
protected commands: Command[];
|
|
49
|
+
/**
|
|
50
|
+
* The current position within the command list from which the next execute, undo, or redo, will be performed.
|
|
51
|
+
*/
|
|
52
|
+
protected top: number;
|
|
53
|
+
/**
|
|
54
|
+
* The current position within the command list when {@link DefaultCommandStack.saveIsDone} is called.
|
|
55
|
+
*/
|
|
56
|
+
protected saveIndex: number;
|
|
57
|
+
execute(command: Command): void;
|
|
58
|
+
undo(): void;
|
|
59
|
+
canUndo(): boolean;
|
|
60
|
+
redo(): void;
|
|
61
|
+
canRedo(): boolean;
|
|
62
|
+
get isDirty(): boolean;
|
|
63
|
+
saveIsDone(): void;
|
|
64
|
+
flush(): void;
|
|
65
|
+
protected handleError(error: any): never;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=command-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-stack.d.ts","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,YAAY,eAAyB,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACjB;AAED,qBACa,mBAAoB,YAAW,YAAY;IAEpD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAM;IAEnC;;OAEG;IACH,SAAS,CAAC,GAAG,SAAM;IAEnB;;OAEG;IACH,SAAS,CAAC,SAAS,SAAM;IAEzB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAkB/B,IAAI,IAAI,IAAI;IAWZ,OAAO,IAAI,OAAO;IAMlB,IAAI,IAAI,IAAI;IAWZ,OAAO,IAAI,OAAO;IAIlB,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,UAAU,IAAI,IAAI;IAIlB,KAAK,IAAI,IAAI;IAMb,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;CAM3C"}
|
|
@@ -0,0 +1,117 @@
|
|
|
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.DefaultCommandStack = exports.CommandStack = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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 logger_1 = require("../utils/logger");
|
|
30
|
+
const command_1 = require("./command");
|
|
31
|
+
exports.CommandStack = Symbol('CommandStack');
|
|
32
|
+
let DefaultCommandStack = class DefaultCommandStack {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.commands = [];
|
|
35
|
+
/**
|
|
36
|
+
* The current position within the command list from which the next execute, undo, or redo, will be performed.
|
|
37
|
+
*/
|
|
38
|
+
this.top = -1;
|
|
39
|
+
/**
|
|
40
|
+
* The current position within the command list when {@link DefaultCommandStack.saveIsDone} is called.
|
|
41
|
+
*/
|
|
42
|
+
this.saveIndex = -1;
|
|
43
|
+
}
|
|
44
|
+
execute(command) {
|
|
45
|
+
try {
|
|
46
|
+
command.execute();
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
this.handleError(error);
|
|
50
|
+
}
|
|
51
|
+
// Clear the command list past the top (i.e. the old redo list)
|
|
52
|
+
this.commands = this.commands.slice(0, this.top + 1);
|
|
53
|
+
this.commands.push(command);
|
|
54
|
+
++this.top;
|
|
55
|
+
// if the saveIndex points to the old redo list we can never reach a state again
|
|
56
|
+
// where save is not necessary. => ensure that `isDirty` always returns true
|
|
57
|
+
if (this.saveIndex >= this.top) {
|
|
58
|
+
this.saveIndex = -2;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
undo() {
|
|
62
|
+
if (this.canUndo()) {
|
|
63
|
+
const command = this.commands[this.top--];
|
|
64
|
+
try {
|
|
65
|
+
command.undo();
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
this.handleError(error);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
canUndo() {
|
|
73
|
+
return this.top !== -1 //
|
|
74
|
+
? command_1.Command.canUndo(this.commands[this.top])
|
|
75
|
+
: false;
|
|
76
|
+
}
|
|
77
|
+
redo() {
|
|
78
|
+
if (this.canRedo()) {
|
|
79
|
+
const command = this.commands[++this.top];
|
|
80
|
+
try {
|
|
81
|
+
command.redo();
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
this.handleError(error);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
canRedo() {
|
|
89
|
+
return this.top < this.commands.length - 1;
|
|
90
|
+
}
|
|
91
|
+
get isDirty() {
|
|
92
|
+
return this.saveIndex !== this.top;
|
|
93
|
+
}
|
|
94
|
+
saveIsDone() {
|
|
95
|
+
this.saveIndex = this.top;
|
|
96
|
+
}
|
|
97
|
+
flush() {
|
|
98
|
+
this.commands = [];
|
|
99
|
+
this.top = -1;
|
|
100
|
+
this.saveIndex = -1;
|
|
101
|
+
}
|
|
102
|
+
handleError(error) {
|
|
103
|
+
// if an error occurred during the command execution the stack might be in an erroneous state => we have to flush the command stack
|
|
104
|
+
this.flush();
|
|
105
|
+
this.logger.error('An error occurred during command execution. CommandStack will be flushed!', error);
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, inversify_1.inject)(logger_1.Logger),
|
|
111
|
+
__metadata("design:type", logger_1.Logger)
|
|
112
|
+
], DefaultCommandStack.prototype, "logger", void 0);
|
|
113
|
+
DefaultCommandStack = __decorate([
|
|
114
|
+
(0, inversify_1.injectable)()
|
|
115
|
+
], DefaultCommandStack);
|
|
116
|
+
exports.DefaultCommandStack = DefaultCommandStack;
|
|
117
|
+
//# sourceMappingURL=command-stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-stack.js","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,4CAAyC;AACzC,uCAAoC;AAEvB,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAqD5C,IAAM,mB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IAED,IAAI;QACA,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;YAChB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1C,IAAI;gBACA,OAAO,CAAC,IAAI,EAAE,CAAC;aAClB;YAAC,OAAO,KAAK,EAAE;gBACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aAC3B;SACJ;IACL,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,GAAG,CAAC;IACvC,CAAC;IAED,UAAU;QACN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;IAC9B,CAAC;IAED,KAAK;QACD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC;IAES,WAAW,CAAC,KAAU;QAC5B,mIAAmI;QACnI,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2EAA2E,EAAE,KAAK,CAAC,CAAC;QACtG,MAAM,KAAK,CAAC;IAChB,CAAC;CACJ,CAAA;AArFG;IAAC,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;mDAAC;AAFhB,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CAsF/B;AAtFY,kDAAmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-stack.spec.d.ts","sourceRoot":"","sources":["../../../src/common/command/command-stack.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/********************************************************************************
|
|
4
|
+
* Copyright (c) 2023 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 chai_1 = require("chai");
|
|
19
|
+
const inversify_1 = require("inversify");
|
|
20
|
+
const sinon = require("sinon");
|
|
21
|
+
const mock_util_1 = require("../test/mock-util");
|
|
22
|
+
const logger_1 = require("../utils/logger");
|
|
23
|
+
const command_stack_1 = require("./command-stack");
|
|
24
|
+
describe('test DefaultCommandStack', () => {
|
|
25
|
+
const sandbox = sinon.createSandbox();
|
|
26
|
+
const container = new inversify_1.Container();
|
|
27
|
+
const command1 = sandbox.stub(new mock_util_1.StubCommand());
|
|
28
|
+
const command2 = sandbox.stub(new mock_util_1.StubCommand());
|
|
29
|
+
let commandStack;
|
|
30
|
+
container.load(new inversify_1.ContainerModule(bind => {
|
|
31
|
+
bind(logger_1.Logger).toConstantValue(new mock_util_1.StubLogger());
|
|
32
|
+
}));
|
|
33
|
+
commandStack = container.resolve(command_stack_1.DefaultCommandStack);
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
sandbox.reset();
|
|
36
|
+
commandStack = container.resolve(command_stack_1.DefaultCommandStack);
|
|
37
|
+
});
|
|
38
|
+
describe('execute', () => {
|
|
39
|
+
it('should execute the given command and become dirty', () => {
|
|
40
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
41
|
+
commandStack.execute(command1);
|
|
42
|
+
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
43
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
44
|
+
});
|
|
45
|
+
it('should execute the given commands in order and become dirty', () => {
|
|
46
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
47
|
+
commandStack.execute(command1);
|
|
48
|
+
commandStack.execute(command2);
|
|
49
|
+
(0, chai_1.expect)(command1.execute.calledOnce).to.be.true;
|
|
50
|
+
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
51
|
+
(0, chai_1.expect)(command2.execute.calledAfter(command1.execute)).to.be.true;
|
|
52
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
53
|
+
});
|
|
54
|
+
it('should be able to undo after execute', () => {
|
|
55
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
56
|
+
commandStack.execute(command1);
|
|
57
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
58
|
+
});
|
|
59
|
+
it('should clear the redo stack after execution', () => {
|
|
60
|
+
commandStack['commands'].push(command2);
|
|
61
|
+
commandStack['top'] = -1;
|
|
62
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
63
|
+
commandStack.execute(command1);
|
|
64
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
65
|
+
});
|
|
66
|
+
it('should flush the stack in case of an execution error', () => {
|
|
67
|
+
command2.execute.throwsException();
|
|
68
|
+
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
69
|
+
(0, chai_1.expect)(() => commandStack.execute(command2)).to.throw();
|
|
70
|
+
(0, chai_1.expect)(command2.execute.calledOnce).to.be.true;
|
|
71
|
+
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
describe('undo', () => {
|
|
75
|
+
it('should do nothing if the command stack is empty', () => {
|
|
76
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
77
|
+
commandStack.undo();
|
|
78
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
79
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
80
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
81
|
+
});
|
|
82
|
+
it('should undo the command and become non-dirty again', () => {
|
|
83
|
+
commandStack['commands'].push(command1);
|
|
84
|
+
commandStack['top'] = 0;
|
|
85
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
86
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
87
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
88
|
+
commandStack.undo();
|
|
89
|
+
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
90
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
91
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
92
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
93
|
+
});
|
|
94
|
+
it('should undo multiple command and become non-dirty again', () => {
|
|
95
|
+
commandStack['commands'].push(command1, command2);
|
|
96
|
+
commandStack['top'] = 1;
|
|
97
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
98
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
99
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
100
|
+
commandStack.undo();
|
|
101
|
+
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
102
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
103
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
104
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
105
|
+
commandStack.undo();
|
|
106
|
+
(0, chai_1.expect)(command1.undo.calledOnce).to.be.true;
|
|
107
|
+
(0, chai_1.expect)(command1.undo.calledAfter(command2.undo)).to.be.true;
|
|
108
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
109
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
110
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
111
|
+
});
|
|
112
|
+
it('should flush the stack in case of an execution error', () => {
|
|
113
|
+
command2.undo.throwsException();
|
|
114
|
+
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
115
|
+
commandStack['commands'].push(command2);
|
|
116
|
+
commandStack['top'] = 0;
|
|
117
|
+
(0, chai_1.expect)(() => commandStack.undo()).to.throw();
|
|
118
|
+
(0, chai_1.expect)(command2.undo.calledOnce).to.be.true;
|
|
119
|
+
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
describe('redo', () => {
|
|
123
|
+
it('should do nothing if the command stack is empty', () => {
|
|
124
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
125
|
+
commandStack.redo();
|
|
126
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
127
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
128
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
129
|
+
});
|
|
130
|
+
it('should redo the command and become dirty again', () => {
|
|
131
|
+
commandStack['commands'].push(command1);
|
|
132
|
+
commandStack['top'] = -1;
|
|
133
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
134
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
135
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
136
|
+
commandStack.redo();
|
|
137
|
+
(0, chai_1.expect)(command1.redo.calledOnce).to.be.true;
|
|
138
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
139
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
140
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
141
|
+
});
|
|
142
|
+
it('should undo multiple command and become non-dirty again', () => {
|
|
143
|
+
commandStack['commands'].push(command2, command1);
|
|
144
|
+
commandStack['top'] = -1;
|
|
145
|
+
commandStack['saveIndex'] = -1;
|
|
146
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
147
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
148
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
149
|
+
commandStack.redo();
|
|
150
|
+
(0, chai_1.expect)(command2.redo.calledOnce).to.be.true;
|
|
151
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
152
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
153
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
154
|
+
commandStack.redo();
|
|
155
|
+
(0, chai_1.expect)(command1.redo.calledOnce).to.be.true;
|
|
156
|
+
(0, chai_1.expect)(command1.redo.calledAfter(command2.redo)).to.be.true;
|
|
157
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
158
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
159
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
160
|
+
});
|
|
161
|
+
it('should flush the stack in case of an execution error', () => {
|
|
162
|
+
command2.redo.throwsException();
|
|
163
|
+
const flushSpy = sandbox.spy(commandStack, 'flush');
|
|
164
|
+
commandStack['commands'].push(command2);
|
|
165
|
+
commandStack['top'] = -1;
|
|
166
|
+
(0, chai_1.expect)(() => commandStack.redo()).to.throw();
|
|
167
|
+
(0, chai_1.expect)(command2.redo.calledOnce).to.be.true;
|
|
168
|
+
(0, chai_1.expect)(flushSpy.calledOnce).to.be.true;
|
|
169
|
+
});
|
|
170
|
+
it('should be able to undo after redo', () => {
|
|
171
|
+
commandStack['commands'].push(command1);
|
|
172
|
+
commandStack['top'] = -1;
|
|
173
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
174
|
+
commandStack.redo();
|
|
175
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
describe('flush', () => {
|
|
179
|
+
it('should reset the internal state of the command stack', () => {
|
|
180
|
+
commandStack['commands'].push(command1, command1);
|
|
181
|
+
commandStack['top'] = 0;
|
|
182
|
+
commandStack.flush();
|
|
183
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
184
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.false;
|
|
185
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.false;
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
describe('isSaveDone', () => {
|
|
189
|
+
it('should become non-dirty after execution', () => {
|
|
190
|
+
commandStack['commands'].push(command1);
|
|
191
|
+
commandStack['top'] = 0;
|
|
192
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.true;
|
|
193
|
+
commandStack.saveIsDone();
|
|
194
|
+
(0, chai_1.expect)(commandStack.isDirty).to.be.false;
|
|
195
|
+
});
|
|
196
|
+
it('should maintain undo/redo history after execution', () => {
|
|
197
|
+
commandStack['commands'].push(command1, command2);
|
|
198
|
+
commandStack['top'] = 0;
|
|
199
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
200
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
201
|
+
commandStack.saveIsDone();
|
|
202
|
+
(0, chai_1.expect)(commandStack.canUndo()).to.be.true;
|
|
203
|
+
(0, chai_1.expect)(commandStack.canRedo()).to.be.true;
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
//# sourceMappingURL=command-stack.spec.js.map
|
|
@@ -0,0 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