@eclipse-glsp/server 1.1.0-next.f0fc2cf.63 → 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 -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 +20 -1
- package/lib/common/di/diagram-module.d.ts.map +1 -1
- package/lib/common/di/diagram-module.js +17 -56
- 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 +28 -3
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +63 -8
- package/lib/common/features/model/model-submission-handler.js.map +1 -1
- package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
- package/lib/common/features/model/request-model-action-handler.js +5 -4
- 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.js +2 -1
- package/lib/common/features/progress/progress-service.js.map +1 -1
- 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.js +2 -1
- package/lib/common/features/validation/model-validator.js.map +1 -1
- package/lib/common/features/validation/request-markers-handler.js +2 -1
- 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.d.ts.map +1 -1
- package/lib/common/gmodel/cut-operation-handler.js +7 -4
- 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 -6
- 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/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.js +2 -1
- 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/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 -4
- 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 +23 -75
- 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 +52 -7
- package/src/common/features/model/request-model-action-handler.ts +4 -4
- 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/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/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/gmodel/gmodel-storage.ts +3 -3
- 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
|
@@ -32,7 +32,7 @@ const operation_handler_registry_1 = require("../../operations/operation-handler
|
|
|
32
32
|
/**
|
|
33
33
|
* A {@link ContextActionsProvider} for {@link PaletteItem}s.
|
|
34
34
|
*/
|
|
35
|
-
let ToolPaletteItemProvider =
|
|
35
|
+
let ToolPaletteItemProvider = class ToolPaletteItemProvider {
|
|
36
36
|
/**
|
|
37
37
|
* Returns the context id of the provider.
|
|
38
38
|
*/
|
|
@@ -49,10 +49,11 @@ let ToolPaletteItemProvider = exports.ToolPaletteItemProvider = class ToolPalett
|
|
|
49
49
|
return this.getItems(editorContext.args);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
+
exports.ToolPaletteItemProvider = ToolPaletteItemProvider;
|
|
52
53
|
exports.ToolPaletteItemProvider = ToolPaletteItemProvider = __decorate([
|
|
53
54
|
(0, inversify_1.injectable)()
|
|
54
55
|
], ToolPaletteItemProvider);
|
|
55
|
-
let DefaultToolPaletteItemProvider =
|
|
56
|
+
let DefaultToolPaletteItemProvider = class DefaultToolPaletteItemProvider extends ToolPaletteItemProvider {
|
|
56
57
|
getItems(_args) {
|
|
57
58
|
const handlers = this.operationHandlerRegistry.getAll().filter(create_operation_handler_1.CreateOperationHandler.is);
|
|
58
59
|
this.counter = 0;
|
|
@@ -74,6 +75,7 @@ let DefaultToolPaletteItemProvider = exports.DefaultToolPaletteItemProvider = cl
|
|
|
74
75
|
return { id: `palette-item${this.counter}`, sortString: label.charAt(0), label, actions: [action] };
|
|
75
76
|
}
|
|
76
77
|
};
|
|
78
|
+
exports.DefaultToolPaletteItemProvider = DefaultToolPaletteItemProvider;
|
|
77
79
|
__decorate([
|
|
78
80
|
(0, inversify_1.inject)(operation_handler_registry_1.OperationHandlerRegistry),
|
|
79
81
|
__metadata("design:type", operation_handler_registry_1.OperationHandlerRegistry)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-palette-item-provider.js","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette-item-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAQgC;AAChC,yCAA+C;AAC/C,wFAAmF;AACnF,4FAAuF;AAGvF;;GAEG;AAEI,IAAe,uBAAuB,
|
|
1
|
+
{"version":3,"file":"tool-palette-item-provider.js","sourceRoot":"","sources":["../../../../src/common/features/contextactions/tool-palette-item-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAQgC;AAChC,yCAA+C;AAC/C,wFAAmF;AACnF,4FAAuF;AAGvF;;GAEG;AAEI,IAAe,uBAAuB,GAAtC,MAAe,uBAAuB;IACzC;;OAEG;IACH,IAAI,SAAS;QACT,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,aAA4B;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CASJ,CAAA;AAzBqB,0DAAuB;kCAAvB,uBAAuB;IAD5C,IAAA,sBAAU,GAAE;GACS,uBAAuB,CAyB5C;AAGM,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,uBAAuB;IAIvE,QAAQ,CAAC,KAAY;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,iDAAsB,CAAC,EAAE,CAA6B,CAAC;QACtH,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,8BAAmB,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,8BAAmB,CAAC,IAAI,CAAC,CAAC;QACz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A2B,qDAAwB;gFAAC;yCAD5E,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CA0B1C"}
|
|
@@ -35,7 +35,7 @@ const model_state_1 = require("../model/model-state");
|
|
|
35
35
|
const context_edit_validator_1 = require("./context-edit-validator");
|
|
36
36
|
const label_edit_validator_1 = require("./label-edit-validator");
|
|
37
37
|
exports.ContextEditValidatorRegistry = Symbol.for('ContextEditValidatorRegistry');
|
|
38
|
-
let DefaultContextEditValidatorRegistry =
|
|
38
|
+
let DefaultContextEditValidatorRegistry = class DefaultContextEditValidatorRegistry extends registry_1.Registry {
|
|
39
39
|
constructor(modelState, contextEditValidators = [], labelEditValidator) {
|
|
40
40
|
super();
|
|
41
41
|
contextEditValidators.forEach(provider => this.register(provider.contextId, provider));
|
|
@@ -44,6 +44,7 @@ let DefaultContextEditValidatorRegistry = exports.DefaultContextEditValidatorReg
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
exports.DefaultContextEditValidatorRegistry = DefaultContextEditValidatorRegistry;
|
|
47
48
|
exports.DefaultContextEditValidatorRegistry = DefaultContextEditValidatorRegistry = __decorate([
|
|
48
49
|
(0, inversify_1.injectable)(),
|
|
49
50
|
__param(0, (0, inversify_1.inject)(model_state_1.ModelState)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-edit-validator-registry.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/context-edit-validator-registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAsE;AACtE,sEAAqE;AACrE,mDAAgD;AAChD,sDAAkD;AAClD,qEAA0F;AAC1F,iEAA4D;AAE/C,QAAA,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAQhF,IAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"context-edit-validator-registry.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/context-edit-validator-registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAsE;AACtE,sEAAqE;AACrE,mDAAgD;AAChD,sDAAkD;AAClD,qEAA0F;AAC1F,iEAA4D;AAE/C,QAAA,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAQhF,IAAM,mCAAmC,GAAzC,MAAM,mCAAoC,SAAQ,mBAAsC;IAC3F,YACwB,UAAsB,EACM,wBAAgD,EAAE,EAC1D,kBAAuC;QAE/E,KAAK,EAAE,CAAC;QACR,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QACvF,IAAI,kBAAkB,EAAE;YACpB,IAAI,CAAC,QAAQ,CAAC,yCAAkB,CAAC,UAAU,EAAE,IAAI,iDAAwB,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC;SAC9G;IACL,CAAC;CACJ,CAAA;AAZY,kFAAmC;8CAAnC,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;IAGJ,WAAA,IAAA,kBAAM,EAAC,wBAAU,CAAC,CAAA;IAClB,WAAA,IAAA,uBAAW,EAAC,2CAAqB,CAAC,CAAA;IAAE,WAAA,IAAA,oBAAQ,GAAE,CAAA;IAC9C,WAAA,IAAA,kBAAM,EAAC,yCAAkB,CAAC,CAAA;IAAE,WAAA,IAAA,oBAAQ,GAAE,CAAA;oDAAsB,yCAAkB;GAJ1E,mCAAmC,CAY/C"}
|
|
@@ -11,8 +11,9 @@ const inversify_1 = require("inversify");
|
|
|
11
11
|
/**
|
|
12
12
|
* A validator that validates a new label for a given {@link GModelElement}.
|
|
13
13
|
*/
|
|
14
|
-
let LabelEditValidator =
|
|
14
|
+
let LabelEditValidator = class LabelEditValidator {
|
|
15
15
|
};
|
|
16
|
+
exports.LabelEditValidator = LabelEditValidator;
|
|
16
17
|
LabelEditValidator.CONTEXT_ID = 'label-edit';
|
|
17
18
|
exports.LabelEditValidator = LabelEditValidator = __decorate([
|
|
18
19
|
(0, inversify_1.injectable)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-edit-validator.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/label-edit-validator.ts"],"names":[],"mappings":";;;;;;;;;AAiBA,yCAAuC;AAEvC;;GAEG;AAEI,IAAe,kBAAkB,
|
|
1
|
+
{"version":3,"file":"label-edit-validator.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/label-edit-validator.ts"],"names":[],"mappings":";;;;;;;;;AAiBA,yCAAuC;AAEvC;;GAEG;AAEI,IAAe,kBAAkB,GAAjC,MAAe,kBAAkB;;AAAlB,gDAAkB;AACpB,6BAAU,GAAG,YAAY,AAAf,CAAgB;6BADxB,kBAAkB;IADvC,IAAA,sBAAU,GAAE;GACS,kBAAkB,CAWvC"}
|
|
@@ -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 context_edit_validator_registry_1 = require("./context-edit-validator-registry");
|
|
32
|
-
let RequestEditValidationHandler =
|
|
32
|
+
let RequestEditValidationHandler = class RequestEditValidationHandler {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.actionKinds = [protocol_1.RequestEditValidationAction.KIND];
|
|
35
35
|
}
|
|
@@ -46,6 +46,7 @@ let RequestEditValidationHandler = exports.RequestEditValidationHandler = class
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
exports.RequestEditValidationHandler = RequestEditValidationHandler;
|
|
49
50
|
__decorate([
|
|
50
51
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
51
52
|
__metadata("design:type", logger_1.Logger)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-edit-validation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/request-edit-validation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4I;AAC5I,yCAA+C;AAE/C,+CAA4C;AAC5C,uFAAiF;AAG1E,IAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"request-edit-validation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/directediting/request-edit-validation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4I;AAC5I,yCAA+C;AAE/C,+CAA4C;AAC5C,uFAAiF;AAG1E,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QACH,gBAAW,GAAG,CAAC,sCAA2B,CAAC,IAAI,CAAC,CAAC;IAmBrD,CAAC;IAXG,OAAO,CAAC,MAAmC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,4BAA4B,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1E,IAAI,SAAS,EAAE;YACX,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACpD,OAAO,CAAC,wCAA6B,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;SACnE;aAAM;YACH,MAAM,OAAO,GAAG,4CAA4C,MAAM,CAAC,SAAS,GAAG,CAAC;YAChF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC1B,OAAO,CAAC,wCAA6B,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,2BAAgB,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;SACpH;IACL,CAAC;CACJ,CAAA;AApBY,oEAA4B;AAI3B;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;4DAAC;AAGzB;IADC,IAAA,kBAAM,EAAC,8DAA4B,CAAC;;kFACsB;uCAPlD,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAoBxC"}
|
|
@@ -20,7 +20,7 @@ const model_submission_handler_1 = require("../model/model-submission-handler");
|
|
|
20
20
|
* In this default implementation the updated bounds are stored transient. This means they are applied to the graphical model but
|
|
21
21
|
* are not persisted to the source model.
|
|
22
22
|
*/
|
|
23
|
-
let ComputedBoundsActionHandler =
|
|
23
|
+
let ComputedBoundsActionHandler = class ComputedBoundsActionHandler {
|
|
24
24
|
constructor() {
|
|
25
25
|
this.actionKinds = [protocol_1.ComputedBoundsAction.KIND];
|
|
26
26
|
}
|
|
@@ -40,6 +40,7 @@ let ComputedBoundsActionHandler = exports.ComputedBoundsActionHandler = class Co
|
|
|
40
40
|
((_b = action.routes) !== null && _b !== void 0 ? _b : []).forEach(route => (0, layout_util_1.applyRoute)(route, index));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
exports.ComputedBoundsActionHandler = ComputedBoundsActionHandler;
|
|
43
44
|
__decorate([
|
|
44
45
|
(0, inversify_1.inject)(model_submission_handler_1.ModelSubmissionHandler),
|
|
45
46
|
__metadata("design:type", model_submission_handler_1.ModelSubmissionHandler)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computed-bounds-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/computed-bounds-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAoF;AACpF,yCAA+C;AAE/C,yDAA4F;AAC5F,sDAAkD;AAClD,gFAA2E;AAE3E;;;;GAIG;AAEI,IAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"computed-bounds-action-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/computed-bounds-action-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAoF;AACpF,yCAA+C;AAE/C,yDAA4F;AAC5F,sDAAkD;AAClD,gFAA2E;AAE3E;;;;GAIG;AAEI,IAAM,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* if the server is configured for manual layouting. Changes are stored transient in the graphical model and are not
|
|
39
39
|
* persisted in the source model.
|
|
40
40
|
*/
|
|
41
|
-
let LayoutOperationHandler =
|
|
41
|
+
let LayoutOperationHandler = class LayoutOperationHandler extends operation_handler_1.OperationHandler {
|
|
42
42
|
constructor() {
|
|
43
43
|
super(...arguments);
|
|
44
44
|
this.operationType = protocol_1.LayoutOperation.KIND;
|
|
@@ -58,6 +58,7 @@ let LayoutOperationHandler = exports.LayoutOperationHandler = class LayoutOperat
|
|
|
58
58
|
await ((_a = this.layoutEngine) === null || _a === void 0 ? void 0 : _a.layout());
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
exports.LayoutOperationHandler = LayoutOperationHandler;
|
|
61
62
|
__decorate([
|
|
62
63
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
63
64
|
__metadata("design:type", logger_1.Logger)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkF;AAClF,yCAAyD;AAEzD,uEAAyE;AACzE,+EAA6F;AAC7F,0EAAsE;AACtE,+CAA4C;AAC5C,kEAA8D;AAC9D,mDAA+C;AAE/C;;;;GAIG;AAEI,IAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"layout-operation-handler.js","sourceRoot":"","sources":["../../../../src/common/features/layout/layout-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkF;AAClF,yCAAyD;AAEzD,uEAAyE;AACzE,+EAA6F;AAC7F,0EAAsE;AACtE,+CAA4C;AAC5C,kEAA8D;AAC9D,mDAA+C;AAE/C;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,oCAAgB;IAArD;;QAcM,kBAAa,GAAG,0BAAe,CAAC,IAAI,CAAC;IAgBlD,CAAC;IAdG,aAAa,CAAC,SAA0B;QACpC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,KAAK,wCAAgB,CAAC,MAAM,EAAE;YAClE,OAAO,SAAS,CAAC;SACpB;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;YACpF,OAAO,SAAS,CAAC;SACpB;QACD,OAAO,IAAI,0CAAsB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChH,CAAC;IAES,KAAK,CAAC,gBAAgB,CAAC,UAAqB;;QAClD,MAAM,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,MAAM,EAAE,CAAA,CAAC;IACtC,CAAC;CACJ,CAAA;AA9BY,wDAAsB;AAErB;IADT,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACG,eAAM;sDAAC;AAIf;IAFT,IAAA,kBAAM,EAAC,4BAAY,CAAC;IACpB,IAAA,oBAAQ,GAAE;;4DAC2B;AAG5B;IADT,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;oEACwB;AAG3C;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0DACc;iCAZ9B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA8BlC"}
|
|
@@ -27,11 +27,12 @@ exports.GModelFactory = Symbol('GModelFactory');
|
|
|
27
27
|
/**
|
|
28
28
|
* GModelFactory to be used if the graph model is already available from the model source.
|
|
29
29
|
*/
|
|
30
|
-
let GModelFactoryNullImpl =
|
|
30
|
+
let GModelFactoryNullImpl = class GModelFactoryNullImpl {
|
|
31
31
|
createModel() {
|
|
32
32
|
// no-op
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
+
exports.GModelFactoryNullImpl = GModelFactoryNullImpl;
|
|
35
36
|
exports.GModelFactoryNullImpl = GModelFactoryNullImpl = __decorate([
|
|
36
37
|
(0, inversify_1.injectable)()
|
|
37
38
|
], GModelFactoryNullImpl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-factory.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAE1B,QAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAkCrD;;GAEG;AAEI,IAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"gmodel-factory.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAE1B,QAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAkCrD;;GAEG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC9B,WAAW;QACP,QAAQ;IACZ,CAAC;CACJ,CAAA;AAJY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAIjC"}
|
|
@@ -32,7 +32,7 @@ const glsp_server_error_1 = require("../../utils/glsp-server-error");
|
|
|
32
32
|
* Is used to index all child elements of a {@link GModelRoot} by their id. Offers a set
|
|
33
33
|
* of query methods to retrieve indexed elements.
|
|
34
34
|
*/
|
|
35
|
-
let GModelIndex =
|
|
35
|
+
let GModelIndex = class GModelIndex {
|
|
36
36
|
constructor() {
|
|
37
37
|
this.idToElement = new Map();
|
|
38
38
|
this.typeToElements = new Map();
|
|
@@ -185,6 +185,7 @@ let GModelIndex = exports.GModelIndex = class GModelIndex {
|
|
|
185
185
|
return this._findElement(element.parent, guard);
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
+
exports.GModelIndex = GModelIndex;
|
|
188
189
|
exports.GModelIndex = GModelIndex = __decorate([
|
|
189
190
|
(0, inversify_1.injectable)(),
|
|
190
191
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-index.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAwG;AAExG,yCAAuC;AACvC,qEAA4E;AAE5E;;;GAGG;AAEI,IAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"gmodel-index.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAwG;AAExG,yCAAuC;AACvC,qEAA4E;AAE5E;;;GAGG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAW;IAIpB;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;IACpC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,SAAS,CAAC,IAAgB;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAES,OAAO,CAAC,OAAsB;;QACpC,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YAClC,MAAM,IAAI,mCAAe,CAAC,yBAAyB,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;SACrE;QACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1C,MAAM,OAAO,GAAG,MAAA,IAAI,CAAC,cAAc,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AE,KAAmB;QAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IAES,YAAY,CAAI,OAAsB,EAAE,KAAmB;QACjE,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,SAAS,CAAC;SACpB;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE;YAChB,OAAO,OAAO,CAAC;SAClB;QACD,IAAI,OAAO,YAAY,kBAAU,EAAE;YAC/B,OAAO,SAAS,CAAC;SACpB;QACD,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;CACJ,CAAA;AAzKY,kCAAW;sBAAX,WAAW;IADvB,IAAA,sBAAU,GAAE;;GACA,WAAW,CAyKvB"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GModelElement, GModelElementConstructor,
|
|
17
|
-
import {
|
|
16
|
+
import { GModelElement, GModelElementConstructor, GModelRoot } from '@eclipse-glsp/graph';
|
|
17
|
+
import { GModelElementSchema, GModelRootSchema } from '@eclipse-glsp/protocol';
|
|
18
18
|
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
19
19
|
export declare const GModelSerializer: unique symbol;
|
|
20
20
|
/**
|
|
@@ -54,14 +54,14 @@ export interface GModelSerializer {
|
|
|
54
54
|
export declare class DefaultGModelSerializer implements GModelSerializer {
|
|
55
55
|
protected diagramConfiguration: DiagramConfiguration;
|
|
56
56
|
reservedKeys: string[];
|
|
57
|
-
createRoot(schema:
|
|
58
|
-
getConfiguredConstructor(schema:
|
|
59
|
-
createElement(schema:
|
|
60
|
-
createSchema(element: GModelElement):
|
|
61
|
-
protected initializeRoot(root: GModelRoot, schema:
|
|
62
|
-
protected initializeElement(element: GModelElement, schema:
|
|
63
|
-
protected initializeChild(child: GModelElement, schema:
|
|
64
|
-
protected initializeParent(parent: GModelElement, schema:
|
|
57
|
+
createRoot(schema: GModelElementSchema): GModelRoot;
|
|
58
|
+
getConfiguredConstructor(schema: GModelElementSchema): GModelElementConstructor | undefined;
|
|
59
|
+
createElement(schema: GModelElementSchema, parent?: GModelElement): GModelElement;
|
|
60
|
+
createSchema(element: GModelElement): GModelElementSchema;
|
|
61
|
+
protected initializeRoot(root: GModelRoot, schema: GModelRootSchema): GModelRoot;
|
|
62
|
+
protected initializeElement(element: GModelElement, schema: GModelRootSchema): GModelElement;
|
|
63
|
+
protected initializeChild(child: GModelElement, schema: GModelElementSchema, parent?: GModelElement): GModelElement;
|
|
64
|
+
protected initializeParent(parent: GModelElement, schema: GModelElementSchema): GModelElement;
|
|
65
65
|
protected isReserved(element: GModelElement, propertyName: string): boolean;
|
|
66
66
|
}
|
|
67
67
|
//# sourceMappingURL=gmodel-serializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-serializer.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"gmodel-serializer.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC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
@@ -31,7 +31,7 @@ const inversify_1 = require("inversify");
|
|
|
31
31
|
const diagram_configuration_1 = require("../../diagram/diagram-configuration");
|
|
32
32
|
const glsp_server_error_1 = require("../../utils/glsp-server-error");
|
|
33
33
|
exports.GModelSerializer = Symbol('GModelSerializer');
|
|
34
|
-
let DefaultGModelSerializer =
|
|
34
|
+
let DefaultGModelSerializer = class DefaultGModelSerializer {
|
|
35
35
|
constructor() {
|
|
36
36
|
this.reservedKeys = ['children', 'parent', 'index', 'source', 'target'];
|
|
37
37
|
}
|
|
@@ -132,6 +132,7 @@ let DefaultGModelSerializer = exports.DefaultGModelSerializer = class DefaultGMo
|
|
|
132
132
|
return false;
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
+
exports.DefaultGModelSerializer = DefaultGModelSerializer;
|
|
135
136
|
__decorate([
|
|
136
137
|
(0, inversify_1.inject)(diagram_configuration_1.DiagramConfiguration),
|
|
137
138
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-serializer.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-serializer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6HAA6H;AAC7H,+
|
|
1
|
+
{"version":3,"file":"gmodel-serializer.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-serializer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6HAA6H;AAC7H,+CAA0F;AAE1F,yCAA+C;AAC/C,+EAA2E;AAC3E,qEAAgE;AAEnD,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAyCpD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAA7B;QAGH,iBAAY,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IA4GvE,CAAC;IA3GG,UAAU,CA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MAAM,GAAG,SAAS,CAElC;IAED,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAW,IAAI,IAAI,UAAU,CAE5B;IAED,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,UAAU,EAElC;IAED,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;CAOxC"}
|
|
@@ -17,7 +17,7 @@ const gmodel_index_1 = require("./gmodel-index");
|
|
|
17
17
|
const gmodel_serializer_1 = require("./gmodel-serializer");
|
|
18
18
|
exports.ModelState = Symbol('ModelState');
|
|
19
19
|
exports.SOURCE_URI_ARG = 'sourceUri';
|
|
20
|
-
let DefaultModelState =
|
|
20
|
+
let DefaultModelState = class DefaultModelState {
|
|
21
21
|
constructor() {
|
|
22
22
|
this.properties = new Map();
|
|
23
23
|
this.editMode = protocol_1.EditMode.EDITABLE;
|
|
@@ -51,10 +51,14 @@ let DefaultModelState = exports.DefaultModelState = class DefaultModelState {
|
|
|
51
51
|
this._root = root;
|
|
52
52
|
}
|
|
53
53
|
updateRoot(newRoot) {
|
|
54
|
+
if (!newRoot.revision && this.root) {
|
|
55
|
+
newRoot.revision = this.root.revision;
|
|
56
|
+
}
|
|
54
57
|
this.root = newRoot;
|
|
55
58
|
this.index.indexRoot(newRoot);
|
|
56
59
|
}
|
|
57
60
|
};
|
|
61
|
+
exports.DefaultModelState = DefaultModelState;
|
|
58
62
|
__decorate([
|
|
59
63
|
(0, inversify_1.inject)(gmodel_index_1.GModelIndex),
|
|
60
64
|
__metadata("design:type", gmodel_index_1.GModelIndex)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-state.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-state.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,qDAAkD;AAClD,yCAA+C;AAC/C,sEAAwD;AACxD,iDAA6C;AAC7C,2DAAuD;AAE1C,QAAA,UAAU,GAAG,MAAM,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,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAc,IAAI,CAAC,IAAgB;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,UAAU,CAAC,OAAmB;QAC1B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE;YAChC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;SACzC;QACD,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;CACJ,CAAA;AA3DY,8CAAiB;AAEjB;IADR,IAAA,kBAAM,EAAC,0BAAW,CAAC;8BACJ,0BAAW;gDAAC;AAGlB;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;qDACc;AAG9B;IADR,IAAA,kBAAM,EAAC,8BAAQ,CAAC;;mDACS;4BARjB,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CA2D7B"}
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GModelRootSchema } from '@eclipse-glsp/
|
|
17
|
-
import { Action, DirtyStateChangeReason, MaybePromise } from '@eclipse-glsp/protocol';
|
|
16
|
+
import { Action, DirtyStateChangeReason, GModelRootSchema, MaybePromise, RequestModelAction, SetModelAction } from '@eclipse-glsp/protocol';
|
|
18
17
|
import { CommandStack } from '../../command/command-stack';
|
|
19
18
|
import { DiagramConfiguration } from '../../diagram/diagram-configuration';
|
|
20
19
|
import { LayoutEngine } from '../layout/layout-engine';
|
|
@@ -22,6 +21,15 @@ import { ModelValidator } from '../validation/model-validator';
|
|
|
22
21
|
import { GModelFactory } from './gmodel-factory';
|
|
23
22
|
import { GModelSerializer } from './gmodel-serializer';
|
|
24
23
|
import { ModelState } from './model-state';
|
|
24
|
+
/**
|
|
25
|
+
* Helper class that provides utility methods to handle model updates i.e.
|
|
26
|
+
* submit a new model to the client. In addition, to the core model update action this class
|
|
27
|
+
* also takes care of related behavior like dirty state handling, validation and client/server side layouting.
|
|
28
|
+
* Note that the submissions handler is only responsible for deriving the set of actions that comprise a model update
|
|
29
|
+
* but does not actually dispatch them. The returned actions should be either manually dispatched
|
|
30
|
+
* to the `ActionDispatcher`, or simply returned as the result of an
|
|
31
|
+
* `ActionHandler.execute` method.
|
|
32
|
+
*/
|
|
25
33
|
export declare class ModelSubmissionHandler {
|
|
26
34
|
protected diagramConfiguration: DiagramConfiguration;
|
|
27
35
|
protected serializer: GModelSerializer;
|
|
@@ -30,8 +38,24 @@ export declare class ModelSubmissionHandler {
|
|
|
30
38
|
protected layoutEngine: LayoutEngine;
|
|
31
39
|
protected commandStack: CommandStack;
|
|
32
40
|
protected validator?: ModelValidator;
|
|
41
|
+
protected requestModelAction?: RequestModelAction;
|
|
33
42
|
/**
|
|
34
|
-
* Returns a list of actions to
|
|
43
|
+
* Returns a list of actions to submit the initial revision of the client-side model, based on the injected
|
|
44
|
+
* {@link GModelState}. Typically this method is invoked by the {@link RequestModelActionHandler} when the diagram
|
|
45
|
+
* is (re)loaded.
|
|
46
|
+
* <p>
|
|
47
|
+
* These actions are not processed by this {@link ModelSubmissionHandler}, but should be either manually dispatched
|
|
48
|
+
* to the {@link ActionDispatcher}, or simply returned as the result of an
|
|
49
|
+
* {@link ActionHandler#execute(Action)} method.
|
|
50
|
+
* </p>
|
|
51
|
+
*
|
|
52
|
+
* @param requestAction The {@link RequestModelAction} that triggere the initial model update
|
|
53
|
+
* @return A list of actions to be processed in order to submit the intial model.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
submitInitialModel(requestAction: RequestModelAction): MaybePromise<Action[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns a list of actions to update the client-side model, based on the injected {@link ModelState}
|
|
35
59
|
*
|
|
36
60
|
* These actions are not processed by this {@link ModelSubmissionHandler}, but should be either manually dispatched
|
|
37
61
|
* to the `ActionDispatcher`, or simply returned as the result of an `ActionHandler.execute()` method.
|
|
@@ -55,6 +79,7 @@ export declare class ModelSubmissionHandler {
|
|
|
55
79
|
* @returns A list of actions to be processed in order to submit the model.
|
|
56
80
|
*/
|
|
57
81
|
submitModelDirectly(reason?: DirtyStateChangeReason): Promise<Action[]>;
|
|
82
|
+
protected createSetModeAction(newRoot: GModelRootSchema): SetModelAction;
|
|
58
83
|
protected serializeGModel(): GModelRootSchema;
|
|
59
84
|
}
|
|
60
85
|
//# sourceMappingURL=model-submission-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-submission-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"model-submission-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,sBAAsB,EACtB,gBAAgB,EAEhB,YAAY,EAEZ,kBAAkB,EAGlB,cAAc,EAEjB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;GAQG;AACH,qBACa,sBAAsB;IAE/B,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAGvC,SAAS,CAAC,YAAY,EAAE,aAAa,CAAC;IAGtC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAIjC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAGrC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAIrC,SAAS,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IAErC,SAAS,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAElD;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,aAAa,EAAE,kBAAkB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAU7E;;;;;;;;OAQG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAapE;;;;;;;;;;;;;OAaG;IACG,mBAAmB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAsB7E,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc;IAOxE,SAAS,CAAC,eAAe,IAAI,gBAAgB;CAGhD"}
|
|
@@ -10,6 +10,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ModelSubmissionHandler = void 0;
|
|
13
|
+
/********************************************************************************
|
|
14
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
15
|
+
*
|
|
16
|
+
* This program and the accompanying materials are made available under the
|
|
17
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
+
*
|
|
20
|
+
* This Source Code may also be made available under the following Secondary
|
|
21
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
+
* with the GNU Classpath Exception which is available at
|
|
24
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
+
********************************************************************************/
|
|
13
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
14
29
|
const inversify_1 = require("inversify");
|
|
15
30
|
const command_stack_1 = require("../../command/command-stack");
|
|
@@ -19,9 +34,41 @@ const model_validator_1 = require("../validation/model-validator");
|
|
|
19
34
|
const gmodel_factory_1 = require("./gmodel-factory");
|
|
20
35
|
const gmodel_serializer_1 = require("./gmodel-serializer");
|
|
21
36
|
const model_state_1 = require("./model-state");
|
|
22
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Helper class that provides utility methods to handle model updates i.e.
|
|
39
|
+
* submit a new model to the client. In addition, to the core model update action this class
|
|
40
|
+
* also takes care of related behavior like dirty state handling, validation and client/server side layouting.
|
|
41
|
+
* Note that the submissions handler is only responsible for deriving the set of actions that comprise a model update
|
|
42
|
+
* but does not actually dispatch them. The returned actions should be either manually dispatched
|
|
43
|
+
* to the `ActionDispatcher`, or simply returned as the result of an
|
|
44
|
+
* `ActionHandler.execute` method.
|
|
45
|
+
*/
|
|
46
|
+
let ModelSubmissionHandler = class ModelSubmissionHandler {
|
|
23
47
|
/**
|
|
24
|
-
* Returns a list of actions to
|
|
48
|
+
* Returns a list of actions to submit the initial revision of the client-side model, based on the injected
|
|
49
|
+
* {@link GModelState}. Typically this method is invoked by the {@link RequestModelActionHandler} when the diagram
|
|
50
|
+
* is (re)loaded.
|
|
51
|
+
* <p>
|
|
52
|
+
* These actions are not processed by this {@link ModelSubmissionHandler}, but should be either manually dispatched
|
|
53
|
+
* to the {@link ActionDispatcher}, or simply returned as the result of an
|
|
54
|
+
* {@link ActionHandler#execute(Action)} method.
|
|
55
|
+
* </p>
|
|
56
|
+
*
|
|
57
|
+
* @param requestAction The {@link RequestModelAction} that triggere the initial model update
|
|
58
|
+
* @return A list of actions to be processed in order to submit the intial model.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
submitInitialModel(requestAction) {
|
|
62
|
+
/*
|
|
63
|
+
* In the default update action flow a `RequestModelAction` does not directly trigger a `SetModelAction` response
|
|
64
|
+
* (RequestModelAction (C) -> RequestBoundsAction (S) -> ComputedBoundsAction (C) -> SetModelACtion (S)
|
|
65
|
+
* Therefore we temporarily store the action later retrival
|
|
66
|
+
*/
|
|
67
|
+
this.requestModelAction = requestAction;
|
|
68
|
+
return this.submitModel();
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns a list of actions to update the client-side model, based on the injected {@link ModelState}
|
|
25
72
|
*
|
|
26
73
|
* These actions are not processed by this {@link ModelSubmissionHandler}, but should be either manually dispatched
|
|
27
74
|
* to the `ActionDispatcher`, or simply returned as the result of an `ActionHandler.execute()` method.
|
|
@@ -30,14 +77,14 @@ let ModelSubmissionHandler = exports.ModelSubmissionHandler = class ModelSubmiss
|
|
|
30
77
|
* @returns A list of actions to be processed in order to submit the model.
|
|
31
78
|
*/
|
|
32
79
|
submitModel(reason) {
|
|
33
|
-
var _a;
|
|
34
80
|
this.modelFactory.createModel();
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
const revision = this.requestModelAction ? 0 : this.modelState.root.revision + 1;
|
|
82
|
+
this.modelState.root.revision = revision;
|
|
37
83
|
if (this.diagramConfiguration.needsClientLayout) {
|
|
84
|
+
const root = this.serializeGModel();
|
|
38
85
|
return [protocol_1.RequestBoundsAction.create(root), protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason })];
|
|
39
86
|
}
|
|
40
|
-
return
|
|
87
|
+
return this.submitModelDirectly(reason);
|
|
41
88
|
}
|
|
42
89
|
/**
|
|
43
90
|
* Returns a list of actions to directly update the client-side model without any server- or client-side layouting.
|
|
@@ -59,8 +106,8 @@ let ModelSubmissionHandler = exports.ModelSubmissionHandler = class ModelSubmiss
|
|
|
59
106
|
await this.layoutEngine.layout();
|
|
60
107
|
}
|
|
61
108
|
const result = [];
|
|
62
|
-
result.push(
|
|
63
|
-
?
|
|
109
|
+
result.push(this.requestModelAction
|
|
110
|
+
? this.createSetModeAction(root)
|
|
64
111
|
: protocol_1.UpdateModelAction.create(root, { animate: this.diagramConfiguration.animatedUpdate }));
|
|
65
112
|
if (!this.diagramConfiguration.needsClientLayout) {
|
|
66
113
|
result.push(protocol_1.SetDirtyStateAction.create(this.commandStack.isDirty, { reason }));
|
|
@@ -71,10 +118,18 @@ let ModelSubmissionHandler = exports.ModelSubmissionHandler = class ModelSubmiss
|
|
|
71
118
|
}
|
|
72
119
|
return result;
|
|
73
120
|
}
|
|
121
|
+
createSetModeAction(newRoot) {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
const responseId = (_b = (_a = this.requestModelAction) === null || _a === void 0 ? void 0 : _a.requestId) !== null && _b !== void 0 ? _b : '';
|
|
124
|
+
const response = protocol_1.SetModelAction.create(newRoot, { responseId });
|
|
125
|
+
this.requestModelAction = undefined;
|
|
126
|
+
return response;
|
|
127
|
+
}
|
|
74
128
|
serializeGModel() {
|
|
75
129
|
return this.serializer.createSchema(this.modelState.root);
|
|
76
130
|
}
|
|
77
131
|
};
|
|
132
|
+
exports.ModelSubmissionHandler = ModelSubmissionHandler;
|
|
78
133
|
__decorate([
|
|
79
134
|
(0, inversify_1.inject)(diagram_configuration_1.DiagramConfiguration),
|
|
80
135
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-submission-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"model-submission-handler.js","sourceRoot":"","sources":["../../../../src/common/features/model/model-submission-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAYgC;AAEhC,yCAAyD;AACzD,+DAA2D;AAC3D,+EAA6F;AAC7F,2DAAuD;AACvD,mEAA+D;AAC/D,qDAAiD;AACjD,2DAAuD;AACvD,+CAA2C;AAE3C;;;;;;;;GAQG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IA0B/B;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,aAAiC;QAChD;;;;WAIG;QACH,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC;QACxC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9B,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CAAC,MAA+B;QACvC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAEhC,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAS,GAAG,CAAC,CAAC;QAClF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzC,IAAI,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE;YAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YACpC,OAAO,CAAC,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,8BAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;SAChH;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;I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QAAQ,GAAG,yBAAc,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACpC,OAAO,QAAQ,CAAC;IACpB,CAAC;IAES,eAAe;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AAtHY,wDAAsB;AAErB;IADT,IAAA,kBAAM,EAAC,4CAAoB,CAAC;;oEACwB;AAG3C;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0DACc;AAG7B;IADT,IAAA,kBAAM,EAAC,8BAAa,CAAC;;4DACgB;AAG5B;IADT,IAAA,kBAAM,EAAC,wBAAU,CAAC;;0DACc;AAIvB;IAFT,IAAA,kBAAM,EAAC,4BAAY,CAAC;IACpB,IAAA,oBAAQ,GAAE;;4DAC0B;AAG3B;IADT,IAAA,kBAAM,EAAC,4BAAY,CAAC;;4DACgB;AAI3B;IAFT,IAAA,kBAAM,EAAC,gCAAc,CAAC;IACtB,IAAA,oBAAQ,GAAE;;yDAC0B;iCAtB5B,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAsHlC"}
|
|
@@ -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"}
|
|
@@ -34,7 +34,7 @@ const progress_service_1 = require("../progress/progress-service");
|
|
|
34
34
|
const model_state_1 = require("./model-state");
|
|
35
35
|
const model_submission_handler_1 = require("./model-submission-handler");
|
|
36
36
|
const source_model_storage_1 = require("./source-model-storage");
|
|
37
|
-
let RequestModelActionHandler =
|
|
37
|
+
let RequestModelActionHandler = class RequestModelActionHandler {
|
|
38
38
|
constructor() {
|
|
39
39
|
this.actionKinds = [protocol_1.RequestModelAction.KIND];
|
|
40
40
|
}
|
|
@@ -51,7 +51,7 @@ let RequestModelActionHandler = exports.RequestModelActionHandler = class Reques
|
|
|
51
51
|
await this.sourceModelStorage.loadSourceModel(action);
|
|
52
52
|
}
|
|
53
53
|
this.reportModelLoadingFinished(progress);
|
|
54
|
-
return this.submissionHandler.
|
|
54
|
+
return this.submissionHandler.submitInitialModel(action);
|
|
55
55
|
}
|
|
56
56
|
async handleReconnect(action) {
|
|
57
57
|
var _a;
|
|
@@ -66,14 +66,15 @@ let RequestModelActionHandler = exports.RequestModelActionHandler = class Reques
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
reportModelLoading(message) {
|
|
69
|
-
this.actionDispatcher.dispatch(protocol_1.
|
|
69
|
+
this.actionDispatcher.dispatch(protocol_1.StatusAction.create(message, { severity: 'INFO' }));
|
|
70
70
|
return this.progressService.start(message);
|
|
71
71
|
}
|
|
72
72
|
reportModelLoadingFinished(monitor) {
|
|
73
|
-
this.actionDispatcher.dispatch(protocol_1.
|
|
73
|
+
this.actionDispatcher.dispatch(protocol_1.StatusAction.create('', { severity: 'NONE' }));
|
|
74
74
|
monitor.end();
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
+
exports.RequestModelActionHandler = RequestModelActionHandler;
|
|
77
78
|
__decorate([
|
|
78
79
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
79
80
|
__metadata("design:type", logger_1.Logger)
|