@eclipse-glsp/server 1.1.0-next.e49c816.56 → 1.1.0-next.f0fc2cf.63
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/di/diagram-module.d.ts +3 -0
- package/lib/common/di/diagram-module.d.ts.map +1 -1
- package/lib/common/di/diagram-module.js +14 -5
- package/lib/common/di/diagram-module.js.map +1 -1
- package/lib/common/features/model/model-submission-handler.d.ts +2 -0
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +10 -0
- 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 +34 -12
- package/lib/common/features/model/request-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 +50 -0
- package/lib/common/features/progress/progress-service.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 +79 -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 +3 -9
- package/lib/common/features/validation/request-markers-handler.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/node/abstract-json-model-storage.d.ts.map +1 -1
- package/lib/node/abstract-json-model-storage.js +8 -2
- package/lib/node/abstract-json-model-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/package.json +3 -4
- package/src/common/di/diagram-module.ts +20 -7
- package/src/common/features/model/model-submission-handler.ts +12 -0
- package/src/common/features/model/request-model-action-handler.ts +36 -16
- package/src/common/features/progress/progress-service.ts +74 -0
- package/src/common/features/validation/model-validator.ts +75 -3
- package/src/common/features/validation/request-markers-handler.ts +4 -10
- package/src/common/utils/client-options-util.ts +8 -0
- package/src/node/abstract-json-model-storage.ts +8 -2
- package/src/node/launch/cli-parser.ts +1 -1
|
@@ -13,10 +13,18 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import { Args } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { ArgsUtil } from './args-util';
|
|
18
|
+
|
|
16
19
|
export class ClientOptionsUtil {
|
|
17
20
|
private static FILE_PREFIX = 'file://';
|
|
21
|
+
public static IS_RECONNECTING = 'isReconnecting';
|
|
18
22
|
|
|
19
23
|
public static adaptUri(uri: string): string {
|
|
20
24
|
return uri.replace(this.FILE_PREFIX, '');
|
|
21
25
|
}
|
|
26
|
+
|
|
27
|
+
public static isReconnecting(options?: Args): boolean {
|
|
28
|
+
return ArgsUtil.getBoolean(options, ClientOptionsUtil.IS_RECONNECTING);
|
|
29
|
+
}
|
|
22
30
|
}
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { MaybePromise, RequestModelAction, SaveModelAction, TypeGuard } from '@eclipse-glsp/protocol';
|
|
17
|
-
import * as fs from 'fs
|
|
17
|
+
import * as fs from 'fs';
|
|
18
18
|
import { inject, injectable } from 'inversify';
|
|
19
|
+
import * as os from 'os';
|
|
19
20
|
import { fileURLToPath } from 'url';
|
|
20
21
|
import { ModelState, SOURCE_URI_ARG } from '../common/features/model/model-state';
|
|
21
22
|
import { SourceModelStorage } from '../common/features/model/source-model-storage';
|
|
@@ -91,7 +92,12 @@ export abstract class AbstractJsonModelStorage implements SourceModelStorage {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
protected toPath(sourceUri: string): string {
|
|
94
|
-
|
|
95
|
+
let path = sourceUri.startsWith('file://') ? fileURLToPath(sourceUri) : sourceUri;
|
|
96
|
+
if (os.platform() === 'win32') {
|
|
97
|
+
// Remove the leading slash if it exists (Windows paths don't have it)
|
|
98
|
+
path = path.replace(/^\//, '');
|
|
99
|
+
}
|
|
100
|
+
return path;
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
protected getFileUri(action: SaveModelAction): string {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import * as cmd from 'commander';
|
|
17
|
-
import * as fs from 'fs
|
|
17
|
+
import * as fs from 'fs';
|
|
18
18
|
import * as path from 'path';
|
|
19
19
|
import { LogLevel, LoggerConfigOptions, asLogLevel } from '../../common/utils/logger';
|
|
20
20
|
|