@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,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiagramModule = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
const action_dispatcher_1 = require("../actions/action-dispatcher");
|
|
21
|
+
const action_handler_1 = require("../actions/action-handler");
|
|
22
|
+
const action_handler_registry_1 = require("../actions/action-handler-registry");
|
|
23
|
+
const client_action_handler_1 = require("../actions/client-action-handler");
|
|
24
|
+
const command_stack_1 = require("../command/command-stack");
|
|
25
|
+
const undo_redo_action_handler_1 = require("../command/undo-redo-action-handler");
|
|
26
|
+
const diagram_configuration_1 = require("../diagram/diagram-configuration");
|
|
27
|
+
const request_type_hints_action_handler_1 = require("../diagram/request-type-hints-action-handler");
|
|
28
|
+
const command_palette_action_provider_1 = require("../features/contextactions/command-palette-action-provider");
|
|
29
|
+
const context_actions_provider_registry_1 = require("../features/contextactions/context-actions-provider-registry");
|
|
30
|
+
const context_menu_item_provider_1 = require("../features/contextactions/context-menu-item-provider");
|
|
31
|
+
const request_context_actions_handler_1 = require("../features/contextactions/request-context-actions-handler");
|
|
32
|
+
const tool_palette_item_provider_1 = require("../features/contextactions/tool-palette-item-provider");
|
|
33
|
+
const context_edit_validator_registry_1 = require("../features/directediting/context-edit-validator-registry");
|
|
34
|
+
const label_edit_validator_1 = require("../features/directediting/label-edit-validator");
|
|
35
|
+
const request_edit_validation_handler_1 = require("../features/directediting/request-edit-validation-handler");
|
|
36
|
+
const computed_bounds_action_handler_1 = require("../features/layout/computed-bounds-action-handler");
|
|
37
|
+
const layout_engine_1 = require("../features/layout/layout-engine");
|
|
38
|
+
const layout_operation_handler_1 = require("../features/layout/layout-operation-handler");
|
|
39
|
+
const gmodel_factory_1 = require("../features/model/gmodel-factory");
|
|
40
|
+
const gmodel_index_1 = require("../features/model/gmodel-index");
|
|
41
|
+
const gmodel_serializer_1 = require("../features/model/gmodel-serializer");
|
|
42
|
+
const model_state_1 = require("../features/model/model-state");
|
|
43
|
+
const model_submission_handler_1 = require("../features/model/model-submission-handler");
|
|
44
|
+
const request_model_action_handler_1 = require("../features/model/request-model-action-handler");
|
|
45
|
+
const save_model_action_handler_1 = require("../features/model/save-model-action-handler");
|
|
46
|
+
const source_model_storage_1 = require("../features/model/source-model-storage");
|
|
47
|
+
const navigation_target_provider_registry_1 = require("../features/navigation/navigation-target-provider-registry");
|
|
48
|
+
const navigation_target_resolver_1 = require("../features/navigation/navigation-target-resolver");
|
|
49
|
+
const request_navigation_targets_action_handler_1 = require("../features/navigation/request-navigation-targets-action-handler");
|
|
50
|
+
const resolve_navigation_targets_action_handler_1 = require("../features/navigation/resolve-navigation-targets-action-handler");
|
|
51
|
+
const popup_model_factory_1 = require("../features/popup/popup-model-factory");
|
|
52
|
+
const request_popup_model_action_handler_1 = require("../features/popup/request-popup-model-action-handler");
|
|
53
|
+
const model_validator_1 = require("../features/validation/model-validator");
|
|
54
|
+
const request_markers_handler_1 = require("../features/validation/request-markers-handler");
|
|
55
|
+
const compound_operation_handler_1 = require("../operations/compound-operation-handler");
|
|
56
|
+
const operation_action_handler_1 = require("../operations/operation-action-handler");
|
|
57
|
+
const operation_handler_1 = require("../operations/operation-handler");
|
|
58
|
+
const operation_handler_registry_1 = require("../operations/operation-handler-registry");
|
|
59
|
+
const client_session_initializer_1 = require("../session/client-session-initializer");
|
|
60
|
+
const binding_target_1 = require("./binding-target");
|
|
61
|
+
const glsp_module_1 = require("./glsp-module");
|
|
62
|
+
const multi_binding_1 = require("./multi-binding");
|
|
63
|
+
const service_identifiers_1 = require("./service-identifiers");
|
|
64
|
+
/**
|
|
65
|
+
* The diagram module is the central configuration artifact for configuring a client session specific injector. For each
|
|
66
|
+
* session that is initialized by a {@link GLSPServer} a new client session injector is created. The diagram module
|
|
67
|
+
* provides the base bindings necessary to provide diagram implementation (i.e. diagram language). In addition to the
|
|
68
|
+
* diagram specific bindings, session specific bindings like the {@link ModelState} are configured
|
|
69
|
+
*
|
|
70
|
+
* Client session injectors are child injectors of a server injector and therefore inherit the bindings from
|
|
71
|
+
* {@link ServerModule}.
|
|
72
|
+
*
|
|
73
|
+
* The following bindings are provided:
|
|
74
|
+
* - {@link DiagramType}
|
|
75
|
+
* - {@link ClientId}
|
|
76
|
+
* - {@link DiagramConfiguration}
|
|
77
|
+
* - {@link GModelSerializer}
|
|
78
|
+
* - {@link ModelState}
|
|
79
|
+
* - {@link GModelIndex}
|
|
80
|
+
* - {@link SourceModelStorage}
|
|
81
|
+
* - {@link GModelFactory}
|
|
82
|
+
* - {@link ModelSubmissionHandler}
|
|
83
|
+
* - {@link ModelValidator} as optional binding
|
|
84
|
+
* - {@link LabelEditValidator} as optional binding
|
|
85
|
+
* - {@link ToolPaletteItemProvider}as optional binding
|
|
86
|
+
* - {@link CommandPaletteActionProvider}as optional binding
|
|
87
|
+
* - {@link ContextMenuItemProvider} as optional binding
|
|
88
|
+
* - {@link ContextActionsProviders} as {@link ClassMultiBinding<ContextActionsProvider>} (empty)
|
|
89
|
+
* - {@link ContextActionsProviderRegistry}
|
|
90
|
+
* - {@link ActionDispatcher}
|
|
91
|
+
* - {@link ClientActionKinds} as {@link InstanceMultiBinding<string>}
|
|
92
|
+
* - {@link ActionHandler} as {@link InstanceMultiBinding<ActionHandlerConstructor>}
|
|
93
|
+
* - {@link ActionHandlerFactory}
|
|
94
|
+
* - {@link ActionHandlerRegistry}
|
|
95
|
+
* - {@link OperationHandler} as {@link InstanceMultiBinding<OperationHandlerConstructor>}
|
|
96
|
+
* - {@link OperationHandlerFactory}
|
|
97
|
+
* - {@link OperationHandlerRegistry}
|
|
98
|
+
* - {@link Operations}
|
|
99
|
+
* - {@link CommandStack}
|
|
100
|
+
* - {@link NavigationTargetResolver} as optional binding
|
|
101
|
+
* {@link NavigationTargetProvider} as {@link ClassMultiBinding<NavigationTargetProvider>} (empty)
|
|
102
|
+
* - {@link NavigationTargetProviderRegistry}
|
|
103
|
+
* - {@link ContextEditValidatorRegistry}
|
|
104
|
+
* - {@link ContextEditValidators} as {@link ClassMultiBinding<ContextActionsProvider>} (empty)
|
|
105
|
+
* - {@link ClientSessionInitializer} as {@link ClassMultiBinding<ClientSessionInitializer>}
|
|
106
|
+
* - {@link PopupModelFactory} as optional binding
|
|
107
|
+
* - {@link LayoutEngine} as optional binding
|
|
108
|
+
*/
|
|
109
|
+
class DiagramModule extends glsp_module_1.GLSPModule {
|
|
110
|
+
configure(bind, unbind, isBound, rebind) {
|
|
111
|
+
var _a;
|
|
112
|
+
const context = { bind, isBound };
|
|
113
|
+
// Configurations
|
|
114
|
+
(0, binding_target_1.applyBindingTarget)(context, service_identifiers_1.DiagramType, this.bindDiagramType());
|
|
115
|
+
(0, binding_target_1.applyBindingTarget)(context, service_identifiers_1.ClientId, this.bindClientId());
|
|
116
|
+
(0, binding_target_1.applyBindingTarget)(context, diagram_configuration_1.DiagramConfiguration, this.bindDiagramConfiguration()).inSingletonScope();
|
|
117
|
+
// Model-related bindings
|
|
118
|
+
(0, binding_target_1.applyBindingTarget)(context, gmodel_serializer_1.GModelSerializer, this.bindGModelSerializer()).inSingletonScope();
|
|
119
|
+
(0, binding_target_1.applyBindingTarget)(context, model_state_1.ModelState, this.bindModelState()).inSingletonScope();
|
|
120
|
+
(0, binding_target_1.applyBindingTarget)(context, gmodel_index_1.GModelIndex, this.bindGModelIndex()).inSingletonScope();
|
|
121
|
+
(0, binding_target_1.applyBindingTarget)(context, source_model_storage_1.SourceModelStorage, this.bindSourceModelStorage()).inSingletonScope();
|
|
122
|
+
(0, binding_target_1.applyBindingTarget)(context, gmodel_factory_1.GModelFactory, this.bindGModelFactory());
|
|
123
|
+
(0, binding_target_1.applyBindingTarget)(context, model_submission_handler_1.ModelSubmissionHandler, this.bindModelSubmissionHandler()).inSingletonScope();
|
|
124
|
+
// Model Validation
|
|
125
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, model_validator_1.ModelValidator, this.bindModelValidator());
|
|
126
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, label_edit_validator_1.LabelEditValidator, this.bindLabelEditValidator());
|
|
127
|
+
// Context action providers
|
|
128
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, tool_palette_item_provider_1.ToolPaletteItemProvider, this.bindToolPaletteItemProvider());
|
|
129
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, command_palette_action_provider_1.CommandPaletteActionProvider, this.bindCommandPaletteActionProvider());
|
|
130
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, context_menu_item_provider_1.ContextMenuItemProvider, this.bindContextMenuItemProvider());
|
|
131
|
+
this.configureMultiBinding(new multi_binding_1.MultiBinding(service_identifiers_1.ContextActionsProviders), binding => this.configureContextActionProviders(binding));
|
|
132
|
+
(0, binding_target_1.applyBindingTarget)(context, context_actions_provider_registry_1.ContextActionsProviderRegistry, this.bindContextActionsProviderRegistry()).inSingletonScope();
|
|
133
|
+
// Action & operation related bindings
|
|
134
|
+
(0, binding_target_1.applyBindingTarget)(context, action_dispatcher_1.ActionDispatcher, this.bindActionDispatcher()).inSingletonScope();
|
|
135
|
+
this.configureMultiBinding(new multi_binding_1.InstanceMultiBinding(service_identifiers_1.ClientActionKinds), binding => this.configureClientActions(binding));
|
|
136
|
+
this.configureMultiBinding(new multi_binding_1.InstanceMultiBinding(action_handler_1.ActionHandlerConstructor), binding => this.configureActionHandlers(binding));
|
|
137
|
+
(0, binding_target_1.applyBindingTarget)(context, action_handler_1.ActionHandlerFactory, this.bindActionHandlerFactory());
|
|
138
|
+
(0, binding_target_1.applyBindingTarget)(context, action_handler_registry_1.ActionHandlerRegistry, this.bindActionHandlerRegistry()).inSingletonScope();
|
|
139
|
+
this.configureMultiBinding(new multi_binding_1.InstanceMultiBinding(operation_handler_1.OperationHandlerConstructor), binding => this.configureOperationHandlers(binding));
|
|
140
|
+
(0, binding_target_1.applyBindingTarget)(context, operation_handler_registry_1.OperationHandlerRegistry, this.bindOperationHandlerRegistry()).inSingletonScope();
|
|
141
|
+
(0, binding_target_1.applyBindingTarget)(context, operation_handler_1.OperationHandlerFactory, this.bindOperationHandlerFactory());
|
|
142
|
+
(0, binding_target_1.applyBindingTarget)(context, service_identifiers_1.Operations, this.bindOperations()).inSingletonScope();
|
|
143
|
+
(0, binding_target_1.applyBindingTarget)(context, command_stack_1.CommandStack, this.bindCommandStack()).inSingletonScope();
|
|
144
|
+
// Navigation
|
|
145
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, navigation_target_resolver_1.NavigationTargetResolver, this.bindNavigationTargetResolver());
|
|
146
|
+
this.configureMultiBinding(new multi_binding_1.MultiBinding(service_identifiers_1.NavigationTargetProviders), binding => this.configureNavigationTargetProviders(binding));
|
|
147
|
+
(0, binding_target_1.applyBindingTarget)(context, navigation_target_provider_registry_1.NavigationTargetProviderRegistry, this.bindNavigationTargetProviderRegistry()).inSingletonScope();
|
|
148
|
+
// Context edit
|
|
149
|
+
(0, binding_target_1.applyBindingTarget)(context, context_edit_validator_registry_1.ContextEditValidatorRegistry, this.bindContextEditValidatorRegistry()).inSingletonScope();
|
|
150
|
+
this.configureMultiBinding(new multi_binding_1.MultiBinding(service_identifiers_1.ContextEditValidators), binding => this.configureContextEditValidators(binding));
|
|
151
|
+
// Misc
|
|
152
|
+
this.configureMultiBinding(new multi_binding_1.MultiBinding(client_session_initializer_1.ClientSessionInitializer), binding => this.configureClientSessionInitializers(binding));
|
|
153
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, popup_model_factory_1.PopupModelFactory, this.bindPopupModelFactory());
|
|
154
|
+
(0, binding_target_1.applyOptionalBindingTarget)(context, layout_engine_1.LayoutEngine, (_a = this.bindLayoutEngine) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
155
|
+
}
|
|
156
|
+
configureClientSessionInitializers(binding) {
|
|
157
|
+
binding.add(action_handler_registry_1.ActionHandlerRegistryInitializer);
|
|
158
|
+
binding.add(operation_handler_registry_1.OperationHandlerRegistryInitializer);
|
|
159
|
+
}
|
|
160
|
+
configureActionHandlers(binding) {
|
|
161
|
+
binding.add(client_action_handler_1.ClientActionHandler);
|
|
162
|
+
binding.add(request_model_action_handler_1.RequestModelActionHandler);
|
|
163
|
+
binding.add(request_context_actions_handler_1.RequestContextActionsHandler);
|
|
164
|
+
binding.add(request_type_hints_action_handler_1.RequestTypeHintsActionHandler);
|
|
165
|
+
binding.add(operation_action_handler_1.OperationActionHandler);
|
|
166
|
+
binding.add(request_markers_handler_1.RequestMarkersHandler);
|
|
167
|
+
binding.add(request_popup_model_action_handler_1.RequestPopupModelActionHandler);
|
|
168
|
+
binding.add(request_edit_validation_handler_1.RequestEditValidationHandler);
|
|
169
|
+
binding.add(request_navigation_targets_action_handler_1.RequestNavigationTargetsActionHandler);
|
|
170
|
+
binding.add(resolve_navigation_targets_action_handler_1.ResolveNavigationTargetsActionHandler);
|
|
171
|
+
binding.add(save_model_action_handler_1.SaveModelActionHandler);
|
|
172
|
+
binding.add(undo_redo_action_handler_1.UndoRedoActionHandler);
|
|
173
|
+
binding.add(computed_bounds_action_handler_1.ComputedBoundsActionHandler);
|
|
174
|
+
}
|
|
175
|
+
bindDiagramType() {
|
|
176
|
+
return { constantValue: this.diagramType };
|
|
177
|
+
}
|
|
178
|
+
bindClientId() {
|
|
179
|
+
return { constantValue: DiagramModule.FALLBACK_CLIENT_ID };
|
|
180
|
+
}
|
|
181
|
+
bindGModelSerializer() {
|
|
182
|
+
return gmodel_serializer_1.DefaultGModelSerializer;
|
|
183
|
+
}
|
|
184
|
+
bindGModelIndex() {
|
|
185
|
+
return gmodel_index_1.GModelIndex;
|
|
186
|
+
}
|
|
187
|
+
bindActionDispatcher() {
|
|
188
|
+
return action_dispatcher_1.DefaultActionDispatcher;
|
|
189
|
+
}
|
|
190
|
+
bindActionHandlerRegistry() {
|
|
191
|
+
return action_handler_registry_1.ActionHandlerRegistry;
|
|
192
|
+
}
|
|
193
|
+
bindOperationHandlerRegistry() {
|
|
194
|
+
return operation_handler_registry_1.OperationHandlerRegistry;
|
|
195
|
+
}
|
|
196
|
+
bindModelSubmissionHandler() {
|
|
197
|
+
return model_submission_handler_1.ModelSubmissionHandler;
|
|
198
|
+
}
|
|
199
|
+
bindNavigationTargetProviderRegistry() {
|
|
200
|
+
return navigation_target_provider_registry_1.DefaultNavigationTargetProviderRegistry;
|
|
201
|
+
}
|
|
202
|
+
bindContextEditValidatorRegistry() {
|
|
203
|
+
return context_edit_validator_registry_1.DefaultContextEditValidatorRegistry;
|
|
204
|
+
}
|
|
205
|
+
bindActionHandlerFactory() {
|
|
206
|
+
return { dynamicValue: ctx => constructor => ctx.container.resolve(constructor) };
|
|
207
|
+
}
|
|
208
|
+
bindOperationHandlerFactory() {
|
|
209
|
+
return { dynamicValue: ctx => constructor => ctx.container.resolve(constructor) };
|
|
210
|
+
}
|
|
211
|
+
bindOperations() {
|
|
212
|
+
return {
|
|
213
|
+
dynamicValue: context => context.container
|
|
214
|
+
.get(operation_handler_1.OperationHandlerConstructor)
|
|
215
|
+
.map(constructor => new constructor().operationType)
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
bindCommandStack() {
|
|
219
|
+
return command_stack_1.DefaultCommandStack;
|
|
220
|
+
}
|
|
221
|
+
configureOperationHandlers(binding) {
|
|
222
|
+
binding.add(compound_operation_handler_1.CompoundOperationHandler);
|
|
223
|
+
binding.add(layout_operation_handler_1.LayoutOperationHandler);
|
|
224
|
+
}
|
|
225
|
+
configureContextActionProviders(binding) {
|
|
226
|
+
// empty as default
|
|
227
|
+
}
|
|
228
|
+
configureContextEditValidators(binding) {
|
|
229
|
+
// empty as default
|
|
230
|
+
}
|
|
231
|
+
configureNavigationTargetProviders(binding) {
|
|
232
|
+
// empty as default
|
|
233
|
+
}
|
|
234
|
+
configureClientActions(binding) {
|
|
235
|
+
binding.add(protocol_1.CenterAction.KIND);
|
|
236
|
+
binding.add(protocol_1.ExportSvgAction.KIND);
|
|
237
|
+
binding.add(protocol_1.DeleteMarkersAction.KIND);
|
|
238
|
+
binding.add(protocol_1.FitToScreenAction.KIND);
|
|
239
|
+
binding.add(protocol_1.SourceModelChangedAction.KIND);
|
|
240
|
+
binding.add(protocol_1.NavigateToTargetAction.KIND);
|
|
241
|
+
binding.add(protocol_1.NavigateToExternalTargetAction.KIND);
|
|
242
|
+
binding.add(protocol_1.RequestBoundsAction.KIND);
|
|
243
|
+
binding.add(protocol_1.SelectAction.KIND);
|
|
244
|
+
binding.add(protocol_1.SelectAllAction.KIND);
|
|
245
|
+
binding.add(protocol_1.ServerMessageAction.KIND);
|
|
246
|
+
binding.add(protocol_1.SetBoundsAction.KIND);
|
|
247
|
+
binding.add(protocol_1.SetClipboardDataAction.KIND);
|
|
248
|
+
binding.add(protocol_1.SetContextActions.KIND);
|
|
249
|
+
binding.add(protocol_1.SetDirtyStateAction.KIND);
|
|
250
|
+
binding.add(protocol_1.SetEditModeAction.KIND);
|
|
251
|
+
binding.add(protocol_1.SetEditValidationResultAction.KIND);
|
|
252
|
+
binding.add(protocol_1.SetMarkersAction.KIND);
|
|
253
|
+
binding.add(protocol_1.SetModelAction.KIND);
|
|
254
|
+
binding.add(protocol_1.SetNavigationTargetsAction.KIND);
|
|
255
|
+
binding.add(protocol_1.SetPopupModelAction.KIND);
|
|
256
|
+
binding.add(protocol_1.SetResolvedNavigationTargetAction.KIND);
|
|
257
|
+
binding.add(protocol_1.SetTypeHintsAction.KIND);
|
|
258
|
+
binding.add(protocol_1.SetViewportAction.KIND);
|
|
259
|
+
binding.add(protocol_1.ServerStatusAction.KIND);
|
|
260
|
+
binding.add(protocol_1.TriggerNodeCreationAction.KIND);
|
|
261
|
+
binding.add(protocol_1.TriggerEdgeCreationAction.KIND);
|
|
262
|
+
binding.add(protocol_1.UpdateModelAction.KIND);
|
|
263
|
+
}
|
|
264
|
+
bindContextActionsProviderRegistry() {
|
|
265
|
+
return context_actions_provider_registry_1.ContextActionsProviderRegistry;
|
|
266
|
+
}
|
|
267
|
+
// Optional bindings
|
|
268
|
+
bindModelValidator() {
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
bindLabelEditValidator() {
|
|
272
|
+
return undefined;
|
|
273
|
+
}
|
|
274
|
+
bindToolPaletteItemProvider() {
|
|
275
|
+
return tool_palette_item_provider_1.DefaultToolPaletteItemProvider;
|
|
276
|
+
}
|
|
277
|
+
bindCommandPaletteActionProvider() {
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
bindContextMenuItemProvider() {
|
|
281
|
+
return undefined;
|
|
282
|
+
}
|
|
283
|
+
bindNavigationTargetResolver() {
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
bindPopupModelFactory() {
|
|
287
|
+
return undefined;
|
|
288
|
+
}
|
|
289
|
+
bindLayoutEngine() {
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.DiagramModule = DiagramModule;
|
|
294
|
+
DiagramModule.FALLBACK_CLIENT_ID = 'FallbackClientId';
|
|
295
|
+
//# sourceMappingURL=diagram-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-module.js","sourceRoot":"","sources":["../../../src/common/di/diagram-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDA6BgC;AAEhC,oEAAyF;AACzF,8DAA2F;AAC3F,gFAA6G;AAC7G,4EAAuE;AACvE,4DAA6E;AAC7E,kFAA4E;AAC5E,4EAAwE;AACxE,oGAA6F;AAC7F,gHAA0G;AAE1G,oHAA8G;AAC9G,sGAAgG;AAChG,gHAA0G;AAC1G,sGAAgI;AAEhI,+GAGmE;AACnE,yFAAoF;AACpF,+GAAyG;AACzG,sGAAgG;AAChG,oEAAgE;AAChE,0FAAqF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,CAAC;IAES,kCAAkC;QACxC,OAAO,kEAA8B,CAAC;IAC1C,CAAC;IAyBD,oBAAoB;IAEV,kBAAkB;QACxB,OAAO,SAAS,CAAC;IACrB,CAAC;IACS,sBAAsB;QAC5B,OAAO,SAAS,CAAC;IACrB,CAAC;IAES,2BAA2B;QACjC,OAAO,2DAA8B,CAAC;IAC1C,CAAC;IACS,gCAAgC;QACtC,OAAO,SAAS,CAAC;IACrB,CAAC;IACS,2BAA2B;QACjC,OAAO,SAAS,CAAC;IACrB,CAAC;IAES,4BAA4B;QAClC,OAAO,SAAS,CAAC;IACrB,CAAC;IAES,qBAAqB;QAC3B,OAAO,SAAS,CAAC;IACrB,CAAC;IACS,gBAAgB;QACtB,OAAO,SAAS,CAAC;IACrB,CAAC;;AA9PL,sCA+PC;AA9PmB,gCAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { ContainerModule, interfaces } from 'inversify';
|
|
17
|
+
import { AbstractMultiBinding } from './multi-binding';
|
|
18
|
+
/**
|
|
19
|
+
* A wrapper interface to get access to the binding related functions
|
|
20
|
+
* for a inversify container.
|
|
21
|
+
*/
|
|
22
|
+
export interface ModuleContext {
|
|
23
|
+
bind: interfaces.Bind;
|
|
24
|
+
unbind: interfaces.Unbind;
|
|
25
|
+
isBound: interfaces.IsBound;
|
|
26
|
+
rebind: interfaces.Rebind;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Common super class for GLSP {@link ContainerModule}s.
|
|
30
|
+
*/
|
|
31
|
+
export declare abstract class GLSPModule extends ContainerModule {
|
|
32
|
+
static CLIENT_ACTIONS: string;
|
|
33
|
+
protected context: ModuleContext;
|
|
34
|
+
constructor();
|
|
35
|
+
protected abstract configure(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
|
|
36
|
+
/**
|
|
37
|
+
* Configuration method for multibound values. The passed configurator is typically a submethod of this module. This
|
|
38
|
+
* means
|
|
39
|
+
* that subclasses can customize the {@link MultiBinding} object before the actual {@link MultiBinding} is created.
|
|
40
|
+
*
|
|
41
|
+
* @param <T> Type of the {@link MultiBinding}
|
|
42
|
+
* @param binding The multi binding configuration object
|
|
43
|
+
* @param configurator The consumer that should be used to configure the given {@link MultiBinding}
|
|
44
|
+
*/
|
|
45
|
+
protected configureMultiBinding<T>(binding: AbstractMultiBinding<T>, configurator: (binding: AbstractMultiBinding<T>) => void): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=glsp-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glsp-module.d.ts","sourceRoot":"","sources":["../../../src/common/di/glsp-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAc,UAAU,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;IAC1B,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,8BACsB,UAAW,SAAQ,eAAe;IACpD,OAAc,cAAc,SAAmB;IAE/C,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;;IASjC,SAAS,CAAC,QAAQ,CAAC,SAAS,CACxB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,MAAM,EAAE,UAAU,CAAC,MAAM,EACzB,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,MAAM,EAAE,UAAU,CAAC,MAAM,GAC1B,IAAI;IAEP;;;;;;;;OAQG;IACH,SAAS,CAAC,qBAAqB,CAAC,CAAC,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI;CAIvI"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.GLSPModule = 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
|
+
/**
|
|
30
|
+
* Common super class for GLSP {@link ContainerModule}s.
|
|
31
|
+
*/
|
|
32
|
+
let GLSPModule = class GLSPModule extends inversify_1.ContainerModule {
|
|
33
|
+
constructor() {
|
|
34
|
+
super((bind, unbind, isBound, rebind) => {
|
|
35
|
+
this.context = { bind, unbind, isBound, rebind };
|
|
36
|
+
this.configure(bind, unbind, isBound, rebind);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Configuration method for multibound values. The passed configurator is typically a submethod of this module. This
|
|
41
|
+
* means
|
|
42
|
+
* that subclasses can customize the {@link MultiBinding} object before the actual {@link MultiBinding} is created.
|
|
43
|
+
*
|
|
44
|
+
* @param <T> Type of the {@link MultiBinding}
|
|
45
|
+
* @param binding The multi binding configuration object
|
|
46
|
+
* @param configurator The consumer that should be used to configure the given {@link MultiBinding}
|
|
47
|
+
*/
|
|
48
|
+
configureMultiBinding(binding, configurator) {
|
|
49
|
+
configurator(binding);
|
|
50
|
+
binding.applyBindings(this.context);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
GLSPModule.CLIENT_ACTIONS = 'ClientActions';
|
|
54
|
+
GLSPModule = __decorate([
|
|
55
|
+
(0, inversify_1.injectable)(),
|
|
56
|
+
__metadata("design:paramtypes", [])
|
|
57
|
+
], GLSPModule);
|
|
58
|
+
exports.GLSPModule = GLSPModule;
|
|
59
|
+
//# sourceMappingURL=glsp-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glsp-module.js","sourceRoot":"","sources":["../../../src/common/di/glsp-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAoE;AAcpE;;GAEG;AAEI,IAAe,UAAU,GAAzB,MAAe,UAAW,SAAQ,2BAAe;IAKpD;QACI,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YACpC,IAAI,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YACjD,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACP,CAAC;IASD;;;;;;;;OAQG;IACO,qBAAqB,CAAI,OAAgC,EAAE,YAAwD;QACzH,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;;AA9Ba,yBAAc,GAAG,eAAe,CAAC;AAD7B,UAAU;IAD/B,IAAA,sBAAU,GAAE;;GACS,UAAU,CAgC/B;AAhCqB,gCAAU"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BindingTarget } from './binding-target';
|
|
2
|
+
import { ModuleContext } from './glsp-module';
|
|
3
|
+
/**
|
|
4
|
+
* A helper class used in `GLSPModules` to ease the configuration of multi-injected service identifiers.
|
|
5
|
+
* Instead of directly binding to the service identifier a new multi binding object can be created. This object
|
|
6
|
+
* should then be passed to a overridable configuration-function (i.e. configure(binding:V)=>void). This gives subclasses of the
|
|
7
|
+
* `GLSPModule` the chance to manipulate the binding configuration using the provided manipulation methods (e.g. add,remove, rebind).
|
|
8
|
+
* Once the configuration is finished the binding can be finalized using the {@link AbstractMultiBinding.applyBindings} method.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class AbstractMultiBinding<T> {
|
|
11
|
+
readonly identifier: string | symbol;
|
|
12
|
+
protected bindings: T[];
|
|
13
|
+
constructor(identifier: string | symbol);
|
|
14
|
+
abstract applyBindings(context: ModuleContext): void;
|
|
15
|
+
add(newBinding: T): void;
|
|
16
|
+
addAll(newBindings: T[]): void;
|
|
17
|
+
addAll(...newBindings: T[]): void;
|
|
18
|
+
remove(toRemove: T): void;
|
|
19
|
+
removeAll(toRemove: T[]): void;
|
|
20
|
+
rebind(oldBinding: T, newBinding: T): void;
|
|
21
|
+
contains(binding: T): boolean;
|
|
22
|
+
getAll(): T[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Implementation of {@link AbstractMultiBinding} for multi-injected values that using an arbitrary {@link BindingTarget}.
|
|
26
|
+
*
|
|
27
|
+
* @typeparam T the base type of {@link BindingTarget}.
|
|
28
|
+
*/
|
|
29
|
+
export declare class MultiBinding<T> extends AbstractMultiBinding<BindingTarget<T>> {
|
|
30
|
+
applyBindings(context: ModuleContext): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Implementation of {@link AbstractMultiBinding} for multi-injected values that should be bound to concrete instance using the
|
|
34
|
+
* `bind(serviceIdentifier).toConstantValue(MyCustomBinding) syntax.
|
|
35
|
+
*
|
|
36
|
+
* * @typeparam T the type of the instances
|
|
37
|
+
*/
|
|
38
|
+
export declare class InstanceMultiBinding<T> extends AbstractMultiBinding<T> {
|
|
39
|
+
applyBindings(context: ModuleContext): void;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=multi-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|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
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstanceMultiBinding = exports.MultiBinding = exports.AbstractMultiBinding = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
const binding_target_1 = require("./binding-target");
|
|
21
|
+
/**
|
|
22
|
+
* A helper class used in `GLSPModules` to ease the configuration of multi-injected service identifiers.
|
|
23
|
+
* Instead of directly binding to the service identifier a new multi binding object can be created. This object
|
|
24
|
+
* should then be passed to a overridable configuration-function (i.e. configure(binding:V)=>void). This gives subclasses of the
|
|
25
|
+
* `GLSPModule` the chance to manipulate the binding configuration using the provided manipulation methods (e.g. add,remove, rebind).
|
|
26
|
+
* Once the configuration is finished the binding can be finalized using the {@link AbstractMultiBinding.applyBindings} method.
|
|
27
|
+
*/
|
|
28
|
+
class AbstractMultiBinding {
|
|
29
|
+
constructor(identifier) {
|
|
30
|
+
this.identifier = identifier;
|
|
31
|
+
this.bindings = [];
|
|
32
|
+
}
|
|
33
|
+
add(newBinding) {
|
|
34
|
+
(0, protocol_1.distinctAdd)(this.bindings, newBinding);
|
|
35
|
+
}
|
|
36
|
+
addAll(...newBindings) {
|
|
37
|
+
const result = [];
|
|
38
|
+
(0, protocol_1.flatPush)(result, newBindings);
|
|
39
|
+
result.forEach(newBinding => this.add(newBinding));
|
|
40
|
+
}
|
|
41
|
+
remove(toRemove) {
|
|
42
|
+
(0, protocol_1.remove)(this.bindings, toRemove);
|
|
43
|
+
}
|
|
44
|
+
removeAll(toRemove) {
|
|
45
|
+
return toRemove.forEach(binding => this.remove(binding));
|
|
46
|
+
}
|
|
47
|
+
rebind(oldBinding, newBinding) {
|
|
48
|
+
this.remove(oldBinding);
|
|
49
|
+
this.add(newBinding);
|
|
50
|
+
}
|
|
51
|
+
contains(binding) {
|
|
52
|
+
return this.bindings.includes(binding);
|
|
53
|
+
}
|
|
54
|
+
getAll() {
|
|
55
|
+
return this.bindings;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.AbstractMultiBinding = AbstractMultiBinding;
|
|
59
|
+
/**
|
|
60
|
+
* Implementation of {@link AbstractMultiBinding} for multi-injected values that using an arbitrary {@link BindingTarget}.
|
|
61
|
+
*
|
|
62
|
+
* @typeparam T the base type of {@link BindingTarget}.
|
|
63
|
+
*/
|
|
64
|
+
class MultiBinding extends AbstractMultiBinding {
|
|
65
|
+
applyBindings(context) {
|
|
66
|
+
this.bindings.forEach(binding => (0, binding_target_1.applyBindingTarget)(context, this.identifier, binding));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.MultiBinding = MultiBinding;
|
|
70
|
+
/**
|
|
71
|
+
* Implementation of {@link AbstractMultiBinding} for multi-injected values that should be bound to concrete instance using the
|
|
72
|
+
* `bind(serviceIdentifier).toConstantValue(MyCustomBinding) syntax.
|
|
73
|
+
*
|
|
74
|
+
* * @typeparam T the type of the instances
|
|
75
|
+
*/
|
|
76
|
+
class InstanceMultiBinding extends AbstractMultiBinding {
|
|
77
|
+
applyBindings(context) {
|
|
78
|
+
context.bind(this.identifier).toConstantValue(this.bindings);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.InstanceMultiBinding = InstanceMultiBinding;
|
|
82
|
+
//# sourceMappingURL=multi-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-binding.js","sourceRoot":"","sources":["../../../src/common/di/multi-binding.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmF;AACnF,qDAAqE;AAGrE;;;;;;GAMG;AACH,MAAsB,oBAAoB;IAGtC,YAAqB,UAA2B;QAA3B,eAAU,GAAV,UAAU,CAAiB;QAFtC,aAAQ,GAAQ,EAAE,CAAC;IAEsB,CAAC;IAIpD,GAAG,CAAC,UAAa;QACb,IAAA,sBAAW,EAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC;IAID,MAAM,CAAC,GAAG,WAA4B;QAClC,MAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,IAAA,mBAAQ,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,QAAW;QACd,IAAA,iBAAM,EAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,CAAC,QAAa;QACnB,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CAAC,UAAa,EAAE,UAAa;QAC/B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,QAAQ,CAAC,OAAU;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;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