@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
package/lib/common/index.js
CHANGED
|
@@ -38,6 +38,8 @@ __exportStar(require("./actions/client-action-handler"), exports);
|
|
|
38
38
|
__exportStar(require("./actions/global-action-provider"), exports);
|
|
39
39
|
__exportStar(require("./command/command"), exports);
|
|
40
40
|
__exportStar(require("./command/command-stack"), exports);
|
|
41
|
+
__exportStar(require("./command/recording-command"), exports);
|
|
42
|
+
__exportStar(require("./command/undo-redo-action-handler"), exports);
|
|
41
43
|
__exportStar(require("./di/binding-target"), exports);
|
|
42
44
|
__exportStar(require("./di/client-session-module"), exports);
|
|
43
45
|
__exportStar(require("./di/diagram-module"), exports);
|
|
@@ -58,6 +60,7 @@ __exportStar(require("./features/directediting/context-edit-validator"), exports
|
|
|
58
60
|
__exportStar(require("./features/directediting/context-edit-validator-registry"), exports);
|
|
59
61
|
__exportStar(require("./features/directediting/label-edit-validator"), exports);
|
|
60
62
|
__exportStar(require("./features/directediting/request-edit-validation-handler"), exports);
|
|
63
|
+
__exportStar(require("./features/layout/computed-bounds-action-handler"), exports);
|
|
61
64
|
__exportStar(require("./features/layout/layout-engine"), exports);
|
|
62
65
|
__exportStar(require("./features/layout/layout-operation-handler"), exports);
|
|
63
66
|
__exportStar(require("./features/model/gmodel-factory"), exports);
|
|
@@ -83,13 +86,10 @@ __exportStar(require("./gmodel/index"), exports);
|
|
|
83
86
|
__exportStar(require("./launch/glsp-server-launcher"), exports);
|
|
84
87
|
__exportStar(require("./operations/compound-operation-handler"), exports);
|
|
85
88
|
__exportStar(require("./operations/create-operation-handler"), exports);
|
|
86
|
-
__exportStar(require("./operations/cut-operation-handler"), exports);
|
|
87
89
|
__exportStar(require("./operations/operation-action-handler"), exports);
|
|
88
90
|
__exportStar(require("./operations/operation-handler"), exports);
|
|
89
91
|
__exportStar(require("./operations/operation-handler-registry"), exports);
|
|
90
|
-
__exportStar(require("./protocol/glsp-client-proxy"), exports);
|
|
91
92
|
__exportStar(require("./protocol/glsp-server"), exports);
|
|
92
|
-
__exportStar(require("./protocol/glsp-server-listener"), exports);
|
|
93
93
|
__exportStar(require("./session/client-session"), exports);
|
|
94
94
|
__exportStar(require("./session/client-session-factory"), exports);
|
|
95
95
|
__exportStar(require("./session/client-session-initializer"), exports);
|
|
@@ -97,7 +97,9 @@ __exportStar(require("./session/client-session-listener"), exports);
|
|
|
97
97
|
__exportStar(require("./session/client-session-manager"), exports);
|
|
98
98
|
__exportStar(require("./utils/args-util"), exports);
|
|
99
99
|
__exportStar(require("./utils/client-options-util"), exports);
|
|
100
|
+
__exportStar(require("./utils/console-logger"), exports);
|
|
100
101
|
__exportStar(require("./utils/glsp-server-error"), exports);
|
|
102
|
+
__exportStar(require("./utils/layout-util"), exports);
|
|
101
103
|
__exportStar(require("./utils/logger"), exports);
|
|
102
104
|
__exportStar(require("./utils/promise-queue"), exports);
|
|
103
105
|
__exportStar(require("./utils/registry"), exports);
|
package/lib/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,sDAAoC;AACpC,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,oEAAkD;AAClD,kEAAgD;AAChD,mEAAiD;AACjD,oDAAkC;AAClC,0DAAwC;AACxC,sDAAoC;AACpC,6DAA2C;AAC3C,sDAAoC;AACpC,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,kEAAgD;AAChD,8EAA4D;AAC5D,6FAA2E;AAC3E,4FAA0E;AAC1E,qFAAmE;AACnE,8FAA4E;AAC5E,uFAAqE;AACrE,4FAA0E;AAC1E,uFAAqE;AACrE,kFAAgE;AAChE,2FAAyE;AACzE,gFAA8D;AAC9D,2FAAyE;AACzE,kEAAgD;AAChD,6EAA2D;AAC3D,kEAAgD;AAChD,gEAA8C;AAC9C,qEAAmD;AACnD,+DAA6C;AAC7C,4EAA0D;AAC1D,gFAA8D;AAC9D,6EAA2D;AAC3D,wEAAsD;AACtD,4EAA0D;AAC1D,mFAAiE;AACjE,4FAA0E;AAC1E,qFAAmE;AACnE,mFAAiE;AACjE,kGAAgF;AAChF,kGAAgF;AAChF,uEAAqD;AACrD,sFAAoE;AACpE,wEAAsD;AACtD,gFAA8D;AAC9D,iDAA+B;AAC/B,gEAA8C;AAC9C,0EAAwD;AACxD,wEAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,sDAAoC;AACpC,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,oEAAkD;AAClD,kEAAgD;AAChD,mEAAiD;AACjD,oDAAkC;AAClC,0DAAwC;AACxC,8DAA4C;AAC5C,qEAAmD;AACnD,sDAAoC;AACpC,6DAA2C;AAC3C,sDAAoC;AACpC,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,kEAAgD;AAChD,8EAA4D;AAC5D,6FAA2E;AAC3E,4FAA0E;AAC1E,qFAAmE;AACnE,8FAA4E;AAC5E,uFAAqE;AACrE,4FAA0E;AAC1E,uFAAqE;AACrE,kFAAgE;AAChE,2FAAyE;AACzE,gFAA8D;AAC9D,2FAAyE;AACzE,mFAAiE;AACjE,kEAAgD;AAChD,6EAA2D;AAC3D,kEAAgD;AAChD,gEAA8C;AAC9C,qEAAmD;AACnD,+DAA6C;AAC7C,4EAA0D;AAC1D,gFAA8D;AAC9D,6EAA2D;AAC3D,wEAAsD;AACtD,4EAA0D;AAC1D,mFAAiE;AACjE,4FAA0E;AAC1E,qFAAmE;AACnE,mFAAiE;AACjE,kGAAgF;AAChF,kGAAgF;AAChF,uEAAqD;AACrD,sFAAoE;AACpE,wEAAsD;AACtD,gFAA8D;AAC9D,iDAA+B;AAC/B,gEAA8C;AAC9C,0EAAwD;AACxD,wEAAsD;AACtD,wEAAsD;AACtD,iEAA+C;AAC/C,0EAAwD;AACxD,yDAAuC;AACvC,2DAAyC;AACzC,mEAAiD;AACjD,uEAAqD;AACrD,oEAAkD;AAClD,mEAAiD;AACjD,oDAAkC;AAClC,8DAA4C;AAC5C,yDAAuC;AACvC,4DAA0C;AAC1C,sDAAoC;AACpC,iDAA+B;AAC/B,wDAAsC;AACtC,mDAAiC"}
|
|
@@ -13,22 +13,23 @@
|
|
|
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
|
+
import { Disposable, DisposableCollection, MaybePromise } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { Container, ContainerModule } from 'inversify';
|
|
18
18
|
import { ServerModule } from '../di/server-module';
|
|
19
19
|
import { Logger } from '../utils/logger';
|
|
20
|
-
export declare
|
|
21
|
-
export declare abstract class GLSPServerLauncher<T = undefined> {
|
|
20
|
+
export declare abstract class GLSPServerLauncher<T> implements Disposable {
|
|
22
21
|
protected logger: Logger;
|
|
23
22
|
protected _modules: ContainerModule[];
|
|
24
23
|
protected running: boolean;
|
|
24
|
+
protected toDispose: DisposableCollection;
|
|
25
25
|
protected parentContainer?: Container;
|
|
26
26
|
configure(serverModule: ServerModule, ...additionalModules: ContainerModule[]): void;
|
|
27
|
-
createContainer(): Container;
|
|
28
|
-
start(startParams
|
|
29
|
-
protected abstract run(startParams
|
|
27
|
+
createContainer(...additionalModules: ContainerModule[]): Container;
|
|
28
|
+
start(startParams: T): MaybePromise<void>;
|
|
29
|
+
protected abstract run(startParams: T): MaybePromise<void>;
|
|
30
30
|
shutdown(): MaybePromise<void>;
|
|
31
|
-
protected
|
|
31
|
+
protected stop(): MaybePromise<void>;
|
|
32
|
+
dispose(): void;
|
|
32
33
|
get modules(): ContainerModule[];
|
|
33
34
|
}
|
|
34
35
|
//# sourceMappingURL=glsp-server-launcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-server-launcher.d.ts","sourceRoot":"","sources":["../../../src/common/launch/glsp-server-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"glsp-server-launcher.d.ts","sourceRoot":"","sources":["../../../src/common/launch/glsp-server-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAgC,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,8BACsB,kBAAkB,CAAC,CAAC,CAAE,YAAW,UAAU;IAC7C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzC,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAM;IAC3C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,SAAS,uBAA8B;IAET,SAAS,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC;IAE9E,SAAS,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,iBAAiB,EAAE,eAAe,EAAE,GAAG,IAAI;IAIpF,eAAe,CAAC,GAAG,iBAAiB,EAAE,eAAe,EAAE,GAAG,SAAS;IAMnE,KAAK,CAAC,WAAW,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC;IAQzC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC;IAE1D,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC;IAU9B,SAAS,CAAC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC;IAIpC,OAAO,IAAI,IAAI;IAIf,IAAI,OAAO,IAAI,eAAe,EAAE,CAK/B;CACJ"}
|
|
@@ -9,21 +9,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GLSPServerLauncher =
|
|
12
|
+
exports.GLSPServerLauncher = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
28
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
13
29
|
const inversify_1 = require("inversify");
|
|
14
30
|
const service_identifiers_1 = require("../di/service-identifiers");
|
|
15
31
|
const logger_1 = require("../utils/logger");
|
|
16
|
-
exports.START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed';
|
|
17
32
|
let GLSPServerLauncher = class GLSPServerLauncher {
|
|
18
33
|
constructor() {
|
|
19
34
|
this._modules = [];
|
|
35
|
+
this.toDispose = new protocol_1.DisposableCollection();
|
|
20
36
|
}
|
|
21
37
|
configure(serverModule, ...additionalModules) {
|
|
22
38
|
this._modules.push(serverModule, ...additionalModules);
|
|
23
39
|
}
|
|
24
|
-
createContainer() {
|
|
40
|
+
createContainer(...additionalModules) {
|
|
25
41
|
const container = this.parentContainer ? this.parentContainer.createChild() : new inversify_1.Container();
|
|
26
|
-
container.load(...this._modules);
|
|
42
|
+
container.load(...this._modules, ...additionalModules);
|
|
27
43
|
return container;
|
|
28
44
|
}
|
|
29
45
|
start(startParams) {
|
|
@@ -35,12 +51,19 @@ let GLSPServerLauncher = class GLSPServerLauncher {
|
|
|
35
51
|
}
|
|
36
52
|
shutdown() {
|
|
37
53
|
if (this.running) {
|
|
54
|
+
this.logger.info('Shutdown GLSPServerLauncher');
|
|
38
55
|
const result = this.stop();
|
|
39
56
|
this.running = false;
|
|
40
57
|
return result;
|
|
41
58
|
}
|
|
42
59
|
this.logger.warn('Could not stop launcher. Launcher is not running!');
|
|
43
60
|
}
|
|
61
|
+
stop() {
|
|
62
|
+
this.dispose();
|
|
63
|
+
}
|
|
64
|
+
dispose() {
|
|
65
|
+
this.toDispose.dispose();
|
|
66
|
+
}
|
|
44
67
|
get modules() {
|
|
45
68
|
if (!this._modules) {
|
|
46
69
|
throw new Error('The GLSPServerLauncher has not been configured yet');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-server-launcher.js","sourceRoot":"","sources":["../../../src/common/launch/glsp-server-launcher.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"glsp-server-launcher.js","sourceRoot":"","sources":["../../../src/common/launch/glsp-server-launcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAwF;AACxF,yCAAqF;AAErF,mEAA+D;AAC/D,4CAAyC;AAGlC,IAAe,kBAAkB,GAAjC,MAAe,kBAAkB;IAAjC;QAGO,aAAQ,GAAsB,EAAE,CAAC;QAEjC,cAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAgDrD,CAAC;IA5CG,SAAS,CAAC,YAA0B,EAAE,GAAG,iBAAoC;QACzE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,iBAAiB,CAAC,CAAC;IAC3D,CAAC;IAED,eAAe,CAAC,GAAG,iBAAoC;QACnD,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,qBAAS,EAAE,CAAC;QAC9F,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,iBAAiB,CAAC,CAAC;QACvD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,WAAc;QAChB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;SAChC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IAC/E,CAAC;IAID,QAAQ;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,OAAO,MAAM,CAAC;SACjB;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;IAC1E,CAAC;IAES,IAAI;QACV,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,OAAO;QACP,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;CACJ,CAAA;AApDG;IAAC,IAAA,kBAAM,EAAC,eAAM,CAAC;8BAAmB,eAAM;kDAAC;AAMzC;IAAC,IAAA,kBAAM,EAAC,wCAAkB,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAA6B,qBAAS;2DAAC;AAP5D,kBAAkB;IADvC,IAAA,sBAAU,GAAE;GACS,kBAAkB,CAqDvC;AArDqB,gDAAkB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { GLSPClientProxy, GLSPServer } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { Container, ContainerModule } from 'inversify';
|
|
18
|
+
import * as jsonrpc from 'vscode-jsonrpc';
|
|
19
|
+
import { Logger } from '../utils/logger';
|
|
20
|
+
import { GLSPServerLauncher } from './glsp-server-launcher';
|
|
21
|
+
export declare const START_UP_COMPLETE_MSG = "[GLSP-Server]:Startup completed. Accepting requests on port:";
|
|
22
|
+
export interface JsonRpcServerInstance {
|
|
23
|
+
server: GLSPServer;
|
|
24
|
+
clientConnection: jsonrpc.MessageConnection;
|
|
25
|
+
container: Container;
|
|
26
|
+
}
|
|
27
|
+
export declare abstract class JsonRpcGLSPServerLauncher<T> extends GLSPServerLauncher<T> {
|
|
28
|
+
protected logger: Logger;
|
|
29
|
+
protected serverInstances: Map<jsonrpc.MessageConnection, JsonRpcServerInstance>;
|
|
30
|
+
protected startupCompleteMessage: string;
|
|
31
|
+
constructor();
|
|
32
|
+
protected disposeServerInstance(instance: JsonRpcServerInstance): void;
|
|
33
|
+
protected createServerInstance(clientConnection: jsonrpc.MessageConnection): void;
|
|
34
|
+
protected createJsonRpcModule(clientConnection: jsonrpc.MessageConnection): ContainerModule;
|
|
35
|
+
protected configureClientConnection(serverInstance: JsonRpcServerInstance): void;
|
|
36
|
+
protected createClientProxy(serverInstance: JsonRpcServerInstance): GLSPClientProxy;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=jsonrpc-server-launcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonrpc-server-launcher.d.ts","sourceRoot":"","sources":["../../../src/common/launch/jsonrpc-server-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAEH,eAAe,EACf,UAAU,EAIb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAsB,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,eAAO,MAAM,qBAAqB,iEAAiE,CAAC;AAEpG,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,CAAC;IAC5C,SAAS,EAAE,SAAS,CAAC;CACxB;AAED,8BACsB,yBAAyB,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC5E,UACmB,MAAM,EAAE,MAAM,CAAC;IAElC,SAAS,CAAC,eAAe,wDAA+D;IACxF,SAAS,CAAC,sBAAsB,SAAyB;;IAWzD,SAAS,CAAC,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAOtE,SAAS,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI;IAQjF,SAAS,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,GAAG,eAAe;IAU3F,SAAS,CAAC,yBAAyB,CAAC,cAAc,EAAE,qBAAqB,GAAG,IAAI;IAUhF,SAAS,CAAC,iBAAiB,CAAC,cAAc,EAAE,qBAAqB,GAAG,eAAe;CAKtF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.JsonRpcGLSPServerLauncher = exports.START_UP_COMPLETE_MSG = void 0;
|
|
28
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
|
+
const inversify_1 = require("inversify");
|
|
30
|
+
const logger_1 = require("../utils/logger");
|
|
31
|
+
const glsp_server_launcher_1 = require("./glsp-server-launcher");
|
|
32
|
+
exports.START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed. Accepting requests on port:';
|
|
33
|
+
let JsonRpcGLSPServerLauncher = class JsonRpcGLSPServerLauncher extends glsp_server_launcher_1.GLSPServerLauncher {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.serverInstances = new Map();
|
|
37
|
+
this.startupCompleteMessage = exports.START_UP_COMPLETE_MSG;
|
|
38
|
+
this.toDispose.push(protocol_1.Disposable.create(() => {
|
|
39
|
+
this.serverInstances.forEach(instance => this.disposeServerInstance(instance));
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
disposeServerInstance(instance) {
|
|
43
|
+
this.serverInstances.delete(instance.clientConnection);
|
|
44
|
+
instance.server.shutdown();
|
|
45
|
+
instance.container.unbindAll();
|
|
46
|
+
instance.clientConnection.dispose();
|
|
47
|
+
}
|
|
48
|
+
createServerInstance(clientConnection) {
|
|
49
|
+
const container = this.createContainer(this.createJsonRpcModule(clientConnection));
|
|
50
|
+
const server = container.get(protocol_1.GLSPServer);
|
|
51
|
+
const instance = { container, clientConnection, server };
|
|
52
|
+
this.serverInstances.set(clientConnection, instance);
|
|
53
|
+
this.configureClientConnection(instance);
|
|
54
|
+
}
|
|
55
|
+
createJsonRpcModule(clientConnection) {
|
|
56
|
+
return new inversify_1.ContainerModule(bind => {
|
|
57
|
+
bind(protocol_1.GLSPClientProxy).toDynamicValue(ctx => {
|
|
58
|
+
const proxy = ctx.container.resolve(protocol_1.JsonrpcClientProxy);
|
|
59
|
+
proxy.initialize(clientConnection);
|
|
60
|
+
return proxy;
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
configureClientConnection(serverInstance) {
|
|
65
|
+
(0, protocol_1.configureClientConnection)(serverInstance.clientConnection, serverInstance.server);
|
|
66
|
+
serverInstance.clientConnection.onNotification(protocol_1.JsonrpcGLSPClient.ShutdownNotification, () => this.disposeServerInstance(serverInstance));
|
|
67
|
+
this.logger.info('Starting GLSP server connection');
|
|
68
|
+
}
|
|
69
|
+
createClientProxy(serverInstance) {
|
|
70
|
+
const proxy = serverInstance.container.resolve(protocol_1.JsonrpcClientProxy);
|
|
71
|
+
proxy.initialize(serverInstance.clientConnection);
|
|
72
|
+
return proxy;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, inversify_1.inject)(logger_1.Logger),
|
|
77
|
+
__metadata("design:type", logger_1.Logger)
|
|
78
|
+
], JsonRpcGLSPServerLauncher.prototype, "logger", void 0);
|
|
79
|
+
JsonRpcGLSPServerLauncher = __decorate([
|
|
80
|
+
(0, inversify_1.injectable)(),
|
|
81
|
+
__metadata("design:paramtypes", [])
|
|
82
|
+
], JsonRpcGLSPServerLauncher);
|
|
83
|
+
exports.JsonRpcGLSPServerLauncher = JsonRpcGLSPServerLauncher;
|
|
84
|
+
//# sourceMappingURL=jsonrpc-server-launcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonrpc-server-launcher.js","sourceRoot":"","sources":["../../../src/common/launch/jsonrpc-server-launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,qDAOgC;AAChC,yCAA2E;AAE3E,4CAAyC;AACzC,iEAA4D;AAE/C,QAAA,qBAAqB,GAAG,8DAA8D,CAAC;AAS7F,IAAe,yBAAyB,GAAxC,MAAe,yBAA6B,SAAQ,yCAAqB;IAO5E;QACI,KAAK,EAAE,CAAC;QAJF,oBAAe,GAAG,IAAI,GAAG,EAAoD,CAAC;QAC9E,2BAAsB,GAAG,6BAAqB,CAAC;QAIrD,IAAI,CAAC,SAAS,CAAC,IAAI,CACf,qBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnF,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAES,qBAAqB,CAAC,QAA+B;QAC3D,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QACvD,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC3B,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAC/B,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IAES,oBAAoB,CAAC,gBAA2C;QACtE,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACnF,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAa,qBAAU,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC;QACzD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAES,mBAAmB,CAAC,gBAA2C;QACrE,OAAO,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,0BAAe,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBACvC,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,6BAAkB,CAAC,CAAC;gBACxD,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBACnC,OAAO,KAAK,CAAC;YACjB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAES,yBAAyB,CAAC,cAAqC;QACrE,IAAA,oCAAyB,EAAC,cAAc,CAAC,gBAAgB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;QAElF,cAAc,CAAC,gBAAgB,CAAC,cAAc,CAAC,4BAAiB,CAAC,oBAAoB,EAAE,GAAG,EAAE,CACxF,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAC7C,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IACxD,CAAC;IAES,iBAAiB,CAAC,cAAqC;QAC7D,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,6BAAkB,CAAC,CAAC;QACnE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QAClD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AAvDG;IAAC,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACY,eAAM;yDAAC;AAFhB,yBAAyB;IAD9C,IAAA,sBAAU,GAAE;;GACS,yBAAyB,CAwD9C;AAxDqB,8DAAyB"}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { CompoundOperation
|
|
16
|
+
import { CompoundOperation } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { Command } from '../command/command';
|
|
17
18
|
import { OperationHandler } from './operation-handler';
|
|
18
19
|
import { OperationHandlerRegistry } from './operation-handler-registry';
|
|
19
|
-
export declare class CompoundOperationHandler
|
|
20
|
-
operationType: string;
|
|
20
|
+
export declare class CompoundOperationHandler extends OperationHandler {
|
|
21
21
|
protected operationHandlerRegistry: OperationHandlerRegistry;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
operationType: string;
|
|
23
|
+
createCommand(operation: CompoundOperation): Promise<Command | undefined>;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=compound-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compound-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/operations/compound-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"compound-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/operations/compound-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAmB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,qBACa,wBAAyB,SAAQ,gBAAgB;IAE1D,SAAS,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;IAE7D,aAAa,SAA0B;IAEjC,aAAa,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;CAWlF"}
|
|
@@ -8,6 +8,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
11
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
19
|
exports.CompoundOperationHandler = void 0;
|
|
13
20
|
/********************************************************************************
|
|
@@ -27,20 +34,41 @@ exports.CompoundOperationHandler = void 0;
|
|
|
27
34
|
********************************************************************************/
|
|
28
35
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
36
|
const inversify_1 = require("inversify");
|
|
30
|
-
const
|
|
37
|
+
const command_1 = require("../command/command");
|
|
38
|
+
const operation_handler_1 = require("./operation-handler");
|
|
31
39
|
const operation_handler_registry_1 = require("./operation-handler-registry");
|
|
32
|
-
let CompoundOperationHandler = class CompoundOperationHandler {
|
|
40
|
+
let CompoundOperationHandler = class CompoundOperationHandler extends operation_handler_1.OperationHandler {
|
|
33
41
|
constructor() {
|
|
42
|
+
super(...arguments);
|
|
34
43
|
this.operationType = protocol_1.CompoundOperation.KIND;
|
|
35
44
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
async createCommand(operation) {
|
|
46
|
+
var _a, e_1, _b, _c;
|
|
47
|
+
const maybeCommands = operation.operationList.map(op => this.operationHandlerRegistry.getExecutableCommand(op));
|
|
48
|
+
const commands = [];
|
|
49
|
+
try {
|
|
50
|
+
for (var _d = true, maybeCommands_1 = __asyncValues(maybeCommands), maybeCommands_1_1; maybeCommands_1_1 = await maybeCommands_1.next(), _a = maybeCommands_1_1.done, !_a;) {
|
|
51
|
+
_c = maybeCommands_1_1.value;
|
|
52
|
+
_d = false;
|
|
53
|
+
try {
|
|
54
|
+
const command = _c;
|
|
55
|
+
if (command) {
|
|
56
|
+
commands.push(command);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
_d = true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
65
|
+
finally {
|
|
66
|
+
try {
|
|
67
|
+
if (!_d && !_a && (_b = maybeCommands_1.return)) await _b.call(maybeCommands_1);
|
|
68
|
+
}
|
|
69
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
70
|
}
|
|
71
|
+
return new command_1.CompoundCommand(commands);
|
|
44
72
|
}
|
|
45
73
|
};
|
|
46
74
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compound-operation-handler.js","sourceRoot":"","sources":["../../../src/common/operations/compound-operation-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compound-operation-handler.js","sourceRoot":"","sources":["../../../src/common/operations/compound-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA2D;AAC3D,yCAA+C;AAC/C,gDAA8D;AAC9D,2DAAuD;AACvD,6EAAwE;AAGjE,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,oCAAgB;IAAvD;;QAIH,kBAAa,GAAG,4BAAiB,CAAC,IAAI,CAAC;IAa3C,CAAC;IAXG,KAAK,CAAC,aAAa,CAAC,SAA4B;;QAC5C,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;QAChH,MAAM,QAAQ,GAAc,EAAE,CAAC;;YAE/B,KAA4B,eAAA,kBAAA,cAAA,aAAa,CAAA,mBAAA;gBAAb,6BAAa;gBAAb,WAAa;;oBAA9B,MAAM,OAAO,KAAA,CAAA;oBACpB,IAAI,OAAO,EAAE;wBACT,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;qBAC1B;;;;;aACJ;;;;;;;;;QACD,OAAO,IAAI,yBAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;CACJ,CAAA;AAhBG;IAAC,IAAA,kBAAM,EAAC,qDAAwB,CAAC;8BACG,qDAAwB;0EAAC;AAFpD,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CAiBpC;AAjBY,4DAAwB"}
|
|
@@ -13,52 +13,20 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
import { CreateNodeOperation, CreateOperation, MaybePromise, Operation, Point, TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
|
|
18
|
-
import { ModelState } from '../features/model/model-state';
|
|
16
|
+
import { CreateEdgeOperation, CreateNodeOperation, TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
|
|
19
17
|
import { OperationHandler } from './operation-handler';
|
|
20
18
|
/**
|
|
21
19
|
* A special {@link OperationHandler} that is responsible for the handling of {@link CreateOperation}s. Depending on its
|
|
22
20
|
* operation type the triggered actions are {@link TriggerNodeCreationAction} or {@link TriggerEdgeCreationAction}s.
|
|
23
21
|
*/
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
abstract execute(operation: Operation): MaybePromise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Returns a list of {@link TriggerElementCreationAction}s for registered element types.
|
|
31
|
-
*
|
|
32
|
-
* @returns A list of {@link TriggerElementCreationAction}s.
|
|
33
|
-
*/
|
|
22
|
+
export interface CreateOperationHandler extends OperationHandler {
|
|
23
|
+
readonly label: string;
|
|
24
|
+
elementTypeIds: string[];
|
|
25
|
+
operationType: CreateOperationKind;
|
|
34
26
|
getTriggerActions(): (TriggerEdgeCreationAction | TriggerNodeCreationAction)[];
|
|
35
|
-
handles(operation: CreateOperation): boolean;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
export declare abstract class CreateNodeOperationHandler extends CreateOperationHandler {
|
|
42
|
-
protected modelState: ModelState;
|
|
43
|
-
get operationType(): string;
|
|
44
|
-
/**
|
|
45
|
-
* Retrieve the graphical model element that should contain the newly created {@link GNode}.
|
|
46
|
-
* If `undefined` is returned the {@link GNode} should be added directly to the diagram root.
|
|
47
|
-
* @param operation The currently handled operation.
|
|
48
|
-
* @returns The container {@link GModeElement} or `undefined`.
|
|
49
|
-
*/
|
|
50
|
-
getContainer(operation: CreateNodeOperation): GModelElement | undefined;
|
|
51
|
-
getLocation(operation: CreateNodeOperation): Point | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Retrieves the diagram absolute location and the target container from the given {@link CreateNodeOperation}
|
|
54
|
-
* and converts the absolute location to coordinates relative to the given container.
|
|
55
|
-
* Relative coordinates can only be retrieved if the given container element is part of
|
|
56
|
-
* a hierarchy of {@link GBoundsAware} elements. This means each (recursive) parent element need to
|
|
57
|
-
* implement {@link GBoundsAware}. If that is not the case this method returns `undefined`.
|
|
58
|
-
* @param absoluteLocation The diagram absolute position.
|
|
59
|
-
* @param container The container element.
|
|
60
|
-
* @returns The relative position or `undefined`.
|
|
61
|
-
*/
|
|
62
|
-
getRelativeLocation(operation: CreateNodeOperation): Point | undefined;
|
|
28
|
+
export type CreateOperationKind = typeof CreateNodeOperation.KIND | typeof CreateEdgeOperation.KIND;
|
|
29
|
+
export declare namespace CreateOperationHandler {
|
|
30
|
+
function is(object: unknown): object is CreateOperationHandler;
|
|
63
31
|
}
|
|
64
32
|
//# sourceMappingURL=create-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/operations/create-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"create-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/operations/create-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EAInB,yBAAyB,EACzB,yBAAyB,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,mBAAmB,CAAC;IACnC,iBAAiB,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC,EAAE,CAAC;CAClF;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAEpG,yBAAiB,sBAAsB,CAAC;IACpC,SAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,sBAAsB,CAOpE;CACJ"}
|
|
@@ -1,90 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
3
|
+
exports.CreateOperationHandler = 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
|
+
********************************************************************************/
|
|
13
19
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Returns a list of {@link TriggerElementCreationAction}s for registered element types.
|
|
24
|
-
*
|
|
25
|
-
* @returns A list of {@link TriggerElementCreationAction}s.
|
|
26
|
-
*/
|
|
27
|
-
getTriggerActions() {
|
|
28
|
-
if (this.operationType === protocol_1.CreateNodeOperation.KIND) {
|
|
29
|
-
return this.elementTypeIds.map(typeId => protocol_1.TriggerNodeCreationAction.create(typeId));
|
|
30
|
-
}
|
|
31
|
-
else if (this.operationType === protocol_1.CreateEdgeOperation.KIND) {
|
|
32
|
-
return this.elementTypeIds.map(typeId => protocol_1.TriggerEdgeCreationAction.create(typeId));
|
|
33
|
-
}
|
|
34
|
-
return [];
|
|
20
|
+
const operation_handler_1 = require("./operation-handler");
|
|
21
|
+
var CreateOperationHandler;
|
|
22
|
+
(function (CreateOperationHandler) {
|
|
23
|
+
function is(object) {
|
|
24
|
+
return (object instanceof operation_handler_1.OperationHandler &&
|
|
25
|
+
(0, protocol_1.hasStringProp)(object, 'label') &&
|
|
26
|
+
(0, protocol_1.hasArrayProp)(object, 'elementTypeIds') &&
|
|
27
|
+
(0, protocol_1.hasFunctionProp)(object, 'getTriggerActions'));
|
|
35
28
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
CreateOperationHandler = __decorate([
|
|
41
|
-
(0, inversify_1.injectable)()
|
|
42
|
-
], CreateOperationHandler);
|
|
43
|
-
exports.CreateOperationHandler = CreateOperationHandler;
|
|
44
|
-
/**
|
|
45
|
-
* Abstract base implementation for {@link CreateOperationHandler} that
|
|
46
|
-
* create an element that is represented with a {@link GNode} in the graphical model.
|
|
47
|
-
*/
|
|
48
|
-
let CreateNodeOperationHandler = class CreateNodeOperationHandler extends CreateOperationHandler {
|
|
49
|
-
get operationType() {
|
|
50
|
-
return protocol_1.CreateNodeOperation.KIND;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Retrieve the graphical model element that should contain the newly created {@link GNode}.
|
|
54
|
-
* If `undefined` is returned the {@link GNode} should be added directly to the diagram root.
|
|
55
|
-
* @param operation The currently handled operation.
|
|
56
|
-
* @returns The container {@link GModeElement} or `undefined`.
|
|
57
|
-
*/
|
|
58
|
-
getContainer(operation) {
|
|
59
|
-
const index = this.modelState.index;
|
|
60
|
-
return operation.containerId ? index.get(operation.containerId) : undefined;
|
|
61
|
-
}
|
|
62
|
-
getLocation(operation) {
|
|
63
|
-
return operation.location;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Retrieves the diagram absolute location and the target container from the given {@link CreateNodeOperation}
|
|
67
|
-
* and converts the absolute location to coordinates relative to the given container.
|
|
68
|
-
* Relative coordinates can only be retrieved if the given container element is part of
|
|
69
|
-
* a hierarchy of {@link GBoundsAware} elements. This means each (recursive) parent element need to
|
|
70
|
-
* implement {@link GBoundsAware}. If that is not the case this method returns `undefined`.
|
|
71
|
-
* @param absoluteLocation The diagram absolute position.
|
|
72
|
-
* @param container The container element.
|
|
73
|
-
* @returns The relative position or `undefined`.
|
|
74
|
-
*/
|
|
75
|
-
getRelativeLocation(operation) {
|
|
76
|
-
var _a, _b;
|
|
77
|
-
const container = (_a = this.getContainer(operation)) !== null && _a !== void 0 ? _a : this.modelState.root;
|
|
78
|
-
const absoluteLocation = (_b = this.getLocation(operation)) !== null && _b !== void 0 ? _b : protocol_1.Point.ORIGIN;
|
|
79
|
-
return (0, layout_util_1.getRelativeLocation)(absoluteLocation, container);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
84
|
-
__metadata("design:type", Object)
|
|
85
|
-
], CreateNodeOperationHandler.prototype, "modelState", void 0);
|
|
86
|
-
CreateNodeOperationHandler = __decorate([
|
|
87
|
-
(0, inversify_1.injectable)()
|
|
88
|
-
], CreateNodeOperationHandler);
|
|
89
|
-
exports.CreateNodeOperationHandler = CreateNodeOperationHandler;
|
|
29
|
+
CreateOperationHandler.is = is;
|
|
30
|
+
})(CreateOperationHandler = exports.CreateOperationHandler || (exports.CreateOperationHandler = {}));
|
|
90
31
|
//# sourceMappingURL=create-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-operation-handler.js","sourceRoot":"","sources":["../../../src/common/operations/create-operation-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-operation-handler.js","sourceRoot":"","sources":["../../../src/common/operations/create-operation-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAQgC;AAChC,2DAAuD;AAevD,IAAiB,sBAAsB,CAStC;AATD,WAAiB,sBAAsB;IACnC,SAAgB,EAAE,CAAC,MAAe;QAC9B,OAAO,CACH,MAAM,YAAY,oCAAgB;YAClC,IAAA,wBAAa,EAAC,MAAM,EAAE,OAAO,CAAC;YAC9B,IAAA,uBAAY,EAAC,MAAM,EAAE,gBAAgB,CAAC;YACtC,IAAA,0BAAe,EAAC,MAAM,EAAE,mBAAmB,CAAC,CAC/C,CAAC;IACN,CAAC;IAPe,yBAAE,KAOjB,CAAA;AACL,CAAC,EATgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAStC"}
|