@abaplint/core 2.102.19 → 2.102.21
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.
|
@@ -41,7 +41,7 @@ class CodeLens {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
if (settings.dynamicExceptions === true) {
|
|
44
|
-
for (const ref of this.findMethodReferences(top)) {
|
|
44
|
+
for (const ref of this.findMethodReferences(top, file)) {
|
|
45
45
|
if (!(ref.resolved instanceof types_1.MethodDefinition)) {
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
@@ -59,7 +59,7 @@ class CodeLens {
|
|
|
59
59
|
}
|
|
60
60
|
if (text !== "") {
|
|
61
61
|
ret.push({
|
|
62
|
-
range: _lsp_utils_1.LSPUtils.tokenToRange(ref.
|
|
62
|
+
range: _lsp_utils_1.LSPUtils.tokenToRange(ref.position.getToken()),
|
|
63
63
|
command: LServer.Command.create(text, "")
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -79,15 +79,17 @@ class CodeLens {
|
|
|
79
79
|
}
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
|
-
findMethodReferences(node) {
|
|
82
|
+
findMethodReferences(node, file) {
|
|
83
83
|
const ret = [];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
if (node.getIdentifier().filename === file.getFilename()) {
|
|
85
|
+
for (const r of node.getData().references) {
|
|
86
|
+
if (r.referenceType === _reference_1.ReferenceType.MethodReference) {
|
|
87
|
+
ret.push(r);
|
|
88
|
+
}
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
for (const c of node.getChildren()) {
|
|
90
|
-
ret.push(...this.findMethodReferences(c));
|
|
92
|
+
ret.push(...this.findMethodReferences(c, file));
|
|
91
93
|
}
|
|
92
94
|
return ret;
|
|
93
95
|
}
|
package/build/src/registry.js
CHANGED