@abaplint/core 2.113.4 → 2.113.6

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.
@@ -1565,6 +1565,12 @@ declare class DataElement extends AbstractObject {
1565
1565
  };
1566
1566
  setDirty(): void;
1567
1567
  getDomainName(): string | undefined;
1568
+ getTexts(): {
1569
+ short?: string;
1570
+ medium?: string;
1571
+ long?: string;
1572
+ heading?: string;
1573
+ } | undefined;
1568
1574
  parseType(reg: IRegistry): AbstractType;
1569
1575
  parse(): {
1570
1576
  updated: boolean;
@@ -10,6 +10,7 @@ exports.SELECTION_EVENTS = [
10
10
  Statements.EndOfSelection,
11
11
  Statements.Initialization,
12
12
  Statements.TopOfPage,
13
+ Statements.LoadOfProgram,
13
14
  Statements.EndOfPage,
14
15
  ];
15
16
  exports.DECLARATION_STUFF = [
@@ -11,8 +11,10 @@ const _typed_identifier_1 = require("../abap/types/_typed_identifier");
11
11
  const _reference_1 = require("../abap/5_syntax/_reference");
12
12
  const _builtin_1 = require("../abap/5_syntax/_builtin");
13
13
  const _scope_type_1 = require("../abap/5_syntax/_scope_type");
14
+ const objects_1 = require("../objects");
14
15
  const types_1 = require("../abap/types");
15
16
  const _statement_1 = require("../abap/2_statements/statements/_statement");
17
+ const include_graph_1 = require("../utils/include_graph");
16
18
  class LSPLookup {
17
19
  static lookup(cursor, reg, obj) {
18
20
  var _a, _b;
@@ -25,7 +27,17 @@ class LSPLookup {
25
27
  if (fm) {
26
28
  return { hover: "Function Module " + fm };
27
29
  }
28
- const bottomScope = new syntax_1.SyntaxLogic(reg, obj).run().spaghetti.lookupPosition(cursor.identifier.getStart(), cursor.identifier.getFilename());
30
+ let main = obj;
31
+ if (obj instanceof objects_1.Program && obj.isInclude()) {
32
+ // todo: this is slow
33
+ const ig = new include_graph_1.IncludeGraph(reg);
34
+ const mains = ig.listMainForInclude(cursor.identifier.getFilename());
35
+ if (mains.length === 1) {
36
+ // yea, well, or it has to be a popup
37
+ main = reg.findObjectForFile(reg.getFileByName(mains[0])) || obj;
38
+ }
39
+ }
40
+ const bottomScope = new syntax_1.SyntaxLogic(reg, main).run().spaghetti.lookupPosition(cursor.identifier.getStart(), cursor.identifier.getFilename());
29
41
  if (bottomScope === undefined) {
30
42
  return undefined;
31
43
  }
@@ -14,6 +14,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
14
14
  }
15
15
  getDescription() {
16
16
  var _a;
17
+ this.parse();
17
18
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
18
19
  }
19
20
  getAllowedNaming() {
@@ -31,6 +32,11 @@ class DataElement extends _abstract_object_1.AbstractObject {
31
32
  this.parse();
32
33
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.domname;
33
34
  }
35
+ getTexts() {
36
+ var _a;
37
+ this.parse();
38
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.texts;
39
+ }
34
40
  parseType(reg) {
35
41
  const references = [];
36
42
  let lookup = undefined;
@@ -89,6 +95,12 @@ class DataElement extends _abstract_object_1.AbstractObject {
89
95
  datatype: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DATATYPE,
90
96
  leng: dd04v === null || dd04v === void 0 ? void 0 : dd04v.LENG,
91
97
  decimals: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DECIMALS,
98
+ texts: {
99
+ short: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_S,
100
+ medium: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_M,
101
+ long: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_L,
102
+ heading: dd04v === null || dd04v === void 0 ? void 0 : dd04v.REPTEXT,
103
+ },
92
104
  };
93
105
  const end = Date.now();
94
106
  return { updated: true, runtime: end - start };
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.4";
70
+ return "2.113.6";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.4",
3
+ "version": "2.113.6",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,7 +53,7 @@
53
53
  "@microsoft/api-extractor": "^7.47.7",
54
54
  "@types/chai": "^4.3.19",
55
55
  "@types/mocha": "^10.0.7",
56
- "@types/node": "^22.5.2",
56
+ "@types/node": "^22.5.4",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.9.1",
59
59
  "mocha": "^10.7.3",