@eclipse-glsp/server 1.1.0-next.3d7585d.42 → 1.1.0-next.42963d6.55
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/lib/browser/di/app-module.d.ts +2 -7
- package/lib/browser/di/app-module.d.ts.map +1 -1
- package/lib/browser/di/app-module.js +5 -30
- package/lib/browser/di/app-module.js.map +1 -1
- package/lib/browser/index.d.ts +0 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +0 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/launch/worker-server-launcher.d.ts +11 -8
- package/lib/browser/launch/worker-server-launcher.d.ts.map +1 -1
- package/lib/browser/launch/worker-server-launcher.js +13 -21
- package/lib/browser/launch/worker-server-launcher.js.map +1 -1
- package/lib/common/actions/client-action-handler.d.ts +1 -2
- package/lib/common/actions/client-action-handler.d.ts.map +1 -1
- package/lib/common/actions/client-action-handler.js +17 -2
- package/lib/common/actions/client-action-handler.js.map +1 -1
- package/lib/common/command/command-stack.d.ts +60 -14
- package/lib/common/command/command-stack.d.ts.map +1 -1
- package/lib/common/command/command-stack.js +78 -24
- package/lib/common/command/command-stack.js.map +1 -1
- package/lib/common/command/command.d.ts +34 -7
- package/lib/common/command/command.d.ts.map +1 -1
- package/lib/common/command/command.js +73 -0
- package/lib/common/command/command.js.map +1 -1
- 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/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/client-session-module.d.ts +1 -1
- package/lib/common/di/client-session-module.d.ts.map +1 -1
- package/lib/common/di/client-session-module.js +2 -2
- package/lib/common/di/client-session-module.js.map +1 -1
- package/lib/common/di/diagram-module.d.ts +3 -0
- package/lib/common/di/diagram-module.d.ts.map +1 -1
- package/lib/common/di/diagram-module.js +12 -0
- package/lib/common/di/diagram-module.js.map +1 -1
- package/lib/common/di/glsp-module.d.ts +3 -1
- package/lib/common/di/glsp-module.d.ts.map +1 -1
- package/lib/common/di/glsp-module.js +0 -15
- package/lib/common/di/glsp-module.js.map +1 -1
- package/lib/common/di/multi-binding.d.ts +19 -4
- package/lib/common/di/multi-binding.d.ts.map +1 -1
- package/lib/common/di/multi-binding.js.map +1 -1
- package/lib/common/di/server-module.d.ts +1 -6
- package/lib/common/di/server-module.d.ts.map +1 -1
- package/lib/common/di/server-module.js +21 -17
- package/lib/common/di/server-module.js.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.js +2 -4
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
- package/lib/common/{gmodel → features/layout}/computed-bounds-action-handler.d.ts +8 -3
- package/lib/common/features/layout/computed-bounds-action-handler.d.ts.map +1 -0
- package/lib/common/{gmodel → features/layout}/computed-bounds-action-handler.js +9 -4
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -0
- package/lib/common/features/layout/layout-operation-handler.d.ts +12 -3
- package/lib/common/features/layout/layout-operation-handler.d.ts.map +1 -1
- package/lib/common/features/layout/layout-operation-handler.js +26 -10
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
- package/lib/common/features/model/model-state.d.ts +0 -2
- package/lib/common/features/model/model-state.d.ts.map +1 -1
- package/lib/common/features/model/model-state.js +0 -1
- package/lib/common/features/model/model-state.js.map +1 -1
- package/lib/common/features/model/model-submission-handler.d.ts +2 -0
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +7 -2
- package/lib/common/features/model/model-submission-handler.js.map +1 -1
- package/lib/common/features/model/save-model-action-handler.d.ts +2 -2
- package/lib/common/features/model/save-model-action-handler.d.ts.map +1 -1
- package/lib/common/features/model/save-model-action-handler.js +5 -5
- package/lib/common/features/model/save-model-action-handler.js.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts +4 -5
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +12 -21
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts +9 -6
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js +14 -14
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts +5 -5
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js +11 -14
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
- package/lib/common/{operations → gmodel}/cut-operation-handler.d.ts +5 -4
- package/lib/common/gmodel/cut-operation-handler.d.ts.map +1 -0
- package/lib/common/{operations → gmodel}/cut-operation-handler.js +13 -11
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -0
- package/lib/common/gmodel/delete-operation-handler.d.ts +6 -6
- package/lib/common/gmodel/delete-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.js +13 -10
- package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts +11 -7
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +12 -13
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts +32 -5
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js +45 -3
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.d.ts +8 -8
- package/lib/common/gmodel/gmodel-diagram-module.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.js +15 -21
- package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
- package/lib/{node/launch/socket-server-launcher.spec.d.ts → common/gmodel/gmodel-operation-handler.d.ts} +9 -3
- package/lib/common/gmodel/gmodel-operation-handler.d.ts.map +1 -0
- package/lib/common/{protocol/glsp-client-proxy.js → gmodel/gmodel-operation-handler.js} +25 -35
- package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -0
- package/lib/common/gmodel/index.d.ts +2 -1
- package/lib/common/gmodel/index.d.ts.map +1 -1
- package/lib/common/gmodel/index.js +2 -1
- package/lib/common/gmodel/index.js.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.d.ts +7 -6
- package/lib/common/gmodel/paste-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.js +20 -15
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts +5 -5
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +11 -14
- package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
- package/lib/common/index.d.ts +5 -3
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +5 -3
- package/lib/common/index.js.map +1 -1
- package/lib/common/launch/glsp-server-launcher.d.ts +8 -7
- package/lib/common/launch/glsp-server-launcher.d.ts.map +1 -1
- package/lib/common/launch/glsp-server-launcher.js +27 -4
- package/lib/common/launch/glsp-server-launcher.js.map +1 -1
- package/lib/common/launch/jsonrpc-server-launcher.d.ts +38 -0
- package/lib/common/launch/jsonrpc-server-launcher.d.ts.map +1 -0
- package/lib/common/launch/jsonrpc-server-launcher.js +84 -0
- package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -0
- package/lib/common/operations/compound-operation-handler.d.ts +5 -5
- package/lib/common/operations/compound-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/compound-operation-handler.js +37 -9
- package/lib/common/operations/compound-operation-handler.js.map +1 -1
- package/lib/common/operations/create-operation-handler.d.ts +8 -40
- package/lib/common/operations/create-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/create-operation-handler.js +26 -85
- package/lib/common/operations/create-operation-handler.js.map +1 -1
- package/lib/common/operations/operation-action-handler.d.ts +10 -1
- package/lib/common/operations/operation-action-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-action-handler.js +37 -22
- package/lib/common/operations/operation-action-handler.js.map +1 -1
- package/lib/common/operations/operation-handler-registry.d.ts +11 -2
- package/lib/common/operations/operation-handler-registry.d.ts.map +1 -1
- package/lib/common/operations/operation-handler-registry.js +31 -2
- package/lib/common/operations/operation-handler-registry.js.map +1 -1
- package/lib/common/operations/operation-handler.d.ts +28 -11
- package/lib/common/operations/operation-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-handler.js +50 -1
- package/lib/common/operations/operation-handler.js.map +1 -1
- package/lib/common/protocol/glsp-server.d.ts +4 -104
- package/lib/common/protocol/glsp-server.d.ts.map +1 -1
- package/lib/common/protocol/glsp-server.js +13 -20
- package/lib/common/protocol/glsp-server.js.map +1 -1
- package/lib/common/session/client-session-factory.d.ts +1 -2
- package/lib/common/session/client-session-factory.d.ts.map +1 -1
- package/lib/common/session/client-session-factory.js +17 -2
- package/lib/common/session/client-session-factory.js.map +1 -1
- package/lib/common/session/client-session-manager.d.ts +1 -3
- package/lib/common/session/client-session-manager.d.ts.map +1 -1
- package/lib/common/session/client-session-manager.js.map +1 -1
- package/lib/{browser/di → common/utils}/console-logger.d.ts +7 -1
- package/lib/common/utils/console-logger.d.ts.map +1 -0
- package/lib/{browser/di → common/utils}/console-logger.js +26 -8
- package/lib/common/utils/console-logger.js.map +1 -0
- package/lib/common/utils/layout-util.d.ts +1 -1
- package/lib/common/utils/layout-util.d.ts.map +1 -1
- package/lib/common/utils/layout-util.js +3 -3
- package/lib/common/utils/layout-util.js.map +1 -1
- package/lib/common/utils/logger.d.ts +21 -0
- package/lib/common/utils/logger.d.ts.map +1 -1
- package/lib/common/utils/logger.js +12 -1
- package/lib/common/utils/logger.js.map +1 -1
- package/lib/node/di/app-module.d.ts +2 -2
- package/lib/node/di/app-module.d.ts.map +1 -1
- package/lib/node/di/app-module.js +10 -35
- package/lib/node/di/app-module.js.map +1 -1
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +1 -0
- package/lib/node/index.js.map +1 -1
- package/lib/node/launch/cli-parser.d.ts +2 -3
- package/lib/node/launch/cli-parser.d.ts.map +1 -1
- package/lib/node/launch/cli-parser.js.map +1 -1
- package/lib/node/launch/socket-cli-parser.js +1 -1
- package/lib/node/launch/socket-cli-parser.js.map +1 -1
- package/lib/node/launch/socket-server-launcher.d.ts +4 -24
- package/lib/node/launch/socket-server-launcher.d.ts.map +1 -1
- package/lib/node/launch/socket-server-launcher.js +15 -34
- package/lib/node/launch/socket-server-launcher.js.map +1 -1
- package/lib/node/launch/websocket-server-launcher.d.ts +53 -0
- package/lib/node/launch/websocket-server-launcher.d.ts.map +1 -0
- package/lib/node/launch/websocket-server-launcher.js +121 -0
- package/lib/node/launch/websocket-server-launcher.js.map +1 -0
- package/package.json +8 -5
- package/src/browser/di/app-module.ts +4 -32
- package/src/browser/index.ts +0 -1
- package/src/browser/launch/worker-server-launcher.ts +20 -22
- package/src/common/actions/client-action-handler.ts +1 -2
- package/src/common/command/command-stack.spec.ts +239 -0
- package/src/common/command/command-stack.ts +106 -20
- package/src/common/command/command.spec.ts +92 -0
- package/src/common/command/command.ts +96 -7
- 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/client-session-module.ts +1 -1
- package/src/common/di/diagram-module.ts +13 -0
- package/src/common/di/glsp-module.ts +3 -1
- package/src/common/di/multi-binding.ts +4 -5
- package/src/common/di/server-module.ts +6 -21
- package/src/common/features/contextactions/tool-palette-item-provider.ts +2 -4
- package/src/common/{gmodel → features/layout}/computed-bounds-action-handler.ts +10 -5
- package/src/common/features/layout/layout-operation-handler.ts +26 -11
- package/src/common/features/model/model-state.ts +0 -3
- package/src/common/features/model/model-submission-handler.ts +6 -2
- package/src/common/features/model/save-model-action-handler.ts +5 -6
- package/src/common/gmodel/apply-label-edit-operation-handler.ts +13 -15
- package/src/common/gmodel/change-bounds-operation-handler.ts +12 -8
- package/src/common/gmodel/change-routing-points-operation-handler.ts +8 -7
- package/src/common/{operations → gmodel}/cut-operation-handler.ts +9 -8
- package/src/common/gmodel/delete-operation-handler.ts +16 -10
- package/src/common/gmodel/gmodel-create-edge-operation-handler.ts +16 -10
- package/src/common/gmodel/gmodel-create-node-operation-handler.ts +54 -6
- package/src/common/gmodel/gmodel-diagram-module.ts +22 -27
- package/src/common/gmodel/gmodel-operation-handler.ts +31 -0
- package/src/common/gmodel/index.ts +2 -1
- package/src/common/gmodel/paste-operation-handler.ts +19 -11
- package/src/common/gmodel/reconnect-edge-operation-handler.ts +8 -7
- package/src/common/index.ts +5 -3
- package/src/common/launch/glsp-server-launcher.ts +15 -9
- package/src/common/launch/jsonrpc-server-launcher.ts +95 -0
- package/src/common/operations/compound-operation-handler.ts +14 -12
- package/src/common/operations/create-operation-handler.ts +17 -74
- package/src/common/operations/operation-action-handler.ts +51 -27
- package/src/common/operations/operation-handler-registry.ts +18 -3
- package/src/common/operations/operation-handler.ts +38 -13
- package/src/common/protocol/glsp-server.spec.ts +7 -4
- package/src/common/protocol/glsp-server.ts +17 -132
- package/src/common/session/client-session-factory.spec.ts +1 -1
- package/src/common/session/client-session-factory.ts +1 -2
- package/src/common/session/client-session-manager.ts +1 -3
- package/src/common/test/mock-util.ts +47 -41
- package/src/{browser/di → common/utils}/console-logger.ts +19 -1
- package/src/common/utils/layout-util.ts +1 -1
- package/src/common/utils/logger.ts +16 -1
- package/src/node/di/app-module.ts +4 -13
- package/src/node/index.ts +1 -0
- package/src/node/launch/cli-parser.ts +2 -3
- package/src/node/launch/socket-cli-parser.ts +1 -1
- package/src/node/launch/socket-server-launcher.spec.ts +6 -0
- package/src/node/launch/socket-server-launcher.ts +19 -35
- package/src/node/launch/websocket-server-launcher.ts +138 -0
- package/lib/browser/di/console-logger.d.ts.map +0 -1
- package/lib/browser/di/console-logger.js.map +0 -1
- package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
- package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
- package/lib/common/actions/action-dispatcher.spec.js +0 -264
- package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
- package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
- package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
- package/lib/common/actions/action-handler-registry.spec.js +0 -50
- package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
- package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
- package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
- package/lib/common/actions/global-action-provider.spec.js +0 -70
- package/lib/common/actions/global-action-provider.spec.js.map +0 -1
- package/lib/common/di/binding-target.spec.d.ts +0 -2
- package/lib/common/di/binding-target.spec.d.ts.map +0 -1
- package/lib/common/di/binding-target.spec.js +0 -121
- package/lib/common/di/binding-target.spec.js.map +0 -1
- package/lib/common/di/multi-bindings.spec.d.ts +0 -2
- package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
- package/lib/common/di/multi-bindings.spec.js +0 -137
- package/lib/common/di/multi-bindings.spec.js.map +0 -1
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
- package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
- package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
- package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
- package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
- package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
- package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
- package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
- package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
- package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
- package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
- package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
- package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
- package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
- package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
- package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.d.ts +0 -2
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.d.ts.map +0 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.js +0 -38
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.js.map +0 -1
- package/lib/common/gmodel/computed-bounds-action-handler.d.ts.map +0 -1
- package/lib/common/gmodel/computed-bounds-action-handler.js.map +0 -1
- package/lib/common/operations/cut-operation-handler.d.ts.map +0 -1
- package/lib/common/operations/cut-operation-handler.js.map +0 -1
- package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
- package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
- package/lib/common/operations/operation-handler-registry.spec.js +0 -50
- package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
- package/lib/common/protocol/glsp-client-proxy.d.ts +0 -45
- package/lib/common/protocol/glsp-client-proxy.d.ts.map +0 -1
- package/lib/common/protocol/glsp-client-proxy.js.map +0 -1
- package/lib/common/protocol/glsp-server-listener.d.ts +0 -37
- package/lib/common/protocol/glsp-server-listener.d.ts.map +0 -1
- package/lib/common/protocol/glsp-server-listener.js +0 -5
- package/lib/common/protocol/glsp-server-listener.js.map +0 -1
- package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
- package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
- package/lib/common/protocol/glsp-server.spec.js +0 -119
- package/lib/common/protocol/glsp-server.spec.js.map +0 -1
- package/lib/common/session/client-session-factory.spec.d.ts +0 -2
- package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
- package/lib/common/session/client-session-factory.spec.js +0 -56
- package/lib/common/session/client-session-factory.spec.js.map +0 -1
- package/lib/common/session/client-session-manager.spec.d.ts +0 -2
- package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
- package/lib/common/session/client-session-manager.spec.js +0 -74
- package/lib/common/session/client-session-manager.spec.js.map +0 -1
- package/lib/common/test/mock-util.d.ts +0 -110
- package/lib/common/test/mock-util.d.ts.map +0 -1
- package/lib/common/test/mock-util.js +0 -211
- package/lib/common/test/mock-util.js.map +0 -1
- package/lib/common/utils/promise-queue.spec.d.ts +0 -2
- package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
- package/lib/common/utils/promise-queue.spec.js +0 -117
- package/lib/common/utils/promise-queue.spec.js.map +0 -1
- package/lib/common/utils/registry.spec.d.ts +0 -2
- package/lib/common/utils/registry.spec.d.ts.map +0 -1
- package/lib/common/utils/registry.spec.js +0 -199
- package/lib/common/utils/registry.spec.js.map +0 -1
- package/lib/node/launch/cli-parser.spec.d.ts +0 -2
- package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
- package/lib/node/launch/cli-parser.spec.js +0 -56
- package/lib/node/launch/cli-parser.spec.js.map +0 -1
- package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
- package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
- package/lib/node/launch/socket-cli-parser.spec.js +0 -66
- package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
- package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
- package/lib/node/launch/socket-server-launcher.spec.js +0 -70
- package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
- package/src/common/gmodel/apply-label-edit-operation-handler.spec.ts +0 -40
- package/src/common/protocol/glsp-client-proxy.ts +0 -65
- package/src/common/protocol/glsp-server-listener.ts +0 -39
|
@@ -14,11 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { ContainerModule } from 'inversify';
|
|
17
|
-
import {
|
|
18
|
-
export
|
|
19
|
-
consoleLog?: boolean;
|
|
20
|
-
logLevel?: LogLevel;
|
|
21
|
-
}
|
|
22
|
-
export declare function createAppModule(options?: LaunchOptions): ContainerModule;
|
|
23
|
-
export declare function configureConsoleLogger<T extends LaunchOptions>(context: ModuleContext, options: T): void;
|
|
17
|
+
import { LoggerConfigOptions } from '../../common/';
|
|
18
|
+
export declare function createAppModule(options?: LoggerConfigOptions): ContainerModule;
|
|
24
19
|
//# sourceMappingURL=app-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-module.d.ts","sourceRoot":"","sources":["../../../src/browser/di/app-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"app-module.d.ts","sourceRoot":"","sources":["../../../src/browser/di/app-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAgC,mBAAmB,EAA0B,MAAM,eAAe,CAAC;AAE1G,wBAAgB,eAAe,CAAC,OAAO,GAAE,mBAAwB,GAAG,eAAe,CAOlF"}
|
|
@@ -15,41 +15,16 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.createAppModule = void 0;
|
|
19
19
|
const inversify_1 = require("inversify");
|
|
20
|
-
const
|
|
21
|
-
const console_logger_1 = require("./console-logger");
|
|
20
|
+
const common_1 = require("../../common/");
|
|
22
21
|
function createAppModule(options = {}) {
|
|
23
|
-
const resolvedOptions = Object.assign({ consoleLog: true, logLevel:
|
|
22
|
+
const resolvedOptions = Object.assign({ consoleLog: true, logLevel: common_1.LogLevel.info }, options);
|
|
24
23
|
return new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
25
|
-
bind(
|
|
24
|
+
bind(common_1.InjectionContainer).toDynamicValue(dynamicContext => dynamicContext.container);
|
|
26
25
|
const context = { bind, unbind, isBound, rebind };
|
|
27
|
-
configureConsoleLogger(context, resolvedOptions);
|
|
26
|
+
(0, common_1.configureConsoleLogger)(context, resolvedOptions);
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
exports.createAppModule = createAppModule;
|
|
31
|
-
function configureConsoleLogger(context, options) {
|
|
32
|
-
if (!options.consoleLog) {
|
|
33
|
-
context.bind(index_1.Logger).to(index_1.NullLogger).inSingletonScope();
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
context.bind(index_1.Logger).toDynamicValue(ctx => new console_logger_1.ConsoleLogger(options.logLevel, getRequestParentName(ctx)));
|
|
37
|
-
}
|
|
38
|
-
context.bind(index_1.LoggerFactory).toFactory(dynamicContext => (caller) => {
|
|
39
|
-
const logger = dynamicContext.container.get(index_1.Logger);
|
|
40
|
-
logger.caller = caller;
|
|
41
|
-
return logger;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.configureConsoleLogger = configureConsoleLogger;
|
|
45
|
-
function getRequestParentName(context) {
|
|
46
|
-
var _a;
|
|
47
|
-
if (context.currentRequest.parentRequest) {
|
|
48
|
-
const bindings = context.currentRequest.parentRequest.bindings;
|
|
49
|
-
if (bindings.length > 0) {
|
|
50
|
-
return (_a = bindings[0].implementationType) === null || _a === void 0 ? void 0 : _a.name;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|
|
55
30
|
//# sourceMappingURL=app-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-module.js","sourceRoot":"","sources":["../../../src/browser/di/app-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,
|
|
1
|
+
{"version":3,"file":"app-module.js","sourceRoot":"","sources":["../../../src/browser/di/app-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAA4C;AAC5C,0CAA0G;AAE1G,SAAgB,eAAe,CAAC,UAA+B,EAAE;IAC7D,MAAM,eAAe,mBAA0B,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAQ,CAAC,IAAI,IAAK,OAAO,CAAE,CAAC;IACvG,OAAO,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;QACzD,IAAI,CAAC,2BAAkB,CAAC,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACpF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAClD,IAAA,+BAAsB,EAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACP,CAAC;AAPD,0CAOC"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -15,6 +15,5 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
export * from '../common/index';
|
|
17
17
|
export * from './di/app-module';
|
|
18
|
-
export * from './di/console-logger';
|
|
19
18
|
export * from './launch/worker-server-launcher';
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC"}
|
package/lib/browser/index.js
CHANGED
|
@@ -31,6 +31,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
********************************************************************************/
|
|
32
32
|
__exportStar(require("../common/index"), exports);
|
|
33
33
|
__exportStar(require("./di/app-module"), exports);
|
|
34
|
-
__exportStar(require("./di/console-logger"), exports);
|
|
35
34
|
__exportStar(require("./launch/worker-server-launcher"), exports);
|
|
36
35
|
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,kDAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,kDAAgC;AAChC,kEAAgD"}
|
|
@@ -13,14 +13,17 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Container } from 'inversify';
|
|
17
16
|
import * as jsonrpc from 'vscode-jsonrpc/browser';
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
import { MaybePromise } from '../../common/index';
|
|
18
|
+
import { JsonRpcGLSPServerLauncher, JsonRpcServerInstance } from '../../common/launch/jsonrpc-server-launcher';
|
|
19
|
+
export interface WorkerLaunchOptions {
|
|
20
|
+
context?: Worker;
|
|
21
|
+
}
|
|
22
|
+
export declare const START_UP_COMPLETE_MSG = "[GLSP-Server]:Startup completed.";
|
|
23
|
+
export declare class WorkerServerLauncher extends JsonRpcGLSPServerLauncher<WorkerLaunchOptions> {
|
|
24
|
+
protected connection?: jsonrpc.MessageConnection;
|
|
25
|
+
protected run(options: WorkerLaunchOptions): MaybePromise<void>;
|
|
26
|
+
protected disposeServerInstance(instance: JsonRpcServerInstance): void;
|
|
27
|
+
protected createConnection(options: WorkerLaunchOptions): jsonrpc.MessageConnection;
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=worker-server-launcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-server-launcher.d.ts","sourceRoot":"","sources":["../../../src/browser/launch/worker-server-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;
|
|
1
|
+
{"version":3,"file":"worker-server-launcher.d.ts","sourceRoot":"","sources":["../../../src/browser/launch/worker-server-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAC/G,MAAM,WAAW,mBAAmB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AAExE,qBACa,oBAAqB,SAAQ,yBAAyB,CAAC,mBAAmB,CAAC;IACpF,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;IAEjD,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAAC,IAAI,CAAC;cAc5C,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAK/E,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB;CAMtF"}
|
|
@@ -21,41 +21,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
21
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.WorkerServerLauncher = void 0;
|
|
24
|
+
exports.WorkerServerLauncher = exports.START_UP_COMPLETE_MSG = void 0;
|
|
25
25
|
const inversify_1 = require("inversify");
|
|
26
26
|
const jsonrpc = require("vscode-jsonrpc/browser");
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const jsonrpc_server_launcher_1 = require("../../common/launch/jsonrpc-server-launcher");
|
|
28
|
+
exports.START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed.';
|
|
29
|
+
let WorkerServerLauncher = class WorkerServerLauncher extends jsonrpc_server_launcher_1.JsonRpcGLSPServerLauncher {
|
|
30
|
+
run(options) {
|
|
30
31
|
if (this.connection) {
|
|
31
32
|
throw new Error('Error during launch. Server already has an active client connection');
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
const glspServer = container.get(index_1.JsonRpcGLSPServer);
|
|
36
|
-
glspServer.connect(this.connection);
|
|
37
|
-
this.connection.onDispose(() => this.disposeClientConnection(container, glspServer));
|
|
34
|
+
this.connection = this.createConnection(options);
|
|
35
|
+
this.createServerInstance(this.connection);
|
|
38
36
|
this.logger.info('GLSP server worker connection established');
|
|
39
|
-
|
|
40
|
-
postMessage(index_1.START_UP_COMPLETE_MSG);
|
|
37
|
+
postMessage(exports.START_UP_COMPLETE_MSG);
|
|
41
38
|
return new Promise((resolve, rejects) => {
|
|
42
39
|
var _a, _b;
|
|
43
40
|
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.onClose(() => resolve(undefined));
|
|
44
41
|
(_b = this.connection) === null || _b === void 0 ? void 0 : _b.onError(error => rejects(error));
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
container.unbindAll();
|
|
44
|
+
disposeServerInstance(instance) {
|
|
45
|
+
super.disposeServerInstance(instance);
|
|
50
46
|
this.connection = undefined;
|
|
51
47
|
}
|
|
52
|
-
|
|
53
|
-
var _a;
|
|
54
|
-
|
|
55
|
-
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
56
|
-
}
|
|
57
|
-
createConnection() {
|
|
58
|
-
return jsonrpc.createMessageConnection(new jsonrpc.BrowserMessageReader(self), new jsonrpc.BrowserMessageWriter(self));
|
|
48
|
+
createConnection(options) {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
return jsonrpc.createMessageConnection(new jsonrpc.BrowserMessageReader((_a = options.context) !== null && _a !== void 0 ? _a : self), new jsonrpc.BrowserMessageWriter((_b = options.context) !== null && _b !== void 0 ? _b : self));
|
|
59
51
|
}
|
|
60
52
|
};
|
|
61
53
|
WorkerServerLauncher = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-server-launcher.js","sourceRoot":"","sources":["../../../src/browser/launch/worker-server-launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,
|
|
1
|
+
{"version":3,"file":"worker-server-launcher.js","sourceRoot":"","sources":["../../../src/browser/launch/worker-server-launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,yCAAuC;AACvC,kDAAkD;AAElD,yFAA+G;AAKlG,QAAA,qBAAqB,GAAG,kCAAkC,CAAC;AAGjE,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,mDAA8C;IAG1E,GAAG,CAAC,OAA4B;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;SAC1F;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC9D,WAAW,CAAC,6BAAqB,CAAC,CAAC;QACnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;;YACpC,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;YACnD,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACP,CAAC;IAEkB,qBAAqB,CAAC,QAA+B;QACpE,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAES,gBAAgB,CAAC,OAA4B;;QACnD,OAAO,OAAO,CAAC,uBAAuB,CAClC,IAAI,OAAO,CAAC,oBAAoB,CAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,IAAI,CAAC,EACzD,IAAI,OAAO,CAAC,oBAAoB,CAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,IAAI,CAAC,CAC5D,CAAC;IACN,CAAC;CACJ,CAAA;AA5BY,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA4BhC;AA5BY,oDAAoB"}
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Action } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { GLSPClientProxy } from '../protocol/glsp-client-proxy';
|
|
16
|
+
import { Action, GLSPClientProxy } from '@eclipse-glsp/protocol';
|
|
18
17
|
/**
|
|
19
18
|
* The client action handler is responsible of handling action kinds that are intended for the
|
|
20
19
|
* GLSP client, by sending them to the client over json-rpc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-action-handler.d.ts","sourceRoot":"","sources":["../../../src/common/actions/client-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAiB,
|
|
1
|
+
{"version":3,"file":"client-action-handler.d.ts","sourceRoot":"","sources":["../../../src/common/actions/client-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAiB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIhF;;;GAGG;AAEH,qBACa,mBAAoB,YAAW,mBAAmB;IAQD,WAAW,EAAE,MAAM,EAAE;IAL/E,SAAS,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC;IAGvC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEsB,WAAW,GAAE,MAAM,EAAO;IAEpF,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE;IAK3B,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAQvC"}
|
|
@@ -13,9 +13,24 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ClientActionHandler = 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 protocol_1 = require("@eclipse-glsp/protocol");
|
|
16
32
|
const inversify_1 = require("inversify");
|
|
17
33
|
const service_identifiers_1 = require("../di/service-identifiers");
|
|
18
|
-
const glsp_client_proxy_1 = require("../protocol/glsp-client-proxy");
|
|
19
34
|
/**
|
|
20
35
|
* The client action handler is responsible of handling action kinds that are intended for the
|
|
21
36
|
* GLSP client, by sending them to the client over json-rpc.
|
|
@@ -38,7 +53,7 @@ let ClientActionHandler = class ClientActionHandler {
|
|
|
38
53
|
}
|
|
39
54
|
};
|
|
40
55
|
__decorate([
|
|
41
|
-
(0, inversify_1.inject)(
|
|
56
|
+
(0, inversify_1.inject)(protocol_1.GLSPClientProxy),
|
|
42
57
|
(0, inversify_1.optional)(),
|
|
43
58
|
__metadata("design:type", Object)
|
|
44
59
|
], ClientActionHandler.prototype, "glspClient", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-action-handler.js","sourceRoot":"","sources":["../../../src/common/actions/client-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"client-action-handler.js","sourceRoot":"","sources":["../../../src/common/actions/client-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAgF;AAChF,yCAAyD;AACzD,mEAAwE;AAExE;;;GAGG;AAGI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAQ5B,YAA0D,cAAwB,EAAE;QAA1B,gBAAW,GAAX,WAAW,CAAe;IAAG,CAAC;IAExF,OAAO,CAAC,MAAc;QAClB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,OAAO,EAAE,CAAC;IACd,CAAC;IAES,IAAI,CAAC,MAAc;QACzB,MAAM,OAAO,GAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnE,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjC,OAAO;SACV;QACD,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACvF,CAAC;CACJ,CAAA;AAtBG;IAAC,IAAA,kBAAM,EAAC,0BAAe,CAAC;IACvB,IAAA,oBAAQ,GAAE;;uDAC4B;AAEvC;IAAC,IAAA,kBAAM,EAAC,8BAAQ,CAAC;;qDACmB;AAN3B,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;IASI,WAAA,IAAA,kBAAM,EAAC,uCAAiB,CAAC,CAAA;IAAE,WAAA,IAAA,oBAAQ,GAAE,CAAA;;GARzC,mBAAmB,CAuB/B;AAvBY,kDAAmB"}
|
|
@@ -1,37 +1,83 @@
|
|
|
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 { MaybePromise } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { Logger } from '../utils/logger';
|
|
1
18
|
import { Command } from './command';
|
|
2
19
|
export declare const CommandStack: unique symbol;
|
|
3
20
|
/**
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
21
|
+
* A command stack keeps track of {@link Command commands} that have been executed.
|
|
22
|
+
* Executed commands can be undone in the reverse order of their original execution.
|
|
23
|
+
* Unless a new command has been executed after an undo operation, commands can be
|
|
24
|
+
* redone in the original order of their execution.
|
|
25
|
+
*
|
|
6
26
|
*/
|
|
7
27
|
export interface CommandStack {
|
|
8
28
|
/**
|
|
9
|
-
* Clears any redoable commands not yet redone, adds the command
|
|
29
|
+
* Clears any redoable commands not yet redone, adds the command to the stack and then invokes {@link Command.execute}.
|
|
10
30
|
* @param command the command to execute.
|
|
11
31
|
*/
|
|
12
|
-
execute(command: Command): void
|
|
32
|
+
execute(command: Command): MaybePromise<void>;
|
|
13
33
|
/**
|
|
14
|
-
*
|
|
34
|
+
* Removes the topmost (i.e. last executed) command from the stack and invokes {@link Command.undo}.
|
|
15
35
|
*/
|
|
16
|
-
undo(): void
|
|
36
|
+
undo(): MaybePromise<void>;
|
|
17
37
|
/**
|
|
18
|
-
*
|
|
38
|
+
* Returns `true` if the top command on the stack can be undone.
|
|
19
39
|
*/
|
|
20
|
-
|
|
40
|
+
canUndo(): boolean;
|
|
21
41
|
/**
|
|
22
|
-
*
|
|
42
|
+
* Re-adds the last undo command on top of the stack and invokes {@link Command.redo}
|
|
23
43
|
*/
|
|
24
|
-
|
|
44
|
+
redo(): MaybePromise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns `true` if there are redoable commands in the stack.
|
|
47
|
+
*/
|
|
48
|
+
canRedo(): boolean;
|
|
25
49
|
/**
|
|
26
50
|
* Called after a save has been successfully performed.
|
|
27
51
|
*/
|
|
28
52
|
saveIsDone(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates wether the command stack has unsaved changes.
|
|
55
|
+
*/
|
|
56
|
+
readonly isDirty: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Disposes all the commands in the stack.
|
|
59
|
+
*/
|
|
60
|
+
flush(): void;
|
|
29
61
|
}
|
|
30
62
|
export declare class DefaultCommandStack implements CommandStack {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
63
|
+
protected logger: Logger;
|
|
64
|
+
protected commands: Command[];
|
|
65
|
+
/**
|
|
66
|
+
* The current position within the command list from which the next execute, undo, or redo, will be performed.
|
|
67
|
+
*/
|
|
68
|
+
protected top: number;
|
|
69
|
+
/**
|
|
70
|
+
* The current position within the command list when {@link DefaultCommandStack.saveIsDone} is called.
|
|
71
|
+
*/
|
|
72
|
+
protected saveIndex: number;
|
|
73
|
+
execute(command: Command): Promise<void>;
|
|
74
|
+
undo(): Promise<void>;
|
|
75
|
+
canUndo(): boolean;
|
|
76
|
+
redo(): Promise<void>;
|
|
77
|
+
canRedo(): boolean;
|
|
78
|
+
get isDirty(): boolean;
|
|
35
79
|
saveIsDone(): void;
|
|
80
|
+
flush(): void;
|
|
81
|
+
protected handleError(error: any): never;
|
|
36
82
|
}
|
|
37
83
|
//# sourceMappingURL=command-stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-stack.d.ts","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-stack.d.ts","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,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,YAAY,CAAC,IAAI,CAAC,CAAC;IAE9C;;OAEG;IACH,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAE3B;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAE3B;;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;IAEnB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBxC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B,OAAO,IAAI,OAAO;IAMZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B,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"}
|
|
@@ -5,42 +5,96 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.DefaultCommandStack = exports.CommandStack = void 0;
|
|
10
|
-
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
12
|
-
*
|
|
13
|
-
* This program and the accompanying materials are made available under the
|
|
14
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
15
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
16
|
-
*
|
|
17
|
-
* This Source Code may also be made available under the following Secondary
|
|
18
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
19
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
20
|
-
* with the GNU Classpath Exception which is available at
|
|
21
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
22
|
-
*
|
|
23
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
|
-
********************************************************************************/
|
|
25
13
|
const inversify_1 = require("inversify");
|
|
14
|
+
const logger_1 = require("../utils/logger");
|
|
15
|
+
const command_1 = require("./command");
|
|
26
16
|
exports.CommandStack = Symbol('CommandStack');
|
|
27
17
|
let DefaultCommandStack = class DefaultCommandStack {
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
constructor() {
|
|
19
|
+
this.commands = [];
|
|
20
|
+
/**
|
|
21
|
+
* The current position within the command list from which the next execute, undo, or redo, will be performed.
|
|
22
|
+
*/
|
|
23
|
+
this.top = -1;
|
|
24
|
+
/**
|
|
25
|
+
* The current position within the command list when {@link DefaultCommandStack.saveIsDone} is called.
|
|
26
|
+
*/
|
|
27
|
+
this.saveIndex = -1;
|
|
28
|
+
}
|
|
29
|
+
async execute(command) {
|
|
30
|
+
try {
|
|
31
|
+
await command.execute();
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
this.handleError(error);
|
|
35
|
+
}
|
|
36
|
+
// Clear the command list past the top (i.e. the old redo list)
|
|
37
|
+
this.commands = this.commands.slice(0, this.top + 1);
|
|
38
|
+
this.commands.push(command);
|
|
39
|
+
++this.top;
|
|
40
|
+
// if the saveIndex points to the old redo list we can never reach a state again
|
|
41
|
+
// where save is not necessary. => ensure that `isDirty` always returns true
|
|
42
|
+
if (this.saveIndex >= this.top) {
|
|
43
|
+
this.saveIndex = -2;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async undo() {
|
|
47
|
+
if (this.canUndo()) {
|
|
48
|
+
const command = this.commands[this.top--];
|
|
49
|
+
try {
|
|
50
|
+
await command.undo();
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
this.handleError(error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
30
56
|
}
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
canUndo() {
|
|
58
|
+
return this.top !== -1 //
|
|
59
|
+
? command_1.Command.canUndo(this.commands[this.top])
|
|
60
|
+
: false;
|
|
33
61
|
}
|
|
34
|
-
redo() {
|
|
35
|
-
|
|
62
|
+
async redo() {
|
|
63
|
+
if (this.canRedo()) {
|
|
64
|
+
const command = this.commands[++this.top];
|
|
65
|
+
try {
|
|
66
|
+
await command.redo();
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
this.handleError(error);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
36
72
|
}
|
|
37
|
-
|
|
38
|
-
return
|
|
73
|
+
canRedo() {
|
|
74
|
+
return this.top < this.commands.length - 1;
|
|
75
|
+
}
|
|
76
|
+
get isDirty() {
|
|
77
|
+
return this.saveIndex !== this.top;
|
|
39
78
|
}
|
|
40
79
|
saveIsDone() {
|
|
41
|
-
|
|
80
|
+
this.saveIndex = this.top;
|
|
81
|
+
}
|
|
82
|
+
flush() {
|
|
83
|
+
this.commands = [];
|
|
84
|
+
this.top = -1;
|
|
85
|
+
this.saveIndex = -1;
|
|
86
|
+
}
|
|
87
|
+
handleError(error) {
|
|
88
|
+
// if an error occurred during the command execution the stack might be in an erroneous state => we have to flush the command stack
|
|
89
|
+
this.flush();
|
|
90
|
+
this.logger.error('An error occurred during command execution. CommandStack will be flushed!', error);
|
|
91
|
+
throw error;
|
|
42
92
|
}
|
|
43
93
|
};
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, inversify_1.inject)(logger_1.Logger),
|
|
96
|
+
__metadata("design:type", logger_1.Logger)
|
|
97
|
+
], DefaultCommandStack.prototype, "logger", void 0);
|
|
44
98
|
DefaultCommandStack = __decorate([
|
|
45
99
|
(0, inversify_1.injectable)()
|
|
46
100
|
], DefaultCommandStack);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-stack.js","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-stack.js","sourceRoot":"","sources":["../../../src/common/command/command-stack.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,yCAA+C;AAC/C,4CAAyC;AACzC,uCAAoC;AAEvB,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAqD5C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QAIO,aAAQ,GAAc,EAAE,CAAC;QAEnC;;WAEG;QACO,QAAG,GAAG,CAAC,CAAC,CAAC;QAEnB;;WAEG;QACO,cAAS,GAAG,CAAC,CAAC,CAAC;IAwE7B,CAAC;IAtEG,KAAK,CAAC,OAAO,CAAC,OAAgB;QAC1B,IAAI;YACA,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;SAC3B;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,+DAA+D;QAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,EAAE,IAAI,CAAC,GAAG,CAAC;QAEX,gFAAgF;QAChF,4EAA4E;QAC5E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;YAC5B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;SACvB;IACL,CAAC;IAED,KAAK,CAAC,IAAI;QACN,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;YAChB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YAC1C,IAAI;gBACA,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;aACxB;YAAC,OAAO,KAAK,EAAE;gBACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aAC3B;SACJ;IACL,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;YACrB,CAAC,CAAC,iBAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1C,CAAC,CAAC,KAAK,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,IAAI;QACN,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;YAChB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1C,IAAI;gBACA,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;aACxB;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"}
|
|
@@ -13,25 +13,52 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import { MaybePromise } from '@eclipse-glsp/protocol';
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
18
|
+
* A command implements a specific modification of the source model, which can be applied by invoking `execute()`.
|
|
19
|
+
* Commands may also provide implementations to `undo()` and `redo()` the effect they had.
|
|
20
|
+
* To maintain an order in which commands can be undone and redone, they are managed in the context of a {@link CommandStack}.
|
|
21
|
+
*
|
|
22
|
+
* Each command is self contained and stores all the information it needs to execute, undo or redo itself.
|
|
23
|
+
*
|
|
24
|
+
* In theory commands can be used to execute arbitrary activities and not only modify the source model.
|
|
25
|
+
* However, it is mostly used to record and manage changes made to the source model via GLSP operations.
|
|
19
26
|
*/
|
|
20
27
|
export interface Command {
|
|
21
28
|
/**
|
|
22
|
-
* Performs the command activity required for the effect.
|
|
29
|
+
* Performs the command activity required for the effect (e.g. source model change).
|
|
23
30
|
*/
|
|
24
|
-
execute(): void
|
|
31
|
+
execute(): MaybePromise<void>;
|
|
25
32
|
/**
|
|
26
33
|
* Performs the command activity required to `undo` the effects of a preceding `execute` (or `redo`).
|
|
27
34
|
* The effect, if any, of calling `undo` before `execute` or `redo` have been called, is undefined.
|
|
28
35
|
*/
|
|
29
|
-
undo(): void
|
|
36
|
+
undo(): MaybePromise<void>;
|
|
30
37
|
/**
|
|
31
38
|
* Performs the command activity required to `redo` the effect after undoing the effect.
|
|
32
39
|
* The effect, if any, of calling `redo` before `undo` is called is undefined.
|
|
33
|
-
* Note that if you implement `redo` to call `execute` then any derived class will be restricted by that decision also.
|
|
34
40
|
*/
|
|
35
|
-
redo(): void
|
|
41
|
+
redo(): MaybePromise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns whether the command can be undone.
|
|
44
|
+
* This function is optional. If not implemented, it is assumed that the command can be undone.
|
|
45
|
+
* @returns whether the command can be undone
|
|
46
|
+
*/
|
|
47
|
+
canUndo?(): boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare namespace Command {
|
|
50
|
+
function canUndo(command: Command): boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A command that comprises a sequence of subcommands.
|
|
54
|
+
*/
|
|
55
|
+
export declare class CompoundCommand implements Command {
|
|
56
|
+
protected readonly commands: Command[];
|
|
57
|
+
constructor(commands: Command[]);
|
|
58
|
+
constructor(...commands: Command[]);
|
|
59
|
+
execute(): Promise<void>;
|
|
60
|
+
undo(): Promise<void>;
|
|
61
|
+
redo(): Promise<void>;
|
|
62
|
+
canUndo(): boolean;
|
|
36
63
|
}
|
|
37
64
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/common/command/command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/common/command/command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAwB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAE9B;;;OAGG;IACH,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC;CACvB;AAED,yBAAiB,OAAO,CAAC;IACrB,SAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;CACJ;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,OAAO;IAC3C,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;gBAE3B,QAAQ,EAAE,OAAO,EAAE;gBACnB,GAAG,QAAQ,EAAE,OAAO,EAAE;IAM5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBxB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAerB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,OAAO,IAAI,OAAO;CAGrB"}
|