@abaplint/core 2.93.76 → 2.93.77

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.
@@ -6,22 +6,18 @@ const _identifier_1 = require("../abap/4_file_information/_identifier");
6
6
  const _abap_object_1 = require("../objects/_abap_object");
7
7
  const position_1 = require("../position");
8
8
  const LServer = require("vscode-languageserver-types");
9
- function getABAPObjects(reg) {
10
- const ret = [];
11
- for (const o of reg.getObjects()) {
12
- if (o instanceof _abap_object_1.ABAPObject) {
13
- ret.push(o);
14
- }
15
- }
16
- return ret;
17
- }
18
9
  class LSPUtils {
19
- static getABAPFile(reg, name) {
20
- const obj = getABAPObjects(reg);
21
- for (const o of obj) {
22
- for (const file of o.getABAPFiles()) {
23
- if (file.getFilename().toUpperCase() === name.toUpperCase()) {
24
- return file;
10
+ static getABAPFile(reg, filename) {
11
+ const file = reg.getFileByName(filename);
12
+ if (file === undefined) {
13
+ return undefined;
14
+ }
15
+ const obj = reg.findObjectForFile(file);
16
+ obj === null || obj === void 0 ? void 0 : obj.parse();
17
+ if (obj instanceof _abap_object_1.ABAPObject) {
18
+ for (const abapfile of obj.getABAPFiles()) {
19
+ if (abapfile.getFilename().toUpperCase() === filename.toUpperCase()) {
20
+ return abapfile;
25
21
  }
26
22
  }
27
23
  }
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.76";
66
+ return "2.93.77";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.76",
3
+ "version": "2.93.77",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",