@eclipse-glsp/server 1.1.0-next.f692ea4.55 → 2.0.0
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/launch/worker-server-launcher.js +2 -2
- package/lib/browser/launch/worker-server-launcher.js.map +1 -1
- package/lib/common/actions/action-dispatcher.d.ts +2 -1
- package/lib/common/actions/action-dispatcher.d.ts.map +1 -1
- package/lib/common/actions/action-dispatcher.js +9 -7
- package/lib/common/actions/action-dispatcher.js.map +1 -1
- package/lib/common/actions/action-handler-registry.js +4 -4
- package/lib/common/actions/action-handler-registry.js.map +1 -1
- package/lib/common/actions/client-action-handler.d.ts +17 -8
- package/lib/common/actions/client-action-handler.d.ts.map +1 -1
- package/lib/common/actions/client-action-handler.js +32 -22
- package/lib/common/actions/client-action-handler.js.map +1 -1
- package/lib/common/actions/global-action-provider.d.ts +6 -21
- package/lib/common/actions/global-action-provider.d.ts.map +1 -1
- package/lib/common/actions/global-action-provider.js +17 -22
- package/lib/common/actions/global-action-provider.js.map +1 -1
- package/lib/common/command/command-stack.js +2 -2
- package/lib/common/command/command-stack.js.map +1 -1
- package/lib/common/command/command.js +1 -1
- package/lib/common/command/command.js.map +1 -1
- package/lib/common/command/recording-command.d.ts +9 -15
- package/lib/common/command/recording-command.d.ts.map +1 -1
- package/lib/common/command/recording-command.js +12 -26
- package/lib/common/command/recording-command.js.map +1 -1
- package/lib/common/command/undo-redo-action-handler.js +2 -2
- package/lib/common/command/undo-redo-action-handler.js.map +1 -1
- package/lib/common/di/binding-target.d.ts.map +1 -1
- package/lib/common/di/binding-target.js +3 -2
- package/lib/common/di/binding-target.js.map +1 -1
- package/lib/common/di/client-session-module.d.ts +9 -1
- package/lib/common/di/client-session-module.d.ts.map +1 -1
- package/lib/common/di/client-session-module.js +9 -9
- package/lib/common/di/client-session-module.js.map +1 -1
- package/lib/common/di/diagram-module.d.ts +23 -1
- package/lib/common/di/diagram-module.d.ts.map +1 -1
- package/lib/common/di/diagram-module.js +23 -53
- package/lib/common/di/diagram-module.js.map +1 -1
- package/lib/common/di/glsp-module.js +2 -2
- package/lib/common/di/glsp-module.js.map +1 -1
- package/lib/common/di/server-module.d.ts +0 -1
- package/lib/common/di/server-module.d.ts.map +1 -1
- package/lib/common/di/server-module.js +0 -1
- package/lib/common/di/server-module.js.map +1 -1
- package/lib/common/diagram/diagram-configuration.js +1 -1
- package/lib/common/diagram/diagram-configuration.js.map +1 -1
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.d.ts.map +1 -1
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -2
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -1
- package/lib/common/features/contextactions/command-palette-action-provider.js +2 -2
- package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -2
- package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
- package/lib/common/features/contextactions/context-menu-item-provider.js +2 -2
- package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
- package/lib/common/features/contextactions/request-context-actions-handler.js +2 -2
- package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -4
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
- package/lib/common/features/directediting/context-edit-validator-registry.js +2 -2
- package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
- package/lib/common/features/directediting/label-edit-validator.js +2 -2
- package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
- package/lib/common/features/directediting/request-edit-validation-handler.js +2 -2
- package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
- package/lib/common/features/layout/computed-bounds-action-handler.js +2 -2
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
- package/lib/common/features/layout/layout-operation-handler.js +2 -2
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
- package/lib/common/features/model/gmodel-factory.js +2 -2
- package/lib/common/features/model/gmodel-factory.js.map +1 -1
- package/lib/common/features/model/gmodel-index.js +2 -2
- package/lib/common/features/model/gmodel-index.js.map +1 -1
- package/lib/common/features/model/gmodel-serializer.d.ts +10 -10
- package/lib/common/features/model/gmodel-serializer.d.ts.map +1 -1
- package/lib/common/features/model/gmodel-serializer.js +2 -2
- package/lib/common/features/model/gmodel-serializer.js.map +1 -1
- package/lib/common/features/model/model-state.d.ts.map +1 -1
- package/lib/common/features/model/model-state.js +5 -2
- package/lib/common/features/model/model-state.js.map +1 -1
- package/lib/common/features/model/model-submission-handler.d.ts +30 -3
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +73 -9
- package/lib/common/features/model/model-submission-handler.js.map +1 -1
- package/lib/common/features/model/request-model-action-handler.d.ts +5 -6
- package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
- package/lib/common/features/model/request-model-action-handler.js +37 -15
- package/lib/common/features/model/request-model-action-handler.js.map +1 -1
- package/lib/common/features/model/save-model-action-handler.js +2 -2
- package/lib/common/features/model/save-model-action-handler.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -2
- package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-resolver.js +2 -2
- package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -2
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -1
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +2 -2
- package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -1
- package/lib/common/features/popup/request-popup-model-action-handler.js +2 -2
- package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -1
- package/lib/common/features/progress/progress-service.d.ts +44 -0
- package/lib/common/features/progress/progress-service.d.ts.map +1 -0
- package/lib/common/features/progress/progress-service.js +51 -0
- package/lib/common/features/progress/progress-service.js.map +1 -0
- package/lib/common/features/type-hints/edge-creation-checker.d.ts +42 -0
- package/lib/common/features/type-hints/edge-creation-checker.d.ts.map +1 -0
- package/lib/common/features/type-hints/edge-creation-checker.js +20 -0
- package/lib/common/features/type-hints/edge-creation-checker.js.map +1 -0
- package/lib/common/features/type-hints/request-check-edge-action-handler.d.ts +29 -0
- package/lib/common/features/type-hints/request-check-edge-action-handler.d.ts.map +1 -0
- package/lib/common/features/type-hints/request-check-edge-action-handler.js +72 -0
- package/lib/common/features/type-hints/request-check-edge-action-handler.js.map +1 -0
- package/lib/common/{diagram → features/type-hints}/request-type-hints-action-handler.d.ts +2 -3
- package/lib/common/features/type-hints/request-type-hints-action-handler.d.ts.map +1 -0
- package/lib/common/{diagram → features/type-hints}/request-type-hints-action-handler.js +3 -4
- package/lib/common/features/type-hints/request-type-hints-action-handler.js.map +1 -0
- package/lib/common/features/validation/model-validator.d.ts +47 -2
- package/lib/common/features/validation/model-validator.d.ts.map +1 -1
- package/lib/common/features/validation/model-validator.js +80 -1
- package/lib/common/features/validation/model-validator.js.map +1 -1
- package/lib/common/features/validation/request-markers-handler.d.ts +15 -0
- package/lib/common/features/validation/request-markers-handler.d.ts.map +1 -1
- package/lib/common/features/validation/request-markers-handler.js +5 -11
- package/lib/common/features/validation/request-markers-handler.js.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -2
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js +2 -2
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -2
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
- package/lib/common/gmodel/cut-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/cut-operation-handler.js +7 -5
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.d.ts +1 -1
- package/lib/common/gmodel/delete-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.js +7 -7
- package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts +3 -3
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +2 -2
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts +3 -3
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js +2 -2
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.js +2 -2
- package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
- package/lib/common/gmodel/gmodel-operation-handler.js +1 -1
- package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.js +2 -2
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -2
- package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
- package/lib/common/index.d.ts +3 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +3 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/launch/glsp-server-launcher.js +2 -2
- package/lib/common/launch/glsp-server-launcher.js.map +1 -1
- package/lib/common/launch/jsonrpc-server-launcher.js +2 -2
- package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -1
- package/lib/common/operations/compound-operation-handler.d.ts +5 -0
- package/lib/common/operations/compound-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/compound-operation-handler.js +12 -12
- package/lib/common/operations/compound-operation-handler.js.map +1 -1
- package/lib/common/operations/create-operation-handler.d.ts +19 -5
- package/lib/common/operations/create-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/create-operation-handler.js +3 -2
- package/lib/common/operations/create-operation-handler.js.map +1 -1
- package/lib/common/operations/json-operation-handler.d.ts +94 -0
- package/lib/common/operations/json-operation-handler.d.ts.map +1 -0
- package/lib/common/operations/json-operation-handler.js +120 -0
- package/lib/common/operations/json-operation-handler.js.map +1 -0
- package/lib/common/operations/operation-action-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-action-handler.js +3 -3
- package/lib/common/operations/operation-action-handler.js.map +1 -1
- package/lib/common/operations/operation-handler-registry.d.ts +1 -9
- package/lib/common/operations/operation-handler-registry.d.ts.map +1 -1
- package/lib/common/operations/operation-handler-registry.js +4 -14
- package/lib/common/operations/operation-handler-registry.js.map +1 -1
- package/lib/common/operations/operation-handler.d.ts +2 -2
- package/lib/common/operations/operation-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-handler.js +2 -2
- package/lib/common/operations/operation-handler.js.map +1 -1
- package/lib/common/protocol/client-action.d.ts +31 -0
- package/lib/common/protocol/client-action.d.ts.map +1 -0
- package/lib/common/protocol/client-action.js +35 -0
- package/lib/common/protocol/client-action.js.map +1 -0
- package/lib/common/protocol/glsp-server.d.ts +1 -1
- package/lib/common/protocol/glsp-server.d.ts.map +1 -1
- package/lib/common/protocol/glsp-server.js +9 -11
- package/lib/common/protocol/glsp-server.js.map +1 -1
- package/lib/common/session/client-session-factory.js +5 -5
- package/lib/common/session/client-session-factory.js.map +1 -1
- package/lib/common/session/client-session-manager.js +2 -2
- package/lib/common/session/client-session-manager.js.map +1 -1
- package/lib/common/utils/args-util.js +2 -2
- package/lib/common/utils/args-util.js.map +1 -1
- package/lib/common/utils/client-options-util.d.ts +3 -0
- package/lib/common/utils/client-options-util.d.ts.map +1 -1
- package/lib/common/utils/client-options-util.js +5 -15
- package/lib/common/utils/client-options-util.js.map +1 -1
- package/lib/common/utils/console-logger.js +2 -2
- package/lib/common/utils/console-logger.js.map +1 -1
- package/lib/common/utils/logger.d.ts.map +1 -1
- package/lib/common/utils/logger.js +5 -4
- package/lib/common/utils/logger.js.map +1 -1
- package/lib/common/utils/promise-queue.d.ts.map +1 -1
- package/lib/common/utils/promise-queue.js +3 -6
- package/lib/common/utils/promise-queue.js.map +1 -1
- package/lib/common/utils/registry.d.ts +3 -1
- package/lib/common/utils/registry.d.ts.map +1 -1
- package/lib/common/utils/registry.js +15 -6
- package/lib/common/utils/registry.js.map +1 -1
- package/lib/node/abstract-json-model-storage.d.ts.map +1 -1
- package/lib/node/abstract-json-model-storage.js +10 -4
- package/lib/node/abstract-json-model-storage.js.map +1 -1
- package/lib/node/gmodel/gmodel-storage.d.ts.map +1 -1
- package/lib/node/gmodel/gmodel-storage.js +4 -3
- package/lib/node/gmodel/gmodel-storage.js.map +1 -1
- package/lib/node/launch/cli-parser.js +1 -1
- package/lib/node/launch/cli-parser.js.map +1 -1
- package/lib/node/launch/socket-server-launcher.js +2 -2
- package/lib/node/launch/socket-server-launcher.js.map +1 -1
- package/lib/node/launch/websocket-server-launcher.js +2 -2
- package/lib/node/launch/websocket-server-launcher.js.map +1 -1
- package/package.json +7 -6
- package/src/common/actions/action-dispatcher.spec.ts +3 -2
- package/src/common/actions/action-dispatcher.ts +8 -5
- package/src/common/actions/client-action-handler.ts +28 -18
- package/src/common/actions/global-action-provider.spec.ts +4 -15
- package/src/common/actions/global-action-provider.ts +21 -25
- package/src/common/command/recording-command.spec.ts +15 -5
- package/src/common/command/recording-command.ts +16 -27
- package/src/common/di/binding-target.ts +1 -0
- package/src/common/di/client-session-module.ts +17 -10
- package/src/common/di/diagram-module.ts +31 -70
- package/src/common/di/server-module.ts +0 -1
- package/src/common/features/clipboard/request-clipboard-data-action-handler.ts +3 -3
- package/src/common/features/model/gmodel-serializer.ts +11 -11
- package/src/common/features/model/model-state.ts +3 -0
- package/src/common/features/model/model-submission-handler.ts +64 -7
- package/src/common/features/model/request-model-action-handler.ts +37 -17
- package/src/common/features/progress/progress-service.ts +74 -0
- package/src/common/features/type-hints/edge-creation-checker.ts +44 -0
- package/src/common/features/type-hints/request-check-edge-action-handler.ts +62 -0
- package/src/common/{diagram → features/type-hints}/request-type-hints-action-handler.spec.ts +2 -2
- package/src/common/{diagram → features/type-hints}/request-type-hints-action-handler.ts +2 -3
- package/src/common/features/validation/model-validator.ts +75 -3
- package/src/common/features/validation/request-markers-handler.ts +4 -10
- package/src/common/gmodel/cut-operation-handler.ts +5 -3
- package/src/common/gmodel/delete-operation-handler.ts +6 -5
- package/src/common/gmodel/gmodel-create-edge-operation-handler.ts +3 -3
- package/src/common/gmodel/gmodel-create-node-operation-handler.ts +3 -3
- package/src/common/gmodel/paste-operation-handler.ts +2 -2
- package/src/common/index.ts +3 -1
- package/src/common/operations/compound-operation-handler.ts +6 -1
- package/src/common/operations/create-operation-handler.ts +22 -5
- package/src/common/operations/json-operation-handler.ts +147 -0
- package/src/common/operations/operation-action-handler.ts +2 -2
- package/src/common/operations/operation-handler-registry.ts +1 -12
- package/src/common/operations/operation-handler.ts +2 -2
- package/src/common/protocol/client-action.ts +38 -0
- package/src/common/protocol/glsp-server.spec.ts +11 -10
- package/src/common/protocol/glsp-server.ts +11 -14
- package/src/common/session/client-session-factory.spec.ts +2 -2
- package/src/common/session/client-session-factory.ts +3 -3
- package/src/common/session/client-session-manager.spec.ts +4 -3
- package/src/common/utils/args-util.ts +1 -1
- package/src/common/utils/client-options-util.ts +8 -0
- package/src/common/utils/logger.ts +2 -1
- package/src/common/utils/promise-queue.ts +4 -5
- package/src/common/utils/registry.spec.ts +3 -1
- package/src/common/utils/registry.ts +8 -3
- package/src/node/abstract-json-model-storage.ts +8 -2
- package/src/node/gmodel/gmodel-storage.ts +3 -3
- package/src/node/launch/cli-parser.ts +1 -1
- package/lib/common/diagram/request-type-hints-action-handler.d.ts.map +0 -1
- package/lib/common/diagram/request-type-hints-action-handler.js.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
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 { Action, MaybePromise, RequestCheckEdgeAction } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { ActionHandler } from '../../actions/action-handler';
|
|
18
|
+
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
19
|
+
import { ModelState } from '../model/model-state';
|
|
20
|
+
import { EdgeCreationChecker } from './edge-creation-checker';
|
|
21
|
+
export declare class RequestCheckEdgeActionHandler implements ActionHandler {
|
|
22
|
+
protected modelState: ModelState;
|
|
23
|
+
protected diagramConfiguration: DiagramConfiguration;
|
|
24
|
+
protected edgeCreationChecker?: EdgeCreationChecker;
|
|
25
|
+
readonly actionKinds: string[];
|
|
26
|
+
execute(action: RequestCheckEdgeAction): MaybePromise<Action[]>;
|
|
27
|
+
protected validate(action: RequestCheckEdgeAction): boolean;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=request-check-edge-action-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-check-edge-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/type-hints/request-check-edge-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAyB,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBACa,6BAA8B,YAAW,aAAa;IAE/D,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAGjC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAIrD,SAAS,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAEpD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAiC;IAE/D,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAQ/D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO;CAgB9D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RequestCheckEdgeActionHandler = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2023 EclipseSource 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");
|
|
29
|
+
const inversify_1 = require("inversify");
|
|
30
|
+
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
31
|
+
const glsp_server_error_1 = require("../../utils/glsp-server-error");
|
|
32
|
+
const model_state_1 = require("../model/model-state");
|
|
33
|
+
const edge_creation_checker_1 = require("./edge-creation-checker");
|
|
34
|
+
let RequestCheckEdgeActionHandler = class RequestCheckEdgeActionHandler {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.actionKinds = [protocol_1.RequestCheckEdgeAction.KIND];
|
|
37
|
+
}
|
|
38
|
+
execute(action) {
|
|
39
|
+
const hasDynamicHint = this.diagramConfiguration.edgeTypeHints.some(hint => hint.elementTypeId === action.edgeType && hint.dynamic);
|
|
40
|
+
const { edgeType, sourceElementId, targetElementId } = action;
|
|
41
|
+
const isValid = this.edgeCreationChecker && hasDynamicHint ? this.validate(action) : true;
|
|
42
|
+
return [protocol_1.CheckEdgeResultAction.create({ edgeType, isValid, sourceElementId, targetElementId })];
|
|
43
|
+
}
|
|
44
|
+
validate(action) {
|
|
45
|
+
const sourceElement = (0, glsp_server_error_1.getOrThrow)(this.modelState.index.get(action.sourceElementId), 'Invalid `RequestCheckEdgeTargetAction`!. Could not find a source element with id: ' + action.sourceElementId);
|
|
46
|
+
const targetElement = action.targetElementId ? this.modelState.index.get(action.targetElementId) : undefined;
|
|
47
|
+
if (action.targetElementId && !targetElement) {
|
|
48
|
+
throw new glsp_server_error_1.GLSPServerError('Invalid `RequestCheckEdgeTargetAction`! Could not find a target element with id: ' + action.targetElementId);
|
|
49
|
+
}
|
|
50
|
+
return targetElement
|
|
51
|
+
? this.edgeCreationChecker.isValidTarget(action.edgeType, sourceElement, targetElement)
|
|
52
|
+
: this.edgeCreationChecker.isValidSource(action.edgeType, sourceElement);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.RequestCheckEdgeActionHandler = RequestCheckEdgeActionHandler;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], RequestCheckEdgeActionHandler.prototype, "modelState", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, inversify_1.inject)(diagram_configuration_1.DiagramConfiguration),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], RequestCheckEdgeActionHandler.prototype, "diagramConfiguration", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, inversify_1.inject)(edge_creation_checker_1.EdgeCreationChecker),
|
|
66
|
+
(0, inversify_1.optional)(),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], RequestCheckEdgeActionHandler.prototype, "edgeCreationChecker", void 0);
|
|
69
|
+
exports.RequestCheckEdgeActionHandler = RequestCheckEdgeActionHandler = __decorate([
|
|
70
|
+
(0, inversify_1.injectable)()
|
|
71
|
+
], RequestCheckEdgeActionHandler);
|
|
72
|
+
//# sourceMappingURL=request-check-edge-action-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-check-edge-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/type-hints/request-check-edge-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA6G;AAC7G,yCAAyD;AAEzD,+EAA2E;AAC3E,qEAA4E;AAC5E,sDAAkD;AAClD,mEAA8D;AAGvD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QAWM,gBAAW,GAAa,CAAC,iCAAsB,CAAC,IAAI,CAAC,CAAC;IA0BnE,CAAC;IAxBG,OAAO,CAAC,MAA8B;QAClC,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,KAAK,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;QACpI,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAE1F,OAAO,CAAC,gCAAqB,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;IACnG,CAAC;IAES,QAAQ,CAAC,MAA8B;QAC7C,MAAM,aAAa,GAAG,IAAA,8BAAU,EAC5B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,EACjD,oFAAoF,GAAG,MAAM,CAAC,eAAe,CAChH,CAAC;QACF,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE7G,IAAI,MAAM,CAAC,eAAe,IAAI,CAAC,aAAa,EAAE;YAC1C,MAAM,IAAI,mCAAe,CACrB,mFAAmF,GAAG,MAAM,CAAC,eAAe,CAC/G,CAAC;SACL;QACD,OAAO,aAAa;YAChB,CAAC,CAAC,IAAI,CAAC,mBAAoB,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,CAAC;YACxF,CAAC,CAAC,IAAI,CAAC,mBAAoB,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;CACJ,CAAA;AArCY,sEAA6B;AAE5B;IADT,IAAA,kBAAM,EAAC,wBAAU,CAAC;;iEACc;AAGvB;IADT,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;2EACwB;AAI3C;IAFT,IAAA,kBAAM,EAAC,2CAAmB,CAAC;IAC3B,IAAA,oBAAQ,GAAE;;0EACyC;wCAT3C,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAqCzC"}
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, MaybePromise, RequestTypeHintsAction } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { ActionHandler } from '
|
|
18
|
-
import { DiagramConfiguration } from '
|
|
17
|
+
import { ActionHandler } from '../../actions/action-handler';
|
|
18
|
+
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
19
19
|
export declare class RequestTypeHintsActionHandler implements ActionHandler {
|
|
20
20
|
protected diagramConfiguration: DiagramConfiguration;
|
|
21
|
-
static KINDS: string[];
|
|
22
21
|
execute(action: RequestTypeHintsAction): MaybePromise<Action[]>;
|
|
23
22
|
readonly actionKinds: string[];
|
|
24
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-type-hints-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/type-hints/request-type-hints-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,sBAAsB,EAAsB,MAAM,wBAAwB,CAAC;AAE1G,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,qBACa,6BAA8B,YAAW,aAAa;IACjC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAEnF,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAS/D,QAAQ,CAAC,WAAW,WAAiC;CACxD"}
|
|
@@ -27,7 +27,7 @@ exports.RequestTypeHintsActionHandler = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
-
const diagram_configuration_1 = require("
|
|
30
|
+
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
31
31
|
let RequestTypeHintsActionHandler = class RequestTypeHintsActionHandler {
|
|
32
32
|
constructor() {
|
|
33
33
|
this.actionKinds = [protocol_1.RequestTypeHintsAction.KIND];
|
|
@@ -41,13 +41,12 @@ let RequestTypeHintsActionHandler = class RequestTypeHintsActionHandler {
|
|
|
41
41
|
];
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
RequestTypeHintsActionHandler
|
|
44
|
+
exports.RequestTypeHintsActionHandler = RequestTypeHintsActionHandler;
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, inversify_1.inject)(diagram_configuration_1.DiagramConfiguration),
|
|
47
47
|
__metadata("design:type", Object)
|
|
48
48
|
], RequestTypeHintsActionHandler.prototype, "diagramConfiguration", void 0);
|
|
49
|
-
RequestTypeHintsActionHandler = __decorate([
|
|
49
|
+
exports.RequestTypeHintsActionHandler = RequestTypeHintsActionHandler = __decorate([
|
|
50
50
|
(0, inversify_1.injectable)()
|
|
51
51
|
], RequestTypeHintsActionHandler);
|
|
52
|
-
exports.RequestTypeHintsActionHandler = RequestTypeHintsActionHandler;
|
|
53
52
|
//# sourceMappingURL=request-type-hints-action-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-type-hints-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/type-hints/request-type-hints-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA0G;AAC1G,yCAA+C;AAE/C,+EAA2E;AAGpE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QAYM,gBAAW,GAAG,CAAC,iCAAsB,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAVG,OAAO,CAAC,MAA8B;QAClC,OAAO;YACH,6BAAkB,CAAC,MAAM,CAAC;gBACtB,UAAU,EAAE,IAAI,CAAC,oBAAoB,CAAC,cAAc;gBACpD,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,aAAa;aACrD,CAAC;SACL,CAAC;IACN,CAAC;CAGJ,CAAA;AAbY,sEAA6B;AACE;IAAvC,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;2EAAsD;wCAD1E,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAazC"}
|
|
@@ -26,8 +26,53 @@ export interface ModelValidator {
|
|
|
26
26
|
* Validates the given list of {@link GModelElement}s and returns a list of {@link Marker}s.
|
|
27
27
|
*
|
|
28
28
|
* @param elements The list of {@link GModelElement} to validate.
|
|
29
|
-
* @
|
|
29
|
+
* @param reason The reason for a validation request, such as "batch" or "live" validation.
|
|
30
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}s.
|
|
30
31
|
*/
|
|
31
|
-
validate(elements: GModelElement[]): MaybePromise<Marker[]>;
|
|
32
|
+
validate(elements: GModelElement[], reason?: string): MaybePromise<Marker[]>;
|
|
33
|
+
}
|
|
34
|
+
export declare abstract class AbstractModelValidator implements ModelValidator {
|
|
35
|
+
validate(elements: GModelElement[], reason: string): Marker[];
|
|
36
|
+
/**
|
|
37
|
+
* Perform the live validation rules for the given <code>element</code>.
|
|
38
|
+
*
|
|
39
|
+
* This will be invoked on start and after each operation for all elements.
|
|
40
|
+
* Thus, the validation should be rather inexpensive.
|
|
41
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
42
|
+
* this method for all children anyway.
|
|
43
|
+
*
|
|
44
|
+
* @param element The element to validate.
|
|
45
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
46
|
+
*/
|
|
47
|
+
doLiveValidation(element: GModelElement): Marker[];
|
|
48
|
+
/**
|
|
49
|
+
* Perform the batch validation rules for the given <code>element</code>.
|
|
50
|
+
*
|
|
51
|
+
* <p>
|
|
52
|
+
* This will be invoked on demand by the client.
|
|
53
|
+
* Thus, the validation can include more expensive validation rules.
|
|
54
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
55
|
+
* this method for all children anyway.
|
|
56
|
+
* </p>
|
|
57
|
+
*
|
|
58
|
+
* @param element The element to validate.
|
|
59
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
60
|
+
*/
|
|
61
|
+
doBatchValidation(element: GModelElement): Marker[];
|
|
62
|
+
/**
|
|
63
|
+
* Perform a validation for a custom <code>reason</code> with the given <code>element</code>.
|
|
64
|
+
*
|
|
65
|
+
* <p>
|
|
66
|
+
* GLSP editors may add custom reasons for triggering a validation, other than <code>live</code> and
|
|
67
|
+
* <code>batch</code>.
|
|
68
|
+
* Validation requests that are not live or batch validations will be handled by this method.
|
|
69
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
70
|
+
* this method for all children anyway.
|
|
71
|
+
* </p>
|
|
72
|
+
*
|
|
73
|
+
* @param element The element to validate.
|
|
74
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
75
|
+
*/
|
|
76
|
+
doValidationForCustomReason(element: GModelElement): Marker[];
|
|
32
77
|
}
|
|
33
78
|
//# sourceMappingURL=model-validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-validator.d.ts","sourceRoot":"","sources":["../../../../src/common/features/validation/model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"model-validator.d.ts","sourceRoot":"","sources":["../../../../src/common/features/validation/model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG7E,eAAO,MAAM,cAAc,eAA2B,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;CAChF;AAED,8BACsB,sBAAuB,YAAW,cAAc;IAClE,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;IAiB7D;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE;IAIlD;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE;IAInD;;;;;;;;;;;;;OAaG;IACH,2BAA2B,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE;CAGhE"}
|
|
@@ -1,5 +1,84 @@
|
|
|
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
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelValidator = void 0;
|
|
9
|
+
exports.AbstractModelValidator = exports.ModelValidator = void 0;
|
|
10
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
11
|
+
const inversify_1 = require("inversify");
|
|
4
12
|
exports.ModelValidator = Symbol('ModelValidator');
|
|
13
|
+
let AbstractModelValidator = class AbstractModelValidator {
|
|
14
|
+
validate(elements, reason) {
|
|
15
|
+
const markers = [];
|
|
16
|
+
for (const element of elements) {
|
|
17
|
+
if (protocol_1.MarkersReason.LIVE === reason) {
|
|
18
|
+
markers.push(...this.doLiveValidation(element));
|
|
19
|
+
}
|
|
20
|
+
else if (protocol_1.MarkersReason.BATCH === reason) {
|
|
21
|
+
markers.push(...this.doBatchValidation(element));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
markers.push(...this.doValidationForCustomReason(element));
|
|
25
|
+
}
|
|
26
|
+
if (element.children) {
|
|
27
|
+
markers.push(...this.validate(element.children, reason));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return markers;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Perform the live validation rules for the given <code>element</code>.
|
|
34
|
+
*
|
|
35
|
+
* This will be invoked on start and after each operation for all elements.
|
|
36
|
+
* Thus, the validation should be rather inexpensive.
|
|
37
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
38
|
+
* this method for all children anyway.
|
|
39
|
+
*
|
|
40
|
+
* @param element The element to validate.
|
|
41
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
42
|
+
*/
|
|
43
|
+
doLiveValidation(element) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Perform the batch validation rules for the given <code>element</code>.
|
|
48
|
+
*
|
|
49
|
+
* <p>
|
|
50
|
+
* This will be invoked on demand by the client.
|
|
51
|
+
* Thus, the validation can include more expensive validation rules.
|
|
52
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
53
|
+
* this method for all children anyway.
|
|
54
|
+
* </p>
|
|
55
|
+
*
|
|
56
|
+
* @param element The element to validate.
|
|
57
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
58
|
+
*/
|
|
59
|
+
doBatchValidation(element) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Perform a validation for a custom <code>reason</code> with the given <code>element</code>.
|
|
64
|
+
*
|
|
65
|
+
* <p>
|
|
66
|
+
* GLSP editors may add custom reasons for triggering a validation, other than <code>live</code> and
|
|
67
|
+
* <code>batch</code>.
|
|
68
|
+
* Validation requests that are not live or batch validations will be handled by this method.
|
|
69
|
+
* There is no need to traverse through the children in this method as {@link #validate(List, String)} will invoke
|
|
70
|
+
* this method for all children anyway.
|
|
71
|
+
* </p>
|
|
72
|
+
*
|
|
73
|
+
* @param element The element to validate.
|
|
74
|
+
* @return A list of {@link Marker}s for the validated {@link GModelElement}.
|
|
75
|
+
*/
|
|
76
|
+
doValidationForCustomReason(element) {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
exports.AbstractModelValidator = AbstractModelValidator;
|
|
81
|
+
exports.AbstractModelValidator = AbstractModelValidator = __decorate([
|
|
82
|
+
(0, inversify_1.injectable)()
|
|
83
|
+
], AbstractModelValidator);
|
|
5
84
|
//# sourceMappingURL=model-validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-validator.js","sourceRoot":"","sources":["../../../../src/common/features/validation/model-validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-validator.js","sourceRoot":"","sources":["../../../../src/common/features/validation/model-validator.ts"],"names":[],"mappings":";;;;;;;;;AAgBA,qDAA6E;AAC7E,yCAAuC;AAE1B,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAmBhD,IAAe,sBAAsB,GAArC,MAAe,sBAAsB;IACxC,QAAQ,CAAC,QAAyB,EAAE,MAAc;QAC9C,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,IAAI,wBAAa,CAAC,IAAI,KAAK,MAAM,EAAE;gBAC/B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;aACnD;iBAAM,IAAI,wBAAa,CAAC,KAAK,KAAK,MAAM,EAAE;gBACvC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;aACpD;iBAAM;gBACH,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAAC;aAC9D;YACD,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAClB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;aAC5D;SACJ;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,OAAsB;QACnC,OAAO,EAAE,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,OAAsB;QACpC,OAAO,EAAE,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,2BAA2B,CAAC,OAAsB;QAC9C,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAnEqB,wDAAsB;iCAAtB,sBAAsB;IAD3C,IAAA,sBAAU,GAAE;GACS,sBAAsB,CAmE3C"}
|
|
@@ -1,3 +1,18 @@
|
|
|
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
|
+
********************************************************************************/
|
|
1
16
|
import { Action, RequestMarkersAction } from '@eclipse-glsp/protocol';
|
|
2
17
|
import { ActionHandler } from '../../actions/action-handler';
|
|
3
18
|
import { ModelState } from '../model/model-state';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-markers-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/validation/request-markers-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-markers-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/validation/request-markers-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAiB,oBAAoB,EAAoB,MAAM,wBAAwB,CAAC;AAEvG,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBACa,qBAAsB,YAAW,aAAa;IACvD,WAAW,WAA+B;IAEN,SAAS,EAAE,cAAc,CAAC;IAC1C,UAAU,EAAE,UAAU,CAAC;IAErC,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAejE"}
|
|
@@ -25,7 +25,6 @@ exports.RequestMarkersHandler = void 0;
|
|
|
25
25
|
*
|
|
26
26
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
27
|
********************************************************************************/
|
|
28
|
-
const graph_1 = require("@eclipse-glsp/graph");
|
|
29
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
30
29
|
const inversify_1 = require("inversify");
|
|
31
30
|
const glsp_server_error_1 = require("../../utils/glsp-server-error");
|
|
@@ -36,6 +35,7 @@ let RequestMarkersHandler = class RequestMarkersHandler {
|
|
|
36
35
|
this.actionKinds = [protocol_1.RequestMarkersAction.KIND];
|
|
37
36
|
}
|
|
38
37
|
async execute(action) {
|
|
38
|
+
var _a;
|
|
39
39
|
let elementIDs = action.elementsIDs;
|
|
40
40
|
if (!this.validator) {
|
|
41
41
|
throw new glsp_server_error_1.GLSPServerError('Cannot compute markers! No implementation for ModelValidator has been bound');
|
|
@@ -43,17 +43,12 @@ let RequestMarkersHandler = class RequestMarkersHandler {
|
|
|
43
43
|
if (!elementIDs || elementIDs.length === 0 || (elementIDs.length === 1 && elementIDs[0] === 'EMPTY')) {
|
|
44
44
|
elementIDs = [this.modelState.root.id];
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
for (const elementID of elementIDs) {
|
|
49
|
-
const modelElement = currentModelIndex.findByClass(elementID, graph_1.GGraph);
|
|
50
|
-
if (modelElement) {
|
|
51
|
-
markers = markers.concat(await this.validator.validate([modelElement]));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
46
|
+
const modelElements = this.modelState.index.getAll(elementIDs);
|
|
47
|
+
const markers = await this.validator.validate(modelElements, (_a = action.reason) !== null && _a !== void 0 ? _a : protocol_1.MarkersReason.BATCH);
|
|
54
48
|
return [protocol_1.SetMarkersAction.create(markers)];
|
|
55
49
|
}
|
|
56
50
|
};
|
|
51
|
+
exports.RequestMarkersHandler = RequestMarkersHandler;
|
|
57
52
|
__decorate([
|
|
58
53
|
(0, inversify_1.inject)(model_validator_1.ModelValidator),
|
|
59
54
|
(0, inversify_1.optional)(),
|
|
@@ -63,8 +58,7 @@ __decorate([
|
|
|
63
58
|
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
64
59
|
__metadata("design:type", Object)
|
|
65
60
|
], RequestMarkersHandler.prototype, "modelState", void 0);
|
|
66
|
-
RequestMarkersHandler = __decorate([
|
|
61
|
+
exports.RequestMarkersHandler = RequestMarkersHandler = __decorate([
|
|
67
62
|
(0, inversify_1.injectable)()
|
|
68
63
|
], RequestMarkersHandler);
|
|
69
|
-
exports.RequestMarkersHandler = RequestMarkersHandler;
|
|
70
64
|
//# sourceMappingURL=request-markers-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-markers-handler.js","sourceRoot":"","sources":["../../../../src/common/features/validation/request-markers-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF
|
|
1
|
+
{"version":3,"file":"request-markers-handler.js","sourceRoot":"","sources":["../../../../src/common/features/validation/request-markers-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuG;AACvG,yCAAyD;AAEzD,qEAAgE;AAChE,sDAAkD;AAClD,uDAAmD;AAG5C,IAAM,qBAAqB,GAA3B,MAAM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GModelApplyLabelEditOperationHandler = GModelApplyLabelEditOperationHandler;
|
|
43
|
+
exports.GModelApplyLabelEditOperationHandler = GModelApplyLabelEditOperationHandler = __decorate([
|
|
43
44
|
(0, inversify_1.injectable)()
|
|
44
45
|
], GModelApplyLabelEditOperationHandler);
|
|
45
|
-
exports.GModelApplyLabelEditOperationHandler = GModelApplyLabelEditOperationHandler;
|
|
46
46
|
//# sourceMappingURL=apply-label-edit-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-label-edit-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/apply-label-edit-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAA6C;AAC7C,qDAA+E;AAC/E,yCAAuC;AAEvC,kEAAwD;AACxD,yEAAoE;AAG7D,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,iDAAsB;IAAzE;;QACM,kBAAa,GAAG,kCAAuB,CAAC,IAAI,CAAC;IAW1D,CAAC;IATG,aAAa,CAAC,SAAkC;QAC5C,MAAM,KAAK,GAAG,IAAA,8BAAU,EACpB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,EAAE,cAAM,CAAC,EAC5D,6DAA6D,CAChE,CAAC;QACF,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE;YACnC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;CACJ,CAAA;AAZY,oCAAoC;IADhD,IAAA,sBAAU,GAAE;GACA,oCAAoC,CAYhD
|
|
1
|
+
{"version":3,"file":"apply-label-edit-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/apply-label-edit-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAA6C;AAC7C,qDAA+E;AAC/E,yCAAuC;AAEvC,kEAAwD;AACxD,yEAAoE;AAG7D,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,iDAAsB;IAAzE;;QACM,kBAAa,GAAG,kCAAuB,CAAC,IAAI,CAAC;IAW1D,CAAC;IATG,aAAa,CAAC,SAAkC;QAC5C,MAAM,KAAK,GAAG,IAAA,8BAAU,EACpB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,EAAE,cAAM,CAAC,EAC5D,6DAA6D,CAChE,CAAC;QACF,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE;YACnC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;CACJ,CAAA;AAZY,oFAAoC;+CAApC,oCAAoC;IADhD,IAAA,sBAAU,GAAE;GACA,oCAAoC,CAYhD"}
|
|
@@ -64,8 +64,8 @@ let GModelChangeBoundsOperationHandler = class GModelChangeBoundsOperationHandle
|
|
|
64
64
|
nodeToUpdate.position = positionToSet;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
GModelChangeBoundsOperationHandler =
|
|
67
|
+
exports.GModelChangeBoundsOperationHandler = GModelChangeBoundsOperationHandler;
|
|
68
|
+
exports.GModelChangeBoundsOperationHandler = GModelChangeBoundsOperationHandler = __decorate([
|
|
68
69
|
(0, inversify_1.injectable)()
|
|
69
70
|
], GModelChangeBoundsOperationHandler);
|
|
70
|
-
exports.GModelChangeBoundsOperationHandler = GModelChangeBoundsOperationHandler;
|
|
71
71
|
//# sourceMappingURL=change-bounds-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-bounds-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-bounds-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAwD;AACxD,qDAA+F;AAC/F,yCAAuC;AAEvC,yEAAoE;AAEpE;;GAEG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,iDAAsB;IAAvE;;QACH,kBAAa,GAAG,gCAAqB,CAAC,IAAI,CAAC;IAmC/C,CAAC;IAjCG,aAAa,CAAC,SAAgC;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IACrE,CAAC;IAES,mBAAmB,CAAC,SAAgC;QAC1D,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,SAAS,EAAE;YACvC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;SACrF;IACL,CAAC;IAES,mBAAmB,CAAC,SAAiB,EAAE,OAAkB,EAAE,WAA8B;QAC/F,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,aAAK,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,EAAE;YACf,OAAO;SACV;QAED,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;QACnC,IAAI,aAAa,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACnC,IAAI,WAAW,EAAE;YACb,aAAa,GAAG,MAAM,YAAY,kBAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;SACjI;QACD,IAAI,YAAY,CAAC,MAAM,EAAE;YACrB,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE;gBAC7B,YAAY,CAAC,aAAa,GAAG,EAAE,CAAC;aACnC;YACD,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;YACxD,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;SAC7D;QAED,YAAY,CAAC,IAAI,GAAG,OAAO,CAAC;QAC5B,YAAY,CAAC,QAAQ,GAAG,aAAa,CAAC;IAC1C,CAAC;CACJ,CAAA;AApCY,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;GACA,kCAAkC,CAoC9C
|
|
1
|
+
{"version":3,"file":"change-bounds-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-bounds-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAwD;AACxD,qDAA+F;AAC/F,yCAAuC;AAEvC,yEAAoE;AAEpE;;GAEG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,iDAAsB;IAAvE;;QACH,kBAAa,GAAG,gCAAqB,CAAC,IAAI,CAAC;IAmC/C,CAAC;IAjCG,aAAa,CAAC,SAAgC;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IACrE,CAAC;IAES,mBAAmB,CAAC,SAAgC;QAC1D,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,SAAS,EAAE;YACvC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;S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ach(routingPoints => (0, layout_util_1.applyRoutingPoints)(routingPoints, index));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
GModelChangeRoutingPointsOperationHandler =
|
|
46
|
+
exports.GModelChangeRoutingPointsOperationHandler = GModelChangeRoutingPointsOperationHandler;
|
|
47
|
+
exports.GModelChangeRoutingPointsOperationHandler = GModelChangeRoutingPointsOperationHandler = __decorate([
|
|
47
48
|
(0, inversify_1.injectable)()
|
|
48
49
|
], GModelChangeRoutingPointsOperationHandler);
|
|
49
|
-
exports.GModelChangeRoutingPointsOperationHandler = GModelChangeRoutingPointsOperationHandler;
|
|
50
50
|
//# sourceMappingURL=change-routing-points-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-routing-points-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-routing-points-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,qDAAoF;AACpF,yCAAuC;AAEvC,kEAA6D;AAC7D,sDAA0D;AAC1D,yEAAoE;AAG7D,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,iDAAsB;IAA9E;;QACH,kBAAa,GAAG,uCAA4B,CAAC,IAAI,CAAC;IActD,CAAC;IAZG,aAAa,CAAC,SAAuC;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,0BAA0B,CAAC,SAAuC;QAC9D,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;YAC7B,MAAM,IAAI,mCAAe,CAAC,yCAAyC,CAAC,CAAC;SACxE;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,IAAA,gCAAkB,EAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AAfY,yCAAyC;IADrD,IAAA,sBAAU,GAAE;GACA,yCAAyC,CAerD
|
|
1
|
+
{"version":3,"file":"change-routing-points-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-routing-points-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,qDAAoF;AACpF,yCAAuC;AAEvC,kEAA6D;AAC7D,sDAA0D;AAC1D,yEAAoE;AAG7D,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,iDAAsB;IAA9E;;QACH,kBAAa,GAAG,uCAA4B,CAAC,IAAI,CAAC;IActD,CAAC;IAZG,aAAa,CAAC,SAAuC;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,0BAA0B,CAAC,SAAuC;QAC9D,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;YAC7B,MAAM,IAAI,mCAAe,CAAC,yCAAyC,CAAC,CAAC;SACxE;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,IAAA,gCAAkB,EAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AAfY,8FAAyC;oDAAzC,yCAAyC;IADrD,IAAA,sBAAU,GAAE;GACA,yCAAyC,CAerD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cut-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAA0B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBACa,yBAA0B,SAAQ,sBAAsB;IACjE,QAAQ,CAAC,aAAa,SAAqB;IAG3C,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,aAAa,CAAC,SAAS,EAAE,YAAY,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"cut-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAA0B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBACa,yBAA0B,SAAQ,sBAAsB;IACjE,QAAQ,CAAC,aAAa,SAAqB;IAG3C,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,aAAa,CAAC,SAAS,EAAE,YAAY,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IASzE,SAAS,CAAC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,EAAE;CAGlE"}
|
|
@@ -36,20 +36,22 @@ let GModelCutOperationHandler = class GModelCutOperationHandler extends gmodel_o
|
|
|
36
36
|
}
|
|
37
37
|
createCommand(operation) {
|
|
38
38
|
const cuttableElementIds = this.getElementToCut(operation);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
// If we have cuttable elements we dispatch a DeleteElementOperation otherwise do nothing
|
|
40
|
+
if (cuttableElementIds.length > 0) {
|
|
41
|
+
this.actionDispatcher.dispatch(protocol_1.DeleteElementOperation.create(cuttableElementIds));
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
42
44
|
}
|
|
43
45
|
getElementToCut(cutOperation) {
|
|
44
46
|
return cutOperation.editorContext.selectedElementIds;
|
|
45
47
|
}
|
|
46
48
|
};
|
|
49
|
+
exports.GModelCutOperationHandler = GModelCutOperationHandler;
|
|
47
50
|
__decorate([
|
|
48
51
|
(0, inversify_1.inject)(action_dispatcher_1.ActionDispatcher),
|
|
49
52
|
__metadata("design:type", Object)
|
|
50
53
|
], GModelCutOperationHandler.prototype, "actionDispatcher", void 0);
|
|
51
|
-
GModelCutOperationHandler = __decorate([
|
|
54
|
+
exports.GModelCutOperationHandler = GModelCutOperationHandler = __decorate([
|
|
52
55
|
(0, inversify_1.injectable)()
|
|
53
56
|
], GModelCutOperationHandler);
|
|
54
|
-
exports.GModelCutOperationHandler = GModelCutOperationHandler;
|
|
55
57
|
//# sourceMappingURL=cut-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cut-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4F;AAC5F,yCAA+C;AAC/C,oEAAgE;AAEhE,yEAAoE;AAG7D,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,iDAAsB;IAA9D;;QACM,kBAAa,GAAG,uBAAY,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"cut-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4F;AAC5F,yCAA+C;AAC/C,oEAAgE;AAEhE,yEAAoE;AAG7D,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,iDAAsB;IAA9D;;QACM,kBAAa,GAAG,uBAAY,CAAC,IAAI,CAAC;IAiB/C,CAAC;IAZG,aAAa,CAAC,SAAuB;QACjC,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC3D,yFAAyF;QACzF,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,iCAAsB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;SACrF;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAES,eAAe,CAAC,YAA0B;QAChD,OAAO,YAAY,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACzD,CAAC;CACJ,CAAA;AAlBY,8DAAyB;AAIxB;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;mEACoB;oCAJpC,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAkBrC"}
|
|
@@ -26,7 +26,7 @@ export declare class GModelDeleteOperationHandler extends GModelOperationHandler
|
|
|
26
26
|
createCommand(operation: DeleteElementOperation): MaybePromise<Command | undefined>;
|
|
27
27
|
deleteElements(elementIds: string[]): MaybePromise<void>;
|
|
28
28
|
protected delete(elementId: string, index: GModelIndex): boolean;
|
|
29
|
-
protected collectDependents(dependents: Set<GModelElement>, nodeToDelete: GModelElement): void;
|
|
29
|
+
protected collectDependents(dependents: Set<GModelElement>, nodeToDelete: GModelElement, isChild: boolean): void;
|
|
30
30
|
protected findTopLevelElement(element: GModelElement): GModelElement;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=delete-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAS,aAAa,EAAS,MAAM,qBAAqB,CAAC;AA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AM,4BAA4B,CAAC;AAEpE,qBACa,4BAA6B,SAAQ,sBAAsB;IAEpE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAExC,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,aAAa,CAAC,SAAS,EAAE,sBAAsB,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IASnF,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC;IAaxD,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO;IA+BhE,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAuBhH,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;CAWvE"}
|
|
@@ -69,7 +69,7 @@ let GModelDeleteOperationHandler = class GModelDeleteOperationHandler extends gm
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
const dependents = new Set();
|
|
72
|
-
this.collectDependents(dependents, nodeToDelete);
|
|
72
|
+
this.collectDependents(dependents, nodeToDelete, false);
|
|
73
73
|
dependents.forEach(dependant => {
|
|
74
74
|
const index = this.modelState.root.children.findIndex(element => element === dependant);
|
|
75
75
|
if (index > -1) {
|
|
@@ -79,20 +79,20 @@ let GModelDeleteOperationHandler = class GModelDeleteOperationHandler extends gm
|
|
|
79
79
|
});
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
|
-
collectDependents(dependents, nodeToDelete) {
|
|
82
|
+
collectDependents(dependents, nodeToDelete, isChild) {
|
|
83
83
|
if (dependents.has(nodeToDelete)) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (nodeToDelete.children.length > 0) {
|
|
87
|
-
nodeToDelete.children.forEach(child => this.collectDependents(dependents, child));
|
|
87
|
+
nodeToDelete.children.forEach(child => this.collectDependents(dependents, child, true));
|
|
88
88
|
}
|
|
89
89
|
if (nodeToDelete instanceof graph_1.GNode) {
|
|
90
90
|
const index = this.modelState.index;
|
|
91
91
|
index.getIncomingEdges(nodeToDelete).forEach(incoming => {
|
|
92
|
-
|
|
92
|
+
dependents.add(incoming);
|
|
93
93
|
});
|
|
94
94
|
index.getOutgoingEdges(nodeToDelete).forEach(outgoing => {
|
|
95
|
-
|
|
95
|
+
dependents.add(outgoing);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
dependents.add(nodeToDelete);
|
|
@@ -108,12 +108,12 @@ let GModelDeleteOperationHandler = class GModelDeleteOperationHandler extends gm
|
|
|
108
108
|
return this.findTopLevelElement(parent);
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
|
+
exports.GModelDeleteOperationHandler = GModelDeleteOperationHandler;
|
|
111
112
|
__decorate([
|
|
112
113
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
113
114
|
__metadata("design:type", logger_1.Logger)
|
|
114
115
|
], GModelDeleteOperationHandler.prototype, "logger", void 0);
|
|
115
|
-
GModelDeleteOperationHandler = __decorate([
|
|
116
|
+
exports.GModelDeleteOperationHandler = GModelDeleteOperationHandler = __decorate([
|
|
116
117
|
(0, inversify_1.injectable)()
|
|
117
118
|
], GModelDeleteOperationHandler);
|
|
118
|
-
exports.GModelDeleteOperationHandler = GModelDeleteOperationHandler;
|
|
119
119
|
//# sourceMappingURL=delete-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAkE;AAClE,qDAA8E;AAC9E,yCAA+C;AAG/C,4CAAyC;AACzC,yEAAoE;AAG7D,IA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CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC;YACpD,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;YAClF,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,UAAU,GAAG,IAAI,GAAG,EAAiB,CAAC;QAC5C,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAkE;AAClE,qDAA8E;AAC9E,yCAA+C;AAG/C,4CAAyC;AACzC,yEAAoE;AAG7D,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,iDAAsB;IAMpE,IAAI,aAAa;QACb,OAAO,iCAAsB,CAAC,IAAI,CAAC;IACvC,CAAC;IAED,aAAa,CAAC,SAAiC;QAC3C,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzD,OAAO,SAAS,CAAC;SACpB;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,cAAc,CAAC,UAAoB;QAC/B,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sCAA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AAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,MAAM,EAAE;YACT,OAAO,OAAO,CAAC;SAClB;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AAjGY,oEAA4B;AAE3B;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;4DAAC;uCAFhB,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAiGxC"}
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
import { GEdge, GModelElement } from '@eclipse-glsp/graph';
|
|
17
17
|
import { CreateEdgeOperation, MaybePromise, TriggerEdgeCreationAction } from '@eclipse-glsp/protocol';
|
|
18
18
|
import { Command } from '../command/command';
|
|
19
|
-
import {
|
|
19
|
+
import { CreateEdgeOperationHandler } from '../operations/create-operation-handler';
|
|
20
20
|
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
21
21
|
/**
|
|
22
22
|
* An abstract base implementation of {@link CreateEdgeOperation} handlers for diagram implementations
|
|
23
23
|
* where the graphical model is also directly used as source model.
|
|
24
24
|
* (i.e. all operation handlers directly modify the graphical model).
|
|
25
25
|
*/
|
|
26
|
-
export declare abstract class GModelCreateEdgeOperationHandler extends GModelOperationHandler implements
|
|
27
|
-
readonly operationType
|
|
26
|
+
export declare abstract class GModelCreateEdgeOperationHandler extends GModelOperationHandler implements CreateEdgeOperationHandler {
|
|
27
|
+
readonly operationType = "createEdge";
|
|
28
28
|
abstract label: string;
|
|
29
29
|
abstract elementTypeIds: string[];
|
|
30
30
|
createCommand(operation: CreateEdgeOperation): MaybePromise<Command | undefined>;
|