@eclipse-glsp/server 2.4.0-next.117 → 2.4.0-next.118
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/common/features/model/request-model-action-handler.d.ts +3 -2
- package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
- package/lib/common/features/model/request-model-action-handler.js +16 -5
- package/lib/common/features/model/request-model-action-handler.js.map +1 -1
- package/package.json +3 -3
- package/src/common/features/model/request-model-action-handler.ts +19 -7
|
@@ -31,7 +31,8 @@ export declare class RequestModelActionHandler implements ActionHandler {
|
|
|
31
31
|
protected progressService: ProgressService;
|
|
32
32
|
execute(action: RequestModelAction): Promise<Action[]>;
|
|
33
33
|
protected handleReconnect(action: RequestModelAction): Promise<void>;
|
|
34
|
-
protected reportModelLoading(message: string): ProgressMonitor;
|
|
35
|
-
protected reportModelLoadingFinished(monitor
|
|
34
|
+
protected reportModelLoading(message: string): ProgressMonitor | undefined;
|
|
35
|
+
protected reportModelLoadingFinished(monitor?: ProgressMonitor): void;
|
|
36
|
+
protected handleModelLoadingError(error: unknown, monitor?: ProgressMonitor): void;
|
|
36
37
|
}
|
|
37
38
|
//# 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,EAAgB,MAAM,wBAAwB,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,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,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAGzB,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;
|
|
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;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,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,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAGzB,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;cAuB5C,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1E,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAK1E,SAAS,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI;IAKrE,SAAS,CAAC,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI;CAMrF"}
|
|
@@ -44,11 +44,16 @@ let RequestModelActionHandler = class RequestModelActionHandler {
|
|
|
44
44
|
this.modelState.setAll((_a = action.options) !== null && _a !== void 0 ? _a : {});
|
|
45
45
|
const isReconnecting = client_options_util_1.ClientOptionsUtil.isReconnecting(action.options);
|
|
46
46
|
const progress = this.reportModelLoading('Model loading in progress');
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
try {
|
|
48
|
+
if (isReconnecting) {
|
|
49
|
+
await this.handleReconnect(action);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
await this.sourceModelStorage.loadSourceModel(action);
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
catch (err) {
|
|
56
|
+
this.handleModelLoadingError(err, progress);
|
|
52
57
|
}
|
|
53
58
|
this.reportModelLoadingFinished(progress);
|
|
54
59
|
return this.submissionHandler.submitInitialModel(action);
|
|
@@ -71,7 +76,13 @@ let RequestModelActionHandler = class RequestModelActionHandler {
|
|
|
71
76
|
}
|
|
72
77
|
reportModelLoadingFinished(monitor) {
|
|
73
78
|
this.actionDispatcher.dispatch(protocol_1.StatusAction.create('', { severity: 'NONE' }));
|
|
74
|
-
monitor.end();
|
|
79
|
+
monitor === null || monitor === void 0 ? void 0 : monitor.end();
|
|
80
|
+
}
|
|
81
|
+
handleModelLoadingError(error, monitor) {
|
|
82
|
+
// In case of an error we end progress reporting and rethrow the error so
|
|
83
|
+
// that it can be handled by the default error handler
|
|
84
|
+
monitor === null || monitor === void 0 ? void 0 : monitor.end();
|
|
85
|
+
throw error;
|
|
75
86
|
}
|
|
76
87
|
};
|
|
77
88
|
exports.RequestModelActionHandler = 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,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;
|
|
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;IAsE5C,CAAC;IAlDG,KAAK,CAAC,OAA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js server framework for Eclipse GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"watch": "tsc -w"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@eclipse-glsp/graph": "2.4.0-next.
|
|
61
|
+
"@eclipse-glsp/graph": "2.4.0-next.118+079fa99",
|
|
62
62
|
"@eclipse-glsp/protocol": "next",
|
|
63
63
|
"@types/uuid": "8.3.1",
|
|
64
64
|
"commander": "^8.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "079fa991b7f977b842a10fee0e4337a8346c5b7d"
|
|
82
82
|
}
|
|
@@ -54,11 +54,16 @@ export class RequestModelActionHandler implements ActionHandler {
|
|
|
54
54
|
|
|
55
55
|
const progress = this.reportModelLoading('Model loading in progress');
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
try {
|
|
58
|
+
if (isReconnecting) {
|
|
59
|
+
await this.handleReconnect(action);
|
|
60
|
+
} else {
|
|
61
|
+
await this.sourceModelStorage.loadSourceModel(action);
|
|
62
|
+
}
|
|
63
|
+
} catch (err) {
|
|
64
|
+
this.handleModelLoadingError(err, progress);
|
|
61
65
|
}
|
|
66
|
+
|
|
62
67
|
this.reportModelLoadingFinished(progress);
|
|
63
68
|
|
|
64
69
|
return this.submissionHandler.submitInitialModel(action);
|
|
@@ -75,13 +80,20 @@ export class RequestModelActionHandler implements ActionHandler {
|
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
|
|
78
|
-
protected reportModelLoading(message: string): ProgressMonitor {
|
|
83
|
+
protected reportModelLoading(message: string): ProgressMonitor | undefined {
|
|
79
84
|
this.actionDispatcher.dispatch(StatusAction.create(message, { severity: 'INFO' }));
|
|
80
85
|
return this.progressService.start(message);
|
|
81
86
|
}
|
|
82
87
|
|
|
83
|
-
protected reportModelLoadingFinished(monitor
|
|
88
|
+
protected reportModelLoadingFinished(monitor?: ProgressMonitor): void {
|
|
84
89
|
this.actionDispatcher.dispatch(StatusAction.create('', { severity: 'NONE' }));
|
|
85
|
-
monitor
|
|
90
|
+
monitor?.end();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
protected handleModelLoadingError(error: unknown, monitor?: ProgressMonitor): void {
|
|
94
|
+
// In case of an error we end progress reporting and rethrow the error so
|
|
95
|
+
// that it can be handled by the default error handler
|
|
96
|
+
monitor?.end();
|
|
97
|
+
throw error;
|
|
86
98
|
}
|
|
87
99
|
}
|