@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
|
@@ -1,5 +1,20 @@
|
|
|
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 { BindingContext } from '@eclipse-glsp/protocol';
|
|
1
17
|
import { BindingTarget } from './binding-target';
|
|
2
|
-
import { ModuleContext } from './glsp-module';
|
|
3
18
|
/**
|
|
4
19
|
* A helper class used in `GLSPModules` to ease the configuration of multi-injected service identifiers.
|
|
5
20
|
* Instead of directly binding to the service identifier a new multi binding object can be created. This object
|
|
@@ -11,7 +26,7 @@ export declare abstract class AbstractMultiBinding<T> {
|
|
|
11
26
|
readonly identifier: string | symbol;
|
|
12
27
|
protected bindings: T[];
|
|
13
28
|
constructor(identifier: string | symbol);
|
|
14
|
-
abstract applyBindings(context:
|
|
29
|
+
abstract applyBindings(context: BindingContext): void;
|
|
15
30
|
add(newBinding: T): void;
|
|
16
31
|
addAll(newBindings: T[]): void;
|
|
17
32
|
addAll(...newBindings: T[]): void;
|
|
@@ -27,7 +42,7 @@ export declare abstract class AbstractMultiBinding<T> {
|
|
|
27
42
|
* @typeparam T the base type of {@link BindingTarget}.
|
|
28
43
|
*/
|
|
29
44
|
export declare class MultiBinding<T> extends AbstractMultiBinding<BindingTarget<T>> {
|
|
30
|
-
applyBindings(context:
|
|
45
|
+
applyBindings(context: BindingContext): void;
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
48
|
* Implementation of {@link AbstractMultiBinding} for multi-injected values that should be bound to concrete instance using the
|
|
@@ -36,6 +51,6 @@ export declare class MultiBinding<T> extends AbstractMultiBinding<BindingTarget<
|
|
|
36
51
|
* * @typeparam T the type of the instances
|
|
37
52
|
*/
|
|
38
53
|
export declare class InstanceMultiBinding<T> extends AbstractMultiBinding<T> {
|
|
39
|
-
applyBindings(context:
|
|
54
|
+
applyBindings(context: BindingContext): void;
|
|
40
55
|
}
|
|
41
56
|
//# sourceMappingURL=multi-binding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-binding.d.ts","sourceRoot":"","sources":["../../../src/common/di/multi-binding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multi-binding.d.ts","sourceRoot":"","sources":["../../../src/common/di/multi-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,cAAc,EAA6C,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAsB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErE;;;;;;GAMG;AACH,8BAAsB,oBAAoB,CAAC,CAAC;IAG5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAFhD,SAAS,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAM;gBAER,UAAU,EAAE,MAAM,GAAG,MAAM;IAEhD,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAErD,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI;IAIxB,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,GAAG,IAAI;IAC9B,MAAM,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,GAAG,IAAI;IAOjC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI;IAIzB,SAAS,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,IAAI;IAI9B,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,IAAI;IAK1C,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO;IAI7B,MAAM,IAAI,CAAC,EAAE;CAGhB;AAED;;;;GAIG;AACH,qBAAa,YAAY,CAAC,CAAC,CAAE,SAAQ,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACvE,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAG/C;AAED;;;;;GAKG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IAChE,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAG/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-binding.js","sourceRoot":"","sources":["../../../src/common/di/multi-binding.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"multi-binding.js","sourceRoot":"","sources":["../../../src/common/di/multi-binding.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmG;AACnG,qDAAqE;AAErE;;;;;;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;IAED,MAAM;QACF,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;CACJ;AAvCD,oDAuCC;AAED;;;;GAIG;AACH,MAAa,YAAgB,SAAQ,oBAAsC;IACvE,aAAa,CAAC,OAAuB;QACjC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,IAAA,mCAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5F,CAAC;CACJ;AAJD,oCAIC;AAED;;;;;GAKG;AACH,MAAa,oBAAwB,SAAQ,oBAAuB;IAChE,aAAa,CAAC,OAAuB;QACjC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;CACJ;AAJD,oDAIC"}
|
|
@@ -13,11 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import { GLSPServer, GLSPServerListener } from '@eclipse-glsp/protocol';
|
|
16
17
|
import { ContainerModule, interfaces } from 'inversify';
|
|
17
18
|
import { GlobalActionProvider } from '../actions/global-action-provider';
|
|
18
|
-
import { GLSPClientProxy, JsonRpcGLSPClientProxy } from '../protocol/glsp-client-proxy';
|
|
19
|
-
import { GLSPServer, JsonRpcGLSPServer } from '../protocol/glsp-server';
|
|
20
|
-
import { GLSPServerListener } from '../protocol/glsp-server-listener';
|
|
21
19
|
import { ClientSessionFactory } from '../session/client-session-factory';
|
|
22
20
|
import { ClientSessionManager } from '../session/client-session-manager';
|
|
23
21
|
import { BindingTarget } from './binding-target';
|
|
@@ -61,13 +59,10 @@ export declare class ServerModule extends GLSPModule {
|
|
|
61
59
|
configure(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
|
|
62
60
|
protected bindDiagramModules(): BindingTarget<Map<string, ContainerModule[]>>;
|
|
63
61
|
protected bindGLSPServer(): BindingTarget<GLSPServer>;
|
|
64
|
-
protected bindJsonRpcGLSPServer(): BindingTarget<JsonRpcGLSPServer>;
|
|
65
62
|
protected bindClientSessionFactory(): BindingTarget<ClientSessionFactory>;
|
|
66
63
|
protected bindClientSessionManager(): BindingTarget<ClientSessionManager>;
|
|
67
64
|
protected bindGlobalActionProvider(): BindingTarget<GlobalActionProvider>;
|
|
68
65
|
protected bindInjectionContainer(): BindingTarget<interfaces.Container>;
|
|
69
|
-
protected bindGLSPClientProxy(): BindingTarget<GLSPClientProxy>;
|
|
70
|
-
protected bindJsonRpcGLSPClientProxy(): BindingTarget<JsonRpcGLSPClientProxy>;
|
|
71
66
|
protected configureGLSPServerListeners(binding: MultiBinding<GLSPServerListener>): void;
|
|
72
67
|
}
|
|
73
68
|
//# sourceMappingURL=server-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-module.d.ts","sourceRoot":"","sources":["../../../src/common/di/server-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server-module.d.ts","sourceRoot":"","sources":["../../../src/common/di/server-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAA+B,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEtG,OAAO,EAAE,oBAAoB,EAA+B,MAAM,mCAAmC,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAA+B,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2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServerModule = 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");
|
|
4
20
|
const global_action_provider_1 = require("../actions/global-action-provider");
|
|
5
|
-
const glsp_client_proxy_1 = require("../protocol/glsp-client-proxy");
|
|
6
21
|
const glsp_server_1 = require("../protocol/glsp-server");
|
|
7
|
-
const glsp_server_listener_1 = require("../protocol/glsp-server-listener");
|
|
8
22
|
const client_session_factory_1 = require("../session/client-session-factory");
|
|
9
23
|
const client_session_manager_1 = require("../session/client-session-manager");
|
|
10
24
|
const binding_target_1 = require("./binding-target");
|
|
@@ -57,15 +71,14 @@ class ServerModule extends glsp_module_1.GLSPModule {
|
|
|
57
71
|
configure(bind, unbind, isBound, rebind) {
|
|
58
72
|
const context = this.context;
|
|
59
73
|
(0, binding_target_1.applyBindingTarget)(context, service_identifiers_1.DiagramModules, this.bindDiagramModules());
|
|
60
|
-
(0, binding_target_1.applyBindingTarget)(context,
|
|
61
|
-
(0, binding_target_1.applyBindingTarget)(context, glsp_server_1.JsonRpcGLSPServer, this.bindJsonRpcGLSPServer());
|
|
74
|
+
(0, binding_target_1.applyBindingTarget)(context, protocol_1.GLSPServer, this.bindGLSPServer()).inSingletonScope();
|
|
62
75
|
(0, binding_target_1.applyBindingTarget)(context, client_session_factory_1.ClientSessionFactory, this.bindClientSessionFactory()).inSingletonScope();
|
|
63
76
|
(0, binding_target_1.applyBindingTarget)(context, client_session_manager_1.ClientSessionManager, this.bindClientSessionManager()).inSingletonScope();
|
|
64
|
-
this.configureMultiBinding(new multi_binding_1.MultiBinding(
|
|
77
|
+
this.configureMultiBinding(new multi_binding_1.MultiBinding(protocol_1.GLSPServerListener), binding => this.configureGLSPServerListeners(binding));
|
|
65
78
|
(0, binding_target_1.applyBindingTarget)(context, global_action_provider_1.GlobalActionProvider, this.bindGlobalActionProvider()).inSingletonScope();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
if (!isBound(service_identifiers_1.InjectionContainer)) {
|
|
80
|
+
(0, binding_target_1.applyBindingTarget)(context, service_identifiers_1.InjectionContainer, this.bindInjectionContainer());
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
bindDiagramModules() {
|
|
71
84
|
return { constantValue: this.diagramModules };
|
|
@@ -73,9 +86,6 @@ class ServerModule extends glsp_module_1.GLSPModule {
|
|
|
73
86
|
bindGLSPServer() {
|
|
74
87
|
return glsp_server_1.DefaultGLSPServer;
|
|
75
88
|
}
|
|
76
|
-
bindJsonRpcGLSPServer() {
|
|
77
|
-
return { service: glsp_server_1.GLSPServer };
|
|
78
|
-
}
|
|
79
89
|
bindClientSessionFactory() {
|
|
80
90
|
return client_session_factory_1.DefaultClientSessionFactory;
|
|
81
91
|
}
|
|
@@ -88,12 +98,6 @@ class ServerModule extends glsp_module_1.GLSPModule {
|
|
|
88
98
|
bindInjectionContainer() {
|
|
89
99
|
return { dynamicValue: context => context.container };
|
|
90
100
|
}
|
|
91
|
-
bindGLSPClientProxy() {
|
|
92
|
-
return glsp_client_proxy_1.DefaultGLSPClientProxy;
|
|
93
|
-
}
|
|
94
|
-
bindJsonRpcGLSPClientProxy() {
|
|
95
|
-
return { service: glsp_client_proxy_1.GLSPClientProxy };
|
|
96
|
-
}
|
|
97
101
|
configureGLSPServerListeners(binding) {
|
|
98
102
|
binding.add({ service: client_session_manager_1.ClientSessionManager });
|
|
99
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-module.js","sourceRoot":"","sources":["../../../src/common/di/server-module.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"server-module.js","sourceRoot":"","sources":["../../../src/common/di/server-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAwE;AAExE,8EAAsG;AACtG,yDAA4D;AAC5D,8EAAsG;AACtG,8EAAsG;AACtG,qDAAqE;AAErE,+CAA2C;AAC3C,mDAA+C;AAC/C,+DAA2E;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,YAAa,SAAQ,wBAAU;IAA5C;;QAEuB,mBAAc,GAAmC,IAAI,GAAG,EAAE,CAAC;IAmElF,CAAC;IAjEG;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,aAA4B,EAAE,GAAG,iBAAoC;QACxF,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC;QAC9C,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,gEAAgE,WAAW,GAAG,CAAC,CAAC;SACnG;QACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,SAAS,CAAC,IAAqB,EAAE,MAAyB,EAAE,OAA2B,EAAE,MAAyB;QAC9G,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAA,mCAAkB,EAAC,OAAO,EAAE,oCAAc,EAAE,IA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,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,6CAAoB,EAAE,CAAC,CAAC;IACnD,CAAC;;AApEL,oCAqEC;AApEiB,4BAAe,GAAG,iBAAiB,CAAC"}
|
|
@@ -43,7 +43,7 @@ export declare abstract class ToolPaletteItemProvider implements ContextActionsP
|
|
|
43
43
|
export declare class DefaultToolPaletteItemProvider extends ToolPaletteItemProvider {
|
|
44
44
|
operationHandlerRegistry: OperationHandlerRegistry;
|
|
45
45
|
protected counter: number;
|
|
46
|
-
getItems(
|
|
46
|
+
getItems(_args?: Args): PaletteItem[];
|
|
47
47
|
createPaletteItem(handlers: CreateOperationHandler[], kind: string): PaletteItem[];
|
|
48
48
|
create(action: PaletteItem.TriggerElementCreationAction, label: string): PaletteItem;
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-palette-item-provider.d.ts","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette-item-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,IAAI,EAGJ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;GAEG;AACH,8BACsB,uBAAwB,YAAW,sBAAsB;IAC3E;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;;OAKG;IACG,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAIxE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;CAC9D;AAED,qBACa,8BAA+B,SAAQ,uBAAuB;IACrC,wBAAwB,EAAE,wBAAwB,CAAC;IACrF,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"tool-palette-item-provider.d.ts","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette-item-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,IAAI,EAGJ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;GAEG;AACH,8BACsB,uBAAwB,YAAW,sBAAsB;IAC3E;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;;OAKG;IACG,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAIxE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;CAC9D;AAED,qBACa,8BAA+B,SAAQ,uBAAuB;IACrC,wBAAwB,EAAE,wBAAwB,CAAC;IACrF,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE;IAWrC,iBAAiB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE;IAQlF,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,4BAA4B,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW;CAGvF"}
|
|
@@ -54,10 +54,8 @@ ToolPaletteItemProvider = __decorate([
|
|
|
54
54
|
], ToolPaletteItemProvider);
|
|
55
55
|
exports.ToolPaletteItemProvider = ToolPaletteItemProvider;
|
|
56
56
|
let DefaultToolPaletteItemProvider = class DefaultToolPaletteItemProvider extends ToolPaletteItemProvider {
|
|
57
|
-
getItems(
|
|
58
|
-
const handlers = this.operationHandlerRegistry
|
|
59
|
-
.getAll()
|
|
60
|
-
.filter(handler => handler instanceof create_operation_handler_1.CreateOperationHandler);
|
|
57
|
+
getItems(_args) {
|
|
58
|
+
const handlers = this.operationHandlerRegistry.getAll().filter(create_operation_handler_1.CreateOperationHandler.is);
|
|
61
59
|
this.counter = 0;
|
|
62
60
|
const nodes = this.createPaletteItem(handlers, protocol_1.CreateNodeOperation.KIND);
|
|
63
61
|
const edges = this.createPaletteItem(handlers, protocol_1.CreateEdgeOperation.KIND);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-palette-item-provider.js","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette-item-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAQgC;AAChC,yCAA+C;AAC/C,wFAAmF;AACnF,4FAAuF;AAGvF;;GAEG;AAEI,IAAe,uBAAuB,GAAtC,MAAe,uBAAuB;IACzC;;OAEG;IACH,IAAI,SAAS;QACT,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,aAA4B;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CASJ,CAAA;AAzBqB,uBAAuB;IAD5C,IAAA,sBAAU,GAAE;GACS,uBAAuB,CAyB5C;AAzBqB,0DAAuB;AA4BtC,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,uBAAuB;IAIvE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"tool-palette-item-provider.js","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette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AAG,EAAE;SAC/G,CAAC;IACN,CAAC;IAED,iBAAiB,CAAC,QAAkC,EAAE,IAAY;QAC9D,OAAO,QAAQ;aACV,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC;aACjD,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;aAC7F,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;aAC7D,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,CAAC,MAAgD,EAAE,KAAa;QAClE,OAAO,EAAE,EAAE,EAAE,eAAe,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;IACxG,CAAC;CACJ,CAAA;AAzBG;IAAC,IAAA,kBAAM,EAAC,qDAAwB,CAAC;8BAA2B,qDAAwB;gFAAC;AAD5E,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CA0B1C;AA1BY,wEAA8B"}
|
|
@@ -15,9 +15,14 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { GModelRoot } from '@eclipse-glsp/graph';
|
|
17
17
|
import { Action, ComputedBoundsAction, MaybePromise } from '@eclipse-glsp/protocol';
|
|
18
|
-
import { ActionHandler } from '
|
|
19
|
-
import { ModelState } from '../
|
|
20
|
-
import { ModelSubmissionHandler } from '../
|
|
18
|
+
import { ActionHandler } from '../../actions/action-handler';
|
|
19
|
+
import { ModelState } from '../model/model-state';
|
|
20
|
+
import { ModelSubmissionHandler } from '../model/model-submission-handler';
|
|
21
|
+
/**
|
|
22
|
+
* Syncs the bounds computed by the client (i.e. the actual bounds after applying CSS styles) back to the `GModel`.
|
|
23
|
+
* In this default implementation the updated bounds are stored transient. This means they are applied to the graphical model but
|
|
24
|
+
* are not persisted to the source model.
|
|
25
|
+
*/
|
|
21
26
|
export declare class ComputedBoundsActionHandler implements ActionHandler {
|
|
22
27
|
protected submissionHandler: ModelSubmissionHandler;
|
|
23
28
|
protected modelState: ModelState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computed-bounds-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/computed-bounds-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E;;;;GAIG;AACH,qBACa,2BAA4B,YAAW,aAAa;IAE7D,SAAS,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAGpD,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,WAAW,WAA+B;IAC1C,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAU7D,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,GAAG,IAAI;IAO3E,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC"}
|
|
@@ -12,9 +12,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ComputedBoundsActionHandler = void 0;
|
|
13
13
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
14
14
|
const inversify_1 = require("inversify");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
15
|
+
const layout_util_1 = require("../../utils/layout-util");
|
|
16
|
+
const model_state_1 = require("../model/model-state");
|
|
17
|
+
const model_submission_handler_1 = require("../model/model-submission-handler");
|
|
18
|
+
/**
|
|
19
|
+
* Syncs the bounds computed by the client (i.e. the actual bounds after applying CSS styles) back to the `GModel`.
|
|
20
|
+
* In this default implementation the updated bounds are stored transient. This means they are applied to the graphical model but
|
|
21
|
+
* are not persisted to the source model.
|
|
22
|
+
*/
|
|
18
23
|
let ComputedBoundsActionHandler = class ComputedBoundsActionHandler {
|
|
19
24
|
constructor() {
|
|
20
25
|
this.actionKinds = [protocol_1.ComputedBoundsAction.KIND];
|
|
@@ -30,7 +35,7 @@ let ComputedBoundsActionHandler = class ComputedBoundsActionHandler {
|
|
|
30
35
|
applyBounds(root, action) {
|
|
31
36
|
var _a, _b;
|
|
32
37
|
const index = this.modelState.index;
|
|
33
|
-
action.bounds.forEach(bounds => (0, layout_util_1.
|
|
38
|
+
action.bounds.forEach(bounds => (0, layout_util_1.applyElementAndBounds)(bounds, index));
|
|
34
39
|
((_a = action.alignments) !== null && _a !== void 0 ? _a : []).forEach(alignment => (0, layout_util_1.applyAlignment)(alignment, index));
|
|
35
40
|
((_b = action.routes) !== null && _b !== void 0 ? _b : []).forEach(route => (0, layout_util_1.applyRoute)(route, index));
|
|
36
41
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computed-bounds-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/computed-bounds-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAoF;AACpF,yCAA+C;AAE/C,yDAA4F;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|
@@ -13,16 +13,25 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Operation } from '@eclipse-glsp/protocol';
|
|
16
|
+
import { LayoutOperation, MaybePromise, Operation } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { Command } from '../../command/command';
|
|
17
18
|
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
18
19
|
import { OperationHandler } from '../../operations/operation-handler';
|
|
19
20
|
import { Logger } from '../../utils/logger';
|
|
21
|
+
import { GModelSerializer } from '../model/gmodel-serializer';
|
|
20
22
|
import { LayoutEngine } from './layout-engine';
|
|
21
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The default handler for `{@link LayoutOperation}s. Does invoke the (optional) layout engine
|
|
25
|
+
* if the server is configured for manual layouting. Changes are stored transient in the graphical model and are not
|
|
26
|
+
* persisted in the source model.
|
|
27
|
+
*/
|
|
28
|
+
export declare class LayoutOperationHandler extends OperationHandler {
|
|
22
29
|
protected logger: Logger;
|
|
23
30
|
protected layoutEngine?: LayoutEngine;
|
|
24
31
|
protected diagramConfiguration: DiagramConfiguration;
|
|
32
|
+
protected serializer: GModelSerializer;
|
|
25
33
|
readonly operationType = "layout";
|
|
26
|
-
|
|
34
|
+
createCommand(operation: LayoutOperation): MaybePromise<Command | undefined>;
|
|
35
|
+
protected executeOperation(_operation: Operation): Promise<void>;
|
|
27
36
|
}
|
|
28
37
|
//# sourceMappingURL=layout-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"layout-operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AACH,qBACa,sBAAuB,SAAQ,gBAAgB;IAExD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAIzB,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAGtC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAEvC,QAAQ,CAAC,aAAa,YAAwB;IAE9C,aAAa,CAAC,SAAS,EAAE,eAAe,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;cAW5D,gBAAgB,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzE"}
|
|
@@ -27,23 +27,35 @@ exports.LayoutOperationHandler = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
+
const recording_command_1 = require("../../command/recording-command");
|
|
30
31
|
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
32
|
+
const operation_handler_1 = require("../../operations/operation-handler");
|
|
31
33
|
const logger_1 = require("../../utils/logger");
|
|
34
|
+
const gmodel_serializer_1 = require("../model/gmodel-serializer");
|
|
32
35
|
const layout_engine_1 = require("./layout-engine");
|
|
33
|
-
|
|
36
|
+
/**
|
|
37
|
+
* The default handler for `{@link LayoutOperation}s. Does invoke the (optional) layout engine
|
|
38
|
+
* if the server is configured for manual layouting. Changes are stored transient in the graphical model and are not
|
|
39
|
+
* persisted in the source model.
|
|
40
|
+
*/
|
|
41
|
+
let LayoutOperationHandler = class LayoutOperationHandler extends operation_handler_1.OperationHandler {
|
|
34
42
|
constructor() {
|
|
43
|
+
super(...arguments);
|
|
35
44
|
this.operationType = protocol_1.LayoutOperation.KIND;
|
|
36
45
|
}
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
if (this.layoutEngine) {
|
|
41
|
-
await this.layoutEngine.layout();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.logger.warn('Could not execute layout operation. No `LayoutEngine` is bound!');
|
|
45
|
-
}
|
|
46
|
+
createCommand(operation) {
|
|
47
|
+
if (this.diagramConfiguration.layoutKind !== diagram_configuration_1.ServerLayoutKind.MANUAL) {
|
|
48
|
+
return undefined;
|
|
46
49
|
}
|
|
50
|
+
if (!this.layoutEngine) {
|
|
51
|
+
this.logger.warn('Could not execute layout operation. No `LayoutEngine` is bound!');
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return new recording_command_1.GModelRecordingCommand(this.modelState, this.serializer, () => this.executeOperation(operation));
|
|
55
|
+
}
|
|
56
|
+
async executeOperation(_operation) {
|
|
57
|
+
var _a;
|
|
58
|
+
await ((_a = this.layoutEngine) === null || _a === void 0 ? void 0 : _a.layout());
|
|
47
59
|
}
|
|
48
60
|
};
|
|
49
61
|
__decorate([
|
|
@@ -59,6 +71,10 @@ __decorate([
|
|
|
59
71
|
(0, inversify_1.inject)(diagram_configuration_1.DiagramConfiguration),
|
|
60
72
|
__metadata("design:type", Object)
|
|
61
73
|
], LayoutOperationHandler.prototype, "diagramConfiguration", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, inversify_1.inject)(gmodel_serializer_1.GModelSerializer),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], LayoutOperationHandler.prototype, "serializer", void 0);
|
|
62
78
|
LayoutOperationHandler = __decorate([
|
|
63
79
|
(0, inversify_1.injectable)()
|
|
64
80
|
], LayoutOperationHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkF;AAClF,yCAAyD;AAEzD,uEAAyE;AACzE,+EAA6F;AAC7F,0EAAsE;AACtE,+CAA4C;AAC5C,kEAA8D;AAC9D,mDAA+C;AAE/C;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,oCAAgB;IAArD;;QAcM,kBAAa,GAAG,0BAAe,CAAC,IAAI,CAAC;IAgBlD,CAAC;IAdG,aAAa,CAAC,SAA0B;QACpC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,KAAK,wCAAgB,CAAC,MAAM,EAAE;YAClE,OAAO,SAAS,CAAC;SACpB;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;YACpF,OAAO,SAAS,CAAC;SACpB;QACD,OAAO,IAAI,0CAAsB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChH,CAAC;IAES,KAAK,CAAC,gBAAgB,CAAC,UAAqB;;QAClD,MAAM,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,MAAM,EAAE,CAAA,CAAC;IACtC,CAAC;CACJ,CAAA;AA7BG;IAAC,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;sDAAC;AAEzB;IAAC,IAAA,kBAAM,EAAC,4BAAY,CAAC;IACpB,IAAA,oBAAQ,GAAE;;4DAC2B;AAEtC;IAAC,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;oEACwB;AAErD;IAAC,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0DACc;AAZ9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA8BlC;AA9BY,wDAAsB"}
|
|
@@ -25,7 +25,6 @@ export interface ModelState {
|
|
|
25
25
|
readonly root: GModelRoot;
|
|
26
26
|
updateRoot(newRoot: GModelRoot): void;
|
|
27
27
|
editMode: string;
|
|
28
|
-
isDirty: boolean;
|
|
29
28
|
sourceUri?: string;
|
|
30
29
|
clientId: string;
|
|
31
30
|
readonly isReadonly: boolean;
|
|
@@ -39,7 +38,6 @@ export declare class DefaultModelState implements ModelState {
|
|
|
39
38
|
protected properties: Map<string, any>;
|
|
40
39
|
protected _root: GModelRoot;
|
|
41
40
|
editMode: string;
|
|
42
|
-
isDirty: boolean;
|
|
43
41
|
set<P>(key: string, property: P): void;
|
|
44
42
|
setAll(properties: Record<string, unknown>): void;
|
|
45
43
|
get<P>(key: string, guard?: (object: unknown) => object is P): P | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-state.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/model-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,UAAU,eAAu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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-state.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAkD;AAClD,yCAA+C;AAC/C,sEAAwD;AACxD,iDAA6C;AAC7C,2DAAuD;AAE1C,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"model-state.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAkD;AAClD,yCAA+C;AAC/C,sEAAwD;AACxD,iDAA6C;AAC7C,2DAAuD;AAE1C,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAgBlC,QAAA,cAAc,GAAG,WAAW,CAAC;AAGnC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QAUO,eAAU,GAAG,IAAI,GAAG,EAAe,CAAC;QAI9C,aAAQ,GAAG,mBAAQ,CAAC,QAAQ,CAAC;IA0CjC,CAAC;IAxCG,GAAG,CAAI,GAAW,EAAE,QAAW;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,UAAmC;QACtC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,GAAG,CAAI,GAAW,EAAE,KAAwC;QACxD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO,MAAW,CAAC;SACtB;QACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9C,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,GAAG,CAAC,sBAAc,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,GAAW;QACb,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAc,IAAI,CAAC,IAAgB;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,UAAU,CAAC,OAAmB;QAC1B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;CACJ,CAAA;AAvDG;IAAC,IAAA,kBAAM,EAAC,0BAAW,CAAC;8BACJ,0BAAW;gDAAC;AAE5B;IAAC,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;qDACc;AAEvC;IAAC,IAAA,kBAAM,EAAC,8BAAQ,CAAC;;mDACS;AARjB,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CAwD7B;AAxDY,8CAAiB"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { GModelRootSchema } from '@eclipse-glsp/graph';
|
|
17
17
|
import { Action, DirtyStateChangeReason, MaybePromise } from '@eclipse-glsp/protocol';
|
|
18
|
+
import { CommandStack } from '../../command/command-stack';
|
|
18
19
|
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
19
20
|
import { LayoutEngine } from '../layout/layout-engine';
|
|
20
21
|
import { GModelFactory } from './gmodel-factory';
|
|
@@ -26,6 +27,7 @@ export declare class ModelSubmissionHandler {
|
|
|
26
27
|
protected modelFactory: GModelFactory;
|
|
27
28
|
protected modelState: ModelState;
|
|
28
29
|
protected layoutEngine: LayoutEngine;
|
|
30
|
+
protected commandStack: CommandStack;
|
|
29
31
|
/**
|
|
30
32
|
* Returns a list of actions to update the client-side model, based on the specified <code>modelState</code>.
|
|
31
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-submission-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACH,MAAM,EACN,sBAAsB,EACtB,YAAY,EAKf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBACa,sBAAsB;IAE/B,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAGvC,SAAS,CAAC,YAAY,EAAE,aAAa,CAAC;IAGtC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAIjC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC;;;;;;;;OAQG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAWpE;;;;;;;;;;;;;OAaG;IACG,mBAAmB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkB7E,SAAS,CAAC,eAAe,IAAI,gBAAgB;CAGhD"}
|
|
1
|
+
{"version":3,"file":"model-submission-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACH,MAAM,EACN,sBAAsB,EACtB,YAAY,EAKf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBACa,sBAAsB;IAE/B,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAGvC,SAAS,CAAC,YAAY,EAAE,aAAa,CAAC;IAGtC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAIjC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAGrC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC;;;;;;;;OAQG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAWpE;;;;;;;;;;;;;OAaG;IACG,mBAAmB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkB7E,SAAS,CAAC,eAAe,IAAI,gBAAgB;CAGhD"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ModelSubmissionHandler = void 0;
|
|
13
13
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
14
14
|
const inversify_1 = require("inversify");
|
|
15
|
+
const command_stack_1 = require("../../command/command-stack");
|
|
15
16
|
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
16
17
|
const layout_engine_1 = require("../layout/layout-engine");
|
|
17
18
|
const gmodel_factory_1 = require("./gmodel-factory");
|
|
@@ -33,7 +34,7 @@ let ModelSubmissionHandler = class ModelSubmissionHandler {
|
|
|
33
34
|
this.modelState.root.revision = ((_a = this.modelState.root.revision) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
34
35
|
const root = this.serializeGModel();
|
|
35
36
|
if (this.diagramConfiguration.needsClientLayout) {
|
|
36
|
-
return [protocol_1.RequestBoundsAction.create(root), protocol_1.SetDirtyStateAction.create(this.
|
|
37
|
+
return [protocol_1.RequestBoundsAction.create(root), protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason })];
|
|
37
38
|
}
|
|
38
39
|
return [protocol_1.SetModelAction.create(root)];
|
|
39
40
|
}
|
|
@@ -61,7 +62,7 @@ let ModelSubmissionHandler = class ModelSubmissionHandler {
|
|
|
61
62
|
? protocol_1.SetModelAction.create(root)
|
|
62
63
|
: protocol_1.UpdateModelAction.create(root, { animate: this.diagramConfiguration.animatedUpdate }));
|
|
63
64
|
if (!this.diagramConfiguration.needsClientLayout) {
|
|
64
|
-
result.push(protocol_1.SetDirtyStateAction.create(this.
|
|
65
|
+
result.push(protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason }));
|
|
65
66
|
}
|
|
66
67
|
return result;
|
|
67
68
|
}
|
|
@@ -90,6 +91,10 @@ __decorate([
|
|
|
90
91
|
(0, inversify_1.optional)(),
|
|
91
92
|
__metadata("design:type", Object)
|
|
92
93
|
], ModelSubmissionHandler.prototype, "layoutEngine", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, inversify_1.inject)(command_stack_1.CommandStack),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], ModelSubmissionHandler.prototype, "commandStack", void 0);
|
|
93
98
|
ModelSubmissionHandler = __decorate([
|
|
94
99
|
(0, inversify_1.injectable)()
|
|
95
100
|
], ModelSubmissionHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-submission-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAQgC;AAChC,yCAAyD;AACzD,+EAA6F;AAC7F,2DAAuD;AACvD,qDAAiD;AACjD,2DAAuD;AACvD,+CAA2C;AAGpC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"model-submission-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAQgC;AAChC,yCAAyD;AACzD,+DAA2D;AAC3D,+EAA6F;AAC7F,2DAAuD;AACvD,qDAAiD;AACjD,2DAAuD;AACvD,+CAA2C;AAGpC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAoB/B;;;;;;;;OAQG;IACH,WAAW,CAAC,MAA+B;;QACvC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,MAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACzE,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEpC,IAAI,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE;YAC7C,OAAO,CAAC,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;SAChH;QACD,OAAO,CAAC,yBAAc,CAAC,MAAM,CAAC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BAAQ,GAAE;;4DAC0B;AAErC;IAAC,IAAA,kBAAM,EAAC,4BAAY,CAAC;;4DACgB;AAlB5B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA2ElC;AA3EY,wDAAsB"}
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, SaveModelAction } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { ActionHandler } from '../../actions/action-handler';
|
|
18
|
-
import {
|
|
18
|
+
import { CommandStack } from '../../command/command-stack';
|
|
19
19
|
import { SourceModelStorage } from './source-model-storage';
|
|
20
20
|
export declare class SaveModelActionHandler implements ActionHandler {
|
|
21
21
|
actionKinds: string[];
|
|
22
|
-
protected
|
|
22
|
+
protected commandStack: CommandStack;
|
|
23
23
|
protected sourceModelStorage: SourceModelStorage;
|
|
24
24
|
execute(action: SaveModelAction): Promise<Action[]>;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-model-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"save-model-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,qBACa,sBAAuB,YAAW,aAAa;IACxD,WAAW,WAA0B;IAGrC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAGrC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAE3C,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAK5D"}
|
|
@@ -27,7 +27,7 @@ exports.SaveModelActionHandler = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
-
const
|
|
30
|
+
const command_stack_1 = require("../../command/command-stack");
|
|
31
31
|
const source_model_storage_1 = require("./source-model-storage");
|
|
32
32
|
let SaveModelActionHandler = class SaveModelActionHandler {
|
|
33
33
|
constructor() {
|
|
@@ -35,14 +35,14 @@ let SaveModelActionHandler = class SaveModelActionHandler {
|
|
|
35
35
|
}
|
|
36
36
|
async execute(action) {
|
|
37
37
|
await this.sourceModelStorage.saveSourceModel(action);
|
|
38
|
-
this.
|
|
39
|
-
return [protocol_1.SetDirtyStateAction.create(this.
|
|
38
|
+
this.commandStack.saveIsDone();
|
|
39
|
+
return [protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason: 'save' })];
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
__decorate([
|
|
43
|
-
(0, inversify_1.inject)(
|
|
43
|
+
(0, inversify_1.inject)(command_stack_1.CommandStack),
|
|
44
44
|
__metadata("design:type", Object)
|
|
45
|
-
], SaveModelActionHandler.prototype, "
|
|
45
|
+
], SaveModelActionHandler.prototype, "commandStack", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, inversify_1.inject)(source_model_storage_1.SourceModelStorage),
|
|
48
48
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsF;AACtF,yCAA+C;AAE/C,+
|
|
1
|
+
{"version":3,"file":"save-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsF;AACtF,yCAA+C;AAE/C,+DAA2D;AAC3D,iEAA4D;AAGrD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QACH,gBAAW,GAAG,CAAC,0BAAe,CAAC,IAAI,CAAC,CAAC;IAazC,CAAC;IALG,KAAK,CAAC,OAAO,CAAC,MAAuB;QACjC,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;QAC/B,OAAO,CAAC,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACvF,CAAC;CACJ,CAAA;AAXG;IAAC,IAAA,kBAAM,EAAC,4BAAY,CAAC;;4DACgB;AAErC;IAAC,IAAA,kBAAM,EAAC,yCAAkB,CAAC;;kEACsB;AAPxC,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAclC;AAdY,wDAAsB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ApplyLabelEditOperation, MaybePromise } from '@eclipse-glsp/protocol';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
2
|
+
import { Command } from '../command/command';
|
|
3
|
+
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
4
|
+
export declare class GModelApplyLabelEditOperationHandler extends GModelOperationHandler {
|
|
5
5
|
readonly operationType = "applyLabelEdit";
|
|
6
|
-
|
|
7
|
-
execute(operation: ApplyLabelEditOperation): MaybePromise<void>;
|
|
6
|
+
createCommand(operation: ApplyLabelEditOperation): MaybePromise<Command | undefined>;
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=apply-label-edit-operation-handler.d.ts.map
|