@abaplint/core 2.115.18 → 2.115.19
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.
|
@@ -9,7 +9,8 @@ const sql_function_1 = require("./sql_function");
|
|
|
9
9
|
const sql_path_1 = require("./sql_path");
|
|
10
10
|
class SQLField extends combi_1.Expression {
|
|
11
11
|
getRunnable() {
|
|
12
|
-
const
|
|
12
|
+
const atParen = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.SimpleFieldChain2, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
13
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleFieldChain2, atParen)), version_1.Version.OpenABAP);
|
|
13
14
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
14
15
|
const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
|
|
15
16
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
|
package/build/src/lsp/_lookup.js
CHANGED
|
@@ -15,6 +15,7 @@ const objects_1 = require("../objects");
|
|
|
15
15
|
const types_1 = require("../abap/types");
|
|
16
16
|
const _statement_1 = require("../abap/2_statements/statements/_statement");
|
|
17
17
|
const include_graph_1 = require("../utils/include_graph");
|
|
18
|
+
const visibility_1 = require("../abap/4_file_information/visibility");
|
|
18
19
|
class LSPLookup {
|
|
19
20
|
static lookup(cursor, reg, obj) {
|
|
20
21
|
var _a, _b;
|
|
@@ -72,7 +73,11 @@ class LSPLookup {
|
|
|
72
73
|
const method = this.findMethodDefinition(cursor, bottomScope.getParent());
|
|
73
74
|
if (method !== undefined && method.getStart().equals(cursor.token.getStart())) {
|
|
74
75
|
const found = _lsp_utils_1.LSPUtils.identiferToLocation(method);
|
|
75
|
-
|
|
76
|
+
let hover = "Method Definition \"" + method.getName() + "\"";
|
|
77
|
+
// Method definitions have getVisibility()
|
|
78
|
+
const methodDef = method;
|
|
79
|
+
const visibilityStr = this.visibilityToString(methodDef.getVisibility());
|
|
80
|
+
hover += "\n\n" + visibilityStr;
|
|
76
81
|
return { hover, definition: found, definitionId: method, scope: bottomScope };
|
|
77
82
|
}
|
|
78
83
|
let hoverValue = "";
|
|
@@ -238,8 +243,25 @@ class LSPLookup {
|
|
|
238
243
|
}
|
|
239
244
|
return this.methodParameters(methodDef);
|
|
240
245
|
}
|
|
246
|
+
static visibilityToString(visibility) {
|
|
247
|
+
switch (visibility) {
|
|
248
|
+
case visibility_1.Visibility.Public:
|
|
249
|
+
return "PUBLIC";
|
|
250
|
+
case visibility_1.Visibility.Protected:
|
|
251
|
+
return "PROTECTED";
|
|
252
|
+
case visibility_1.Visibility.Private:
|
|
253
|
+
return "PRIVATE";
|
|
254
|
+
default:
|
|
255
|
+
return "";
|
|
256
|
+
}
|
|
257
|
+
}
|
|
241
258
|
static methodParameters(methodDef) {
|
|
242
259
|
let ret = "";
|
|
260
|
+
// Add visibility information
|
|
261
|
+
const visibilityStr = this.visibilityToString(methodDef.getVisibility());
|
|
262
|
+
if (visibilityStr) {
|
|
263
|
+
ret += visibilityStr + "\n\n";
|
|
264
|
+
}
|
|
243
265
|
const parameters = methodDef.getParameters();
|
|
244
266
|
const importing = parameters.getImporting();
|
|
245
267
|
if (importing.length > 0) {
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.19",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.
|
|
53
|
+
"@microsoft/api-extractor": "^7.56.0",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^24.10.
|
|
56
|
+
"@types/node": "^24.10.10",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.39.2",
|
|
59
59
|
"mocha": "^11.7.5",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^5.3.
|
|
66
|
+
"fast-xml-parser": "^5.3.4",
|
|
67
67
|
"json5": "^2.2.3",
|
|
68
68
|
"vscode-languageserver-types": "^3.17.5"
|
|
69
69
|
}
|