@eclipse-glsp/server 1.1.0-RC10 → 1.1.0-next.2ae7567.68
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 -1
- 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 -6
- package/lib/common/actions/action-dispatcher.js.map +1 -1
- package/lib/common/actions/action-handler-registry.js +4 -2
- 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 -21
- 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 -21
- package/lib/common/actions/global-action-provider.js.map +1 -1
- package/lib/common/command/command-stack.js +2 -1
- package/lib/common/command/command-stack.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 -1
- package/lib/common/command/undo-redo-action-handler.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 -1
- 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/features/clipboard/request-clipboard-data-action-handler.d.ts.map +1 -1
- package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -1
- 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 -1
- package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -1
- package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
- package/lib/common/features/contextactions/context-menu-item-provider.js +2 -1
- package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
- package/lib/common/features/contextactions/request-context-actions-handler.js +2 -1
- package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -2
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
- package/lib/common/features/directediting/context-edit-validator-registry.js +2 -1
- package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
- package/lib/common/features/directediting/label-edit-validator.js +2 -1
- package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
- package/lib/common/features/directediting/request-edit-validation-handler.js +2 -1
- package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
- package/lib/common/features/layout/computed-bounds-action-handler.js +2 -1
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
- package/lib/common/features/layout/layout-operation-handler.js +2 -1
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
- package/lib/common/features/model/gmodel-factory.js +2 -1
- package/lib/common/features/model/gmodel-factory.js.map +1 -1
- package/lib/common/features/model/gmodel-index.js +2 -1
- 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 -1
- 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 -1
- 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 -8
- 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 -14
- package/lib/common/features/model/request-model-action-handler.js.map +1 -1
- package/lib/common/features/model/save-model-action-handler.js +2 -1
- package/lib/common/features/model/save-model-action-handler.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -1
- package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
- package/lib/common/features/navigation/navigation-target-resolver.js +2 -1
- package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -1
- 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 -1
- 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 -1
- 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 -3
- 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 -10
- package/lib/common/features/validation/request-markers-handler.js.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js +2 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
- package/lib/common/gmodel/cut-operation-handler.js +2 -1
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.js +2 -1
- 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 -1
- 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 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.js +2 -1
- package/lib/common/gmodel/gmodel-diagram-module.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 -1
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -1
- 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 -1
- package/lib/common/launch/glsp-server-launcher.js.map +1 -1
- package/lib/common/launch/jsonrpc-server-launcher.js +2 -1
- 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 +8 -2
- 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 +2 -1
- 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 -2
- 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 -12
- 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 -1
- 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 -10
- package/lib/common/protocol/glsp-server.js.map +1 -1
- package/lib/common/session/client-session-factory.js +5 -4
- package/lib/common/session/client-session-factory.js.map +1 -1
- package/lib/common/session/client-session-manager.js +2 -1
- package/lib/common/session/client-session-manager.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 -1
- package/lib/common/utils/console-logger.js.map +1 -1
- package/lib/common/utils/logger.js +2 -1
- 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 -4
- 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 -3
- 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 -2
- 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 -1
- package/lib/node/launch/socket-server-launcher.js.map +1 -1
- package/lib/node/launch/websocket-server-launcher.js +2 -1
- package/lib/node/launch/websocket-server-launcher.js.map +1 -1
- package/package.json +4 -5
- 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/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/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/client-options-util.ts +8 -0
- 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
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { Action, RequestModelAction } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { ActionDispatcher } from '../../actions/action-dispatcher';
|
|
18
18
|
import { ActionHandler } from '../../actions/action-handler';
|
|
19
|
+
import { ProgressMonitor, ProgressService } from '../progress/progress-service';
|
|
19
20
|
import { ModelState } from './model-state';
|
|
20
21
|
import { ModelSubmissionHandler } from './model-submission-handler';
|
|
21
22
|
import { SourceModelStorage } from './source-model-storage';
|
|
@@ -26,12 +27,10 @@ export declare class RequestModelActionHandler implements ActionHandler {
|
|
|
26
27
|
protected actionDispatcher: ActionDispatcher;
|
|
27
28
|
protected modelState: ModelState;
|
|
28
29
|
protected submissionHandler: ModelSubmissionHandler;
|
|
30
|
+
protected progressService: ProgressService;
|
|
29
31
|
execute(action: RequestModelAction): Promise<Action[]>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* @param message The message that should be sent to the client
|
|
34
|
-
*/
|
|
35
|
-
protected notifyClient(message?: string): void;
|
|
32
|
+
protected handleReconnect(action: RequestModelAction): Promise<void>;
|
|
33
|
+
protected reportModelLoading(message: string): ProgressMonitor;
|
|
34
|
+
protected reportModelLoadingFinished(monitor: ProgressMonitor): void;
|
|
36
35
|
}
|
|
37
36
|
//# sourceMappingURL=request-model-action-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-model-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/request-model-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"request-model-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/request-model-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAgB,MAAM,wBAAwB,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,qBACa,yBAA0B,YAAW,aAAa;IAC3D,WAAW,WAA6B;IAGxC,OAAO,CAAC,MAAM,CAAS;IAGvB,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAGjD,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAGjC,SAAS,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAGpD,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAErC,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;cAkB5C,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1E,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe;IAK9D,SAAS,CAAC,0BAA0B,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAIvE"}
|
|
@@ -28,11 +28,13 @@ exports.RequestModelActionHandler = void 0;
|
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const action_dispatcher_1 = require("../../actions/action-dispatcher");
|
|
31
|
+
const client_options_util_1 = require("../../utils/client-options-util");
|
|
31
32
|
const logger_1 = require("../../utils/logger");
|
|
33
|
+
const progress_service_1 = require("../progress/progress-service");
|
|
32
34
|
const model_state_1 = require("./model-state");
|
|
33
35
|
const model_submission_handler_1 = require("./model-submission-handler");
|
|
34
36
|
const source_model_storage_1 = require("./source-model-storage");
|
|
35
|
-
let RequestModelActionHandler =
|
|
37
|
+
let RequestModelActionHandler = class RequestModelActionHandler {
|
|
36
38
|
constructor() {
|
|
37
39
|
this.actionKinds = [protocol_1.RequestModelAction.KIND];
|
|
38
40
|
}
|
|
@@ -40,22 +42,39 @@ let RequestModelActionHandler = exports.RequestModelActionHandler = class Reques
|
|
|
40
42
|
var _a;
|
|
41
43
|
this.logger.debug('Execute RequestModelAction:', action);
|
|
42
44
|
this.modelState.setAll((_a = action.options) !== null && _a !== void 0 ? _a : {});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const isReconnecting = client_options_util_1.ClientOptionsUtil.isReconnecting(action.options);
|
|
46
|
+
const progress = this.reportModelLoading('Model loading in progress');
|
|
47
|
+
if (isReconnecting) {
|
|
48
|
+
await this.handleReconnect(action);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
await this.sourceModelStorage.loadSourceModel(action);
|
|
52
|
+
}
|
|
53
|
+
this.reportModelLoadingFinished(progress);
|
|
54
|
+
return this.submissionHandler.submitInitialModel(action);
|
|
48
55
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
async handleReconnect(action) {
|
|
57
|
+
var _a;
|
|
58
|
+
const oldModelRoot = this.modelState.root;
|
|
59
|
+
if (oldModelRoot) {
|
|
60
|
+
// decrease revision by one, as each submit will increase it by one;
|
|
61
|
+
// the next save would produce warning that source model was changed otherwise
|
|
62
|
+
this.modelState.root.revision = ((_a = this.modelState.root.revision) !== null && _a !== void 0 ? _a : 0) - 1;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
await this.sourceModelStorage.loadSourceModel(action);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
reportModelLoading(message) {
|
|
69
|
+
this.actionDispatcher.dispatch(protocol_1.StatusAction.create(message, { severity: 'INFO' }));
|
|
70
|
+
return this.progressService.start(message);
|
|
71
|
+
}
|
|
72
|
+
reportModelLoadingFinished(monitor) {
|
|
73
|
+
this.actionDispatcher.dispatch(protocol_1.StatusAction.create('', { severity: 'NONE' }));
|
|
74
|
+
monitor.end();
|
|
57
75
|
}
|
|
58
76
|
};
|
|
77
|
+
exports.RequestModelActionHandler = RequestModelActionHandler;
|
|
59
78
|
__decorate([
|
|
60
79
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
61
80
|
__metadata("design:type", logger_1.Logger)
|
|
@@ -76,6 +95,10 @@ __decorate([
|
|
|
76
95
|
(0, inversify_1.inject)(model_submission_handler_1.ModelSubmissionHandler),
|
|
77
96
|
__metadata("design:type", model_submission_handler_1.ModelSubmissionHandler)
|
|
78
97
|
], RequestModelActionHandler.prototype, "submissionHandler", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, inversify_1.inject)(progress_service_1.ProgressService),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], RequestModelActionHandler.prototype, "progressService", void 0);
|
|
79
102
|
exports.RequestModelActionHandler = RequestModelActionHandler = __decorate([
|
|
80
103
|
(0, inversify_1.injectable)()
|
|
81
104
|
], RequestModelActionHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/request-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"request-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/request-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkF;AAClF,yCAA+C;AAC/C,uEAAmE;AAEnE,yEAAoE;AACpE,+CAA4C;AAC5C,mEAAgF;AAChF,+CAA2C;AAC3C,yEAAoE;AACpE,iEAA4D;AAGrD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAA/B;QACH,gBAAW,GAAG,CAAC,6BAAkB,CAAC,IAAI,CAAC,CAAC;IA0D5C,CAAC;IAtCG,KAAK,CAAC,OAAO,CAAC,MAA0B;;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC;QAE7C,MAAM,cAAc,GAAG,uCAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAExE,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,CAAC;QAEtE,IAAI,cAAc,EAAE;YAChB,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACtC;aAAM;YACH,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACzD;QACD,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;QAE1C,OAAO,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,MAA0B;;QACtD,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAC1C,IAAI,YAAY,EAAE;YACd,oEAAoE;YACpE,8EAA8E;YAC9E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,MAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;SAC5E;aAAM;YACH,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACzD;IACL,CAAC;IAES,kBAAkB,CAAC,OAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,uBAAY,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAES,0BAA0B,CAAC,OAAwB;QACzD,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,uBAAY,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,EAAE,CAAC;IAClB,CAAC;CACJ,CAAA;AA3DY,8DAAyB;AAI1B;IADP,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACC,eAAM;yDAAC;AAGb;IADT,IAAA,kBAAM,EAAC,yCAAkB,CAAC;;qEACsB;AAGvC;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;mEACoB;AAGnC;IADT,IAAA,kBAAM,EAAC,wBAAU,CAAC;;6DACc;AAGvB;IADT,IAAA,kBAAM,EAAC,iDAAsB,CAAC;8BACF,iDAAsB;oEAAC;AAG1C;IADT,IAAA,kBAAM,EAAC,kCAAe,CAAC;;kEACmB;oCAnBlC,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CA2DrC"}
|
|
@@ -29,7 +29,7 @@ const protocol_1 = require("@eclipse-glsp/protocol");
|
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const command_stack_1 = require("../../command/command-stack");
|
|
31
31
|
const source_model_storage_1 = require("./source-model-storage");
|
|
32
|
-
let SaveModelActionHandler =
|
|
32
|
+
let SaveModelActionHandler = class SaveModelActionHandler {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.actionKinds = [protocol_1.SaveModelAction.KIND];
|
|
35
35
|
}
|
|
@@ -39,6 +39,7 @@ let SaveModelActionHandler = exports.SaveModelActionHandler = class SaveModelAct
|
|
|
39
39
|
return [protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason: 'save' })];
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
exports.SaveModelActionHandler = SaveModelActionHandler;
|
|
42
43
|
__decorate([
|
|
43
44
|
(0, inversify_1.inject)(command_stack_1.CommandStack),
|
|
44
45
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsF;AACtF,yCAA+C;AAE/C,+DAA2D;AAC3D,iEAA4D;AAGrD,IAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"save-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/save-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsF;AACtF,yCAA+C;AAE/C,+DAA2D;AAC3D,iEAA4D;AAGrD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QACH,gBAAW,GAAG,CAAC,0BAAe,CAAC,IAAI,CAAC,CAAC;IAazC,CAAC;IALG,KAAK,CAAC,OAAO,CAAC,MAAuB;QACjC,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;QAC/B,OAAO,CAAC,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACvF,CAAC;CACJ,CAAA;AAdY,wDAAsB;AAIrB;IADT,IAAA,kBAAM,EAAC,4BAAY,CAAC;;4DACgB;AAG3B;IADT,IAAA,kBAAM,EAAC,yCAAkB,CAAC;;kEACsB;iCAPxC,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAclC"}
|
|
@@ -32,12 +32,13 @@ const inversify_1 = require("inversify");
|
|
|
32
32
|
const service_identifiers_1 = require("../../di/service-identifiers");
|
|
33
33
|
const registry_1 = require("../../utils/registry");
|
|
34
34
|
exports.NavigationTargetProviderRegistry = Symbol('NavigationTargetProviderRegistry');
|
|
35
|
-
let DefaultNavigationTargetProviderRegistry =
|
|
35
|
+
let DefaultNavigationTargetProviderRegistry = class DefaultNavigationTargetProviderRegistry extends registry_1.Registry {
|
|
36
36
|
constructor(navigationTargetProviders = []) {
|
|
37
37
|
super();
|
|
38
38
|
navigationTargetProviders.forEach(provider => this.register(provider.targetTypeId, provider));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
exports.DefaultNavigationTargetProviderRegistry = DefaultNavigationTargetProviderRegistry;
|
|
41
42
|
exports.DefaultNavigationTargetProviderRegistry = DefaultNavigationTargetProviderRegistry = __decorate([
|
|
42
43
|
__param(0, (0, inversify_1.multiInject)(service_identifiers_1.NavigationTargetProviders)),
|
|
43
44
|
__param(0, (0, inversify_1.optional)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-target-provider-registry.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/navigation-target-provider-registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAkD;AAClD,sEAAyE;AACzE,mDAAgD;AAGnC,QAAA,gCAAgC,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAO3F,IAAa,uCAAuC,
|
|
1
|
+
{"version":3,"file":"navigation-target-provider-registry.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/navigation-target-provider-registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAkD;AAClD,sEAAyE;AACzE,mDAAgD;AAGnC,QAAA,gCAAgC,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAO3F,IAAa,uCAAuC,GAApD,MAAa,uCACT,SAAQ,mBAA0C;IAGlD,YAAgE,4BAAwD,EAAE;QACtH,KAAK,EAAE,CAAC;QACR,yBAAyB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AARY,0FAAuC;kDAAvC,uCAAuC;IAInC,WAAA,IAAA,uBAAW,EAAC,+CAAyB,CAAC,CAAA;IAAE,WAAA,IAAA,oBAAQ,GAAE,CAAA;;GAJtD,uCAAuC,CAQnD"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.NavigationTargetResolver = void 0;
|
|
10
10
|
const inversify_1 = require("inversify");
|
|
11
|
-
let NavigationTargetResolver =
|
|
11
|
+
let NavigationTargetResolver = class NavigationTargetResolver {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.INFO = 'info';
|
|
14
14
|
this.WARNING = 'warning';
|
|
@@ -42,6 +42,7 @@ let NavigationTargetResolver = exports.NavigationTargetResolver = class Navigati
|
|
|
42
42
|
args[this.ERROR] = message;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
exports.NavigationTargetResolver = NavigationTargetResolver;
|
|
45
46
|
exports.NavigationTargetResolver = NavigationTargetResolver = __decorate([
|
|
46
47
|
(0, inversify_1.injectable)()
|
|
47
48
|
], NavigationTargetResolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-target-resolver.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/navigation-target-resolver.ts"],"names":[],"mappings":";;;;;;;;;AAgBA,yCAAuC;AAIhC,IAAe,wBAAwB,
|
|
1
|
+
{"version":3,"file":"navigation-target-resolver.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/navigation-target-resolver.ts"],"names":[],"mappings":";;;;;;;;;AAgBA,yCAAuC;AAIhC,IAAe,wBAAwB,GAAvC,MAAe,wBAAwB;IAAvC;QACM,SAAI,GAAG,MAAM,CAAC;QACd,YAAO,GAAG,SAAS,CAAC;QACpB,UAAK,GAAG,OAAO,CAAC;IAqC7B,CAAC;IAjCG,UAAU;QACN,OAAO,EAAE,CAAC;IACd,CAAC;IAED,kBAAkB,CAAC,OAAe;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,qBAAqB,CAAC,OAAe;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,mBAAmB,CAAC,OAAe;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,OAAe,EAAE,IAAU;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAC9B,CAAC;IAED,UAAU,CAAC,OAAe,EAAE,IAAU;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,OAAe,EAAE,IAAU;QAChC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IAC/B,CAAC;CACJ,CAAA;AAxCqB,4DAAwB;mCAAxB,wBAAwB;IAD7C,IAAA,sBAAU,GAAE;GACS,wBAAwB,CAwC7C"}
|
|
@@ -29,7 +29,7 @@ const protocol_1 = require("@eclipse-glsp/protocol");
|
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const inject_1 = require("inversify/lib/annotation/inject");
|
|
31
31
|
const navigation_target_provider_registry_1 = require("./navigation-target-provider-registry");
|
|
32
|
-
let RequestNavigationTargetsActionHandler =
|
|
32
|
+
let RequestNavigationTargetsActionHandler = class RequestNavigationTargetsActionHandler {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.actionKinds = [protocol_1.RequestNavigationTargetsAction.KIND];
|
|
35
35
|
}
|
|
@@ -44,6 +44,7 @@ let RequestNavigationTargetsActionHandler = exports.RequestNavigationTargetsActi
|
|
|
44
44
|
return [protocol_1.SetNavigationTargetsAction.create(allTargets, { args: editorContext.args })];
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
exports.RequestNavigationTargetsActionHandler = RequestNavigationTargetsActionHandler;
|
|
47
48
|
__decorate([
|
|
48
49
|
(0, inject_1.inject)(navigation_target_provider_registry_1.NavigationTargetProviderRegistry),
|
|
49
50
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-navigation-targets-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/request-navigation-targets-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4I;AAC5I,yCAAuC;AACvC,4DAAyD;AAEzD,+FAAyF;AAGlF,IAAM,qCAAqC,
|
|
1
|
+
{"version":3,"file":"request-navigation-targets-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/request-navigation-targets-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4I;AAC5I,yCAAuC;AACvC,4DAAyD;AAEzD,+FAAyF;AAGlF,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAA3C;QACH,gBAAW,GAAG,CAAC,yCAA8B,CAAC,IAAI,CAAC,CAAC;IAexD,CAAC;IAVG,OAAO,CAAC,MAAsC;QAC1C,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAC3C,MAAM,UAAU,GAAuB,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,gCAAgC,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAChF,IAAI,QAAQ,EAAE;YACV,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACnD,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACtD;QACD,OAAO,CAAC,qCAA0B,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzF,CAAC;CACJ,CAAA;AAhBY,sFAAqC;AAIpC;IADT,IAAA,eAAM,EAAC,sEAAgC,CAAC;;+FACoC;gDAJpE,qCAAqC;IADjD,IAAA,sBAAU,GAAE;GACA,qCAAqC,CAgBjD"}
|
|
@@ -29,7 +29,7 @@ const protocol_1 = require("@eclipse-glsp/protocol");
|
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const logger_1 = require("../../utils/logger");
|
|
31
31
|
const navigation_target_resolver_1 = require("./navigation-target-resolver");
|
|
32
|
-
let ResolveNavigationTargetsActionHandler =
|
|
32
|
+
let ResolveNavigationTargetsActionHandler = class ResolveNavigationTargetsActionHandler {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.actionKinds = [protocol_1.ResolveNavigationTargetAction.KIND];
|
|
35
35
|
}
|
|
@@ -43,6 +43,7 @@ let ResolveNavigationTargetsActionHandler = exports.ResolveNavigationTargetsActi
|
|
|
43
43
|
return [protocol_1.SetResolvedNavigationTargetAction.create(resolution.elementIds, { args: resolution.args })];
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
+
exports.ResolveNavigationTargetsActionHandler = ResolveNavigationTargetsActionHandler;
|
|
46
47
|
__decorate([
|
|
47
48
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
48
49
|
__metadata("design:type", logger_1.Logger)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-navigation-targets-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/resolve-navigation-targets-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkH;AAClH,yCAAyD;AAEzD,+CAA4C;AAC5C,6EAAwE;AAGjE,IAAM,qCAAqC,
|
|
1
|
+
{"version":3,"file":"resolve-navigation-targets-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/navigation/resolve-navigation-targets-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkH;AAClH,yCAAyD;AAEzD,+CAA4C;AAC5C,6EAAwE;AAGjE,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAA3C;QACH,gBAAW,GAAG,CAAC,wCAA6B,CAAC,IAAI,CAAC,CAAC;IAkBvD,CAAC;IATG,KAAK,CAAC,OAAO,CAAC,MAAqC;QAC/C,IAAI,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qGAAqG,CAAC,CAAC;YACxH,OAAO,EAAE,CAAC;SACb;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACvC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACvE,OAAO,CAAC,4CAAiC,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACxG,CAAC;CACJ,CAAA;AAnBY,sFAAqC;AAIpC;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;qEAAC;AAIN;IAFlB,IAAA,kBAAM,EAAC,qDAAwB,CAAC;IAChC,IAAA,oBAAQ,GAAE;8BACkC,qDAAwB;uFAAC;gDAR7D,qCAAqC;IADjD,IAAA,sBAAU,GAAE;GACA,qCAAqC,CAmBjD"}
|
|
@@ -32,7 +32,7 @@ const logger_1 = require("../../utils/logger");
|
|
|
32
32
|
const gmodel_serializer_1 = require("../model/gmodel-serializer");
|
|
33
33
|
const model_state_1 = require("../model/model-state");
|
|
34
34
|
const popup_model_factory_1 = require("./popup-model-factory");
|
|
35
|
-
let RequestPopupModelActionHandler =
|
|
35
|
+
let RequestPopupModelActionHandler = class RequestPopupModelActionHandler {
|
|
36
36
|
constructor() {
|
|
37
37
|
this.actionKinds = [protocol_1.RequestPopupModelAction.KIND];
|
|
38
38
|
}
|
|
@@ -53,6 +53,7 @@ let RequestPopupModelActionHandler = exports.RequestPopupModelActionHandler = cl
|
|
|
53
53
|
return [];
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
+
exports.RequestPopupModelActionHandler = RequestPopupModelActionHandler;
|
|
56
57
|
__decorate([
|
|
57
58
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
58
59
|
__metadata("design:type", logger_1.Logger)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-popup-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/popup/request-popup-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4G;AAC5G,yCAAyD;AAEzD,qEAAgE;AAChE,+CAA4C;AAC5C,kEAA8D;AAC9D,sDAAkD;AAClD,+DAA0D;AAGnD,IAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"request-popup-model-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/popup/request-popup-model-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4G;AAC5G,yCAAyD;AAEzD,qEAAgE;AAChE,+CAA4C;AAC5C,kEAA8D;AAC9D,sDAAkD;AAClD,+DAA0D;AAGnD,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAApC;QAcH,gBAAW,GAAG,CAAC,kCAAuB,CAAC,IAAI,CAAC,CAAC;IAoBjD,CAAC;IAlBG,OAAO,CAAC,MAA+B;QACnC,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClE,IAAI,YAAY,EAAE;gBACd,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;gBACjF,IAAI,UAAU,EAAE;oBACZ,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;oBAClE,OAAO,CAAC,8BAAmB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;iBACpD;gBACD,OAAO,EAAE,CAAC;aACb;YACD,MAAM,IAAI,mCAAe,CAAC,sEAAsE,MAAM,CAAC,SAAS,YAAY,CAAC,CAAC;SACjI;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;QACjG,OAAO,EAAE,CAAC;IACd,CAAC;CAGJ,CAAA;AAlCY,wEAA8B;AAE7B;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;8DAAC;AAIf;IAFT,IAAA,kBAAM,EAAC,uCAAiB,CAAC;IACzB,IAAA,oBAAQ,GAAE;;yEACqC;AAGtC;IADT,IAAA,kBAAM,EAAC,wBAAU,CAAC;;kEACc;AAGvB;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;uEACmB;yCAZnC,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAkC1C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ActionDispatcher } from '../../actions/action-dispatcher';
|
|
2
|
+
export declare const ProgressService: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Service for starting and monitoring progress reporting to the client.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProgressService {
|
|
7
|
+
/**
|
|
8
|
+
* Start a progress reporting.
|
|
9
|
+
* @param title The title shown in the UI for the progress reporting.
|
|
10
|
+
* @param options Additional optional options for the progress reporting.
|
|
11
|
+
* @returns a monitor to update and end the progress reporting later.
|
|
12
|
+
*/
|
|
13
|
+
start(title: string, options?: ProgressOptions): ProgressMonitor;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Optional progress reporting options.
|
|
17
|
+
*/
|
|
18
|
+
export interface ProgressOptions {
|
|
19
|
+
/** A message shown in the UI. */
|
|
20
|
+
message?: string;
|
|
21
|
+
percentage?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The monitor of a progress reporting, which can be used to update and end the reporting.
|
|
25
|
+
*/
|
|
26
|
+
export interface ProgressMonitor {
|
|
27
|
+
/**
|
|
28
|
+
* Updates an ongoing progress reporting.
|
|
29
|
+
* @param options Updated message and/or percentage (value range: 0 to 100).
|
|
30
|
+
*/
|
|
31
|
+
update(options: {
|
|
32
|
+
message?: string;
|
|
33
|
+
percentage?: number;
|
|
34
|
+
}): void;
|
|
35
|
+
/**
|
|
36
|
+
* Ends an ongoing progress reporting.
|
|
37
|
+
*/
|
|
38
|
+
end(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare class DefaultProgressService implements ProgressService {
|
|
41
|
+
protected actionDispatcher: ActionDispatcher;
|
|
42
|
+
start(title: string, options?: ProgressOptions): ProgressMonitor;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=progress-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-service.d.ts","sourceRoot":"","sources":["../../../../src/common/features/progress/progress-service.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;OAKG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;CACpE;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE;;OAEG;IACH,GAAG,IAAI,IAAI,CAAC;CACf;AAED,qBACa,sBAAuB,YAAW,eAAe;IAE1D,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe;CAQnE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.DefaultProgressService = exports.ProgressService = 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 uuid = require("uuid");
|
|
31
|
+
const action_dispatcher_1 = require("../../actions/action-dispatcher");
|
|
32
|
+
exports.ProgressService = Symbol('ProgressService');
|
|
33
|
+
let DefaultProgressService = class DefaultProgressService {
|
|
34
|
+
start(title, options) {
|
|
35
|
+
const progressId = uuid.v4();
|
|
36
|
+
this.actionDispatcher.dispatch(protocol_1.StartProgressAction.create(Object.assign({ progressId, title }, options)));
|
|
37
|
+
return {
|
|
38
|
+
update: updateOptions => this.actionDispatcher.dispatch(protocol_1.UpdateProgressAction.create(progressId, updateOptions)),
|
|
39
|
+
end: () => this.actionDispatcher.dispatch(protocol_1.EndProgressAction.create(progressId))
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.DefaultProgressService = DefaultProgressService;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, inversify_1.inject)(action_dispatcher_1.ActionDispatcher),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], DefaultProgressService.prototype, "actionDispatcher", void 0);
|
|
48
|
+
exports.DefaultProgressService = DefaultProgressService = __decorate([
|
|
49
|
+
(0, inversify_1.injectable)()
|
|
50
|
+
], DefaultProgressService);
|
|
51
|
+
//# sourceMappingURL=progress-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-service.js","sourceRoot":"","sources":["../../../../src/common/features/progress/progress-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsG;AACtG,yCAA+C;AAC/C,6BAA6B;AAC7B,uEAAmE;AAEtD,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAyClD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAI/B,KAAK,CAAC,KAAa,EAAE,OAAyB;QAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,8BAAmB,CAAC,MAAM,iBAAG,UAAU,EAAE,KAAK,IAAK,OAAO,EAAG,CAAC,CAAC;QAC9F,OAAO;YACH,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,+BAAoB,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;YAC/G,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,4BAAiB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SAClF,CAAC;IACN,CAAC;CACJ,CAAA;AAZY,wDAAsB;AAErB;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;gEACoB;iCAFpC,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAYlC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { GModelElement } from '@eclipse-glsp/graph';
|
|
17
|
+
/**
|
|
18
|
+
* Optional service used to check the validity of an edge being created. Used in combination with `dynamic`
|
|
19
|
+
* `EdgeTypeHints`.
|
|
20
|
+
* A dynamic edge type hint is used for cases where a plain list of allowed source and target element ids is not enough
|
|
21
|
+
* to determine wether an edge being created is valid. In this cases the client will query the server to determine wether the edge
|
|
22
|
+
* is valid. The `EdgeCreationChecker` then checks the given edge information and returns wether the edge being created is
|
|
23
|
+
* valid.
|
|
24
|
+
*/
|
|
25
|
+
export interface EdgeCreationChecker {
|
|
26
|
+
/**
|
|
27
|
+
* Checks wether the given source element for an edge being created is valid i.e. if the
|
|
28
|
+
* given source is and allowed source element for the given edge type.
|
|
29
|
+
*
|
|
30
|
+
* @returns `true` if the edge source is valid, `false` otherwise
|
|
31
|
+
*/
|
|
32
|
+
isValidSource(edgeType: string, sourceElement: GModelElement): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Checks wether the given information for an edge being created is valid i.e. if the
|
|
35
|
+
* given target is an allowed target for the given source and edge type.
|
|
36
|
+
*
|
|
37
|
+
* @return `true` if the edge target is valid, `false` otherwise
|
|
38
|
+
*/
|
|
39
|
+
isValidTarget(edgeType: string, sourceElement: GModelElement, targetElement: GModelElement): boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const EdgeCreationChecker: unique symbol;
|
|
42
|
+
//# sourceMappingURL=edge-creation-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-creation-checker.d.ts","sourceRoot":"","sources":["../../../../src/common/features/type-hints/edge-creation-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC;IAEvE;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC;CACxG;AACD,eAAO,MAAM,mBAAmB,eAAgC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.EdgeCreationChecker = void 0;
|
|
19
|
+
exports.EdgeCreationChecker = Symbol('EdgeCreationChecker');
|
|
20
|
+
//# sourceMappingURL=edge-creation-checker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-creation-checker.js","sourceRoot":"","sources":["../../../../src/common/features/type-hints/edge-creation-checker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AA6BrE,QAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -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,8 +27,8 @@ 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("
|
|
31
|
-
let RequestTypeHintsActionHandler =
|
|
30
|
+
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
31
|
+
let RequestTypeHintsActionHandler = class RequestTypeHintsActionHandler {
|
|
32
32
|
constructor() {
|
|
33
33
|
this.actionKinds = [protocol_1.RequestTypeHintsAction.KIND];
|
|
34
34
|
}
|
|
@@ -41,7 +41,7 @@ let RequestTypeHintsActionHandler = exports.RequestTypeHintsActionHandler = clas
|
|
|
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)
|