@codingame/monaco-languageclient-wrapper 3.2.1 → 3.2.4
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/dist/cobol.js +0 -7
- package/dist/csharp.js +29 -0
- package/dist/index2.js +114 -4024
- package/dist/java.js +48 -439
- package/dist/tools.js +0 -30
- package/package.json +3 -2
- package/stats.html +1 -1
package/dist/cobol.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import { a as api } from './index2.js';
|
|
2
2
|
import * as vscode from 'vscode';
|
|
3
3
|
import { E as ExtensionFeature } from './tools.js';
|
|
4
|
-
|
|
5
4
|
const ResolveCobolSubroutineRequestType = new api.ProtocolRequestType('cobol/resolveSubroutine');
|
|
6
5
|
class CobolResolveSubroutineFeature extends ExtensionFeature {
|
|
7
6
|
constructor(languageClient) {
|
|
8
7
|
super();
|
|
9
8
|
this.languageClient = languageClient;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
activate(context, capabilities, documentSelector) {
|
|
13
11
|
context.subscriptions.push(this.languageClient.onRequest(ResolveCobolSubroutineRequestType, routineName => {
|
|
14
12
|
var _vscode$workspace$roo, _vscode$workspace$tex;
|
|
15
|
-
|
|
16
13
|
const constantRoutinePaths = {
|
|
17
14
|
'assert-equals': "file:".concat((_vscode$workspace$roo = vscode.workspace.rootPath) !== null && _vscode$workspace$roo !== void 0 ? _vscode$workspace$roo : '/tmp/project', "/deps/assert-equals.cbl")
|
|
18
15
|
};
|
|
19
16
|
const contantRoutinePath = constantRoutinePaths[routineName.toLowerCase()];
|
|
20
|
-
|
|
21
17
|
if (contantRoutinePath != null) {
|
|
22
18
|
return contantRoutinePath;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
return (_vscode$workspace$tex = vscode.workspace.textDocuments.filter(textDocument => vscode.languages.match(documentSelector, textDocument)).filter(document => document.getText().match(new RegExp("PROGRAM-ID\\.\\W+".concat(routineName, "\\."), 'gi'))).sort((a, b) => a.uri.toString().localeCompare(b.uri.toString()))[0]) === null || _vscode$workspace$tex === void 0 ? void 0 : _vscode$workspace$tex.uri.toString();
|
|
26
21
|
}));
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
export { CobolResolveSubroutineFeature, ResolveCobolSubroutineRequestType };
|
package/dist/csharp.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { workspace } from 'vscode';
|
|
2
|
+
import { E as ExtensionFeature } from './tools.js';
|
|
3
|
+
import { ProtocolRequestType } from 'vscode-languageserver-protocol/lib/common/api';
|
|
4
|
+
const OmnisharpMetadataRequestType = new ProtocolRequestType('o#/metadata');
|
|
5
|
+
class CsharpExtensionFeature extends ExtensionFeature {
|
|
6
|
+
constructor(languageClient) {
|
|
7
|
+
super();
|
|
8
|
+
this.languageClient = languageClient;
|
|
9
|
+
}
|
|
10
|
+
activate(context) {
|
|
11
|
+
context.subscriptions.push(workspace.registerTextDocumentContentProvider('omnisharp-metadata', {
|
|
12
|
+
provideTextDocumentContent: async (uri, token) => {
|
|
13
|
+
const [, project, assembly, typeName] = /^\/Project\/(.*)\/Assembly\/(.*)\/Symbol\/(.*).cs$/.exec(uri.fsPath);
|
|
14
|
+
const {
|
|
15
|
+
Source
|
|
16
|
+
} = await this.languageClient.sendRequest(OmnisharpMetadataRequestType, {
|
|
17
|
+
Timeout: 5000,
|
|
18
|
+
AssemblyName: assembly.replace(/\//g, '.'),
|
|
19
|
+
Language: null,
|
|
20
|
+
ProjectName: project,
|
|
21
|
+
TypeName: typeName.replace(/\//g, '.'),
|
|
22
|
+
VersionNumber: null
|
|
23
|
+
}, token);
|
|
24
|
+
return Source;
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export { CsharpExtensionFeature };
|