@abaplint/core 2.79.10 → 2.79.11
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/build/abaplint.d.ts +6 -1
- package/build/src/ddic_references.js +1 -1
- package/build/src/objects/rename/rename_data_element.js +2 -1
- package/build/src/objects/rename/rename_domain.js +1 -0
- package/build/src/objects/rename/renamer_helper.js +33 -3
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -2402,7 +2402,12 @@ declare interface IDDICReferences {
|
|
|
2402
2402
|
addUsing(obj: IObject, using: IObjectAndToken | undefined): void;
|
|
2403
2403
|
clear(obj: IObject): void;
|
|
2404
2404
|
listUsing(obj: IObject): readonly IObjectAndToken[];
|
|
2405
|
-
listWhereUsed(obj: IObject):
|
|
2405
|
+
listWhereUsed(obj: IObject): {
|
|
2406
|
+
type: string;
|
|
2407
|
+
name: string;
|
|
2408
|
+
token?: Token;
|
|
2409
|
+
filename?: string;
|
|
2410
|
+
}[];
|
|
2406
2411
|
}
|
|
2407
2412
|
|
|
2408
2413
|
declare interface IDDLParserResult {
|
|
@@ -51,7 +51,7 @@ class DDICReferences {
|
|
|
51
51
|
for (const type in this.index[name]) {
|
|
52
52
|
for (const f of this.index[name][type]) {
|
|
53
53
|
if (f.object && f.object.getType() === searchType && f.object.getName() === searchName) {
|
|
54
|
-
ret.push(f);
|
|
54
|
+
ret.push({ type, name, token: f.token, filename: f.filename });
|
|
55
55
|
break; // current outermost loop
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -15,7 +15,8 @@ class RenameDataElement {
|
|
|
15
15
|
const helper = new renamer_helper_1.RenamerHelper(this.reg);
|
|
16
16
|
changes = changes.concat(helper.buildXMLFileEdits(obj, "ROLLNAME", oldName, newName));
|
|
17
17
|
changes = changes.concat(helper.renameFiles(obj, oldName, newName));
|
|
18
|
-
changes = changes.concat(helper.
|
|
18
|
+
changes = changes.concat(helper.renameDDICCodeReferences(obj, oldName, newName));
|
|
19
|
+
changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName));
|
|
19
20
|
return {
|
|
20
21
|
documentChanges: changes,
|
|
21
22
|
};
|
|
@@ -15,6 +15,7 @@ class RenameDomain {
|
|
|
15
15
|
const helper = new renamer_helper_1.RenamerHelper(this.reg);
|
|
16
16
|
changes = changes.concat(helper.buildXMLFileEdits(obj, "DOMNAME", oldName, newName));
|
|
17
17
|
changes = changes.concat(helper.renameFiles(obj, oldName, newName));
|
|
18
|
+
changes = changes.concat(helper.renameDDICDTELReferences(obj, oldName, newName));
|
|
18
19
|
return {
|
|
19
20
|
documentChanges: changes,
|
|
20
21
|
};
|
|
@@ -27,7 +27,7 @@ class RenamerHelper {
|
|
|
27
27
|
// start with the last reference in the file first, if there are multiple refs per line
|
|
28
28
|
return this.replaceRefs(refs, oldName, newName).reverse();
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
renameDDICCodeReferences(obj, oldName, newName) {
|
|
31
31
|
const changes = [];
|
|
32
32
|
const used = this.reg.getDDICReferences().listWhereUsed(obj);
|
|
33
33
|
for (const u of used) {
|
|
@@ -39,9 +39,39 @@ class RenamerHelper {
|
|
|
39
39
|
}
|
|
40
40
|
return changes;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
renameDDICTABLReferences(obj, oldName, newName) {
|
|
43
43
|
const changes = [];
|
|
44
|
-
const
|
|
44
|
+
const used = this.reg.getDDICReferences().listWhereUsed(obj);
|
|
45
|
+
for (const u of used) {
|
|
46
|
+
if (u.type !== "TABL") {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const tabl = this.reg.getObject(u.type, u.name);
|
|
50
|
+
if (tabl === undefined) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
changes.push(...this.buildXMLFileEdits(tabl, "ROLLNAME", oldName, newName));
|
|
54
|
+
}
|
|
55
|
+
return changes;
|
|
56
|
+
}
|
|
57
|
+
renameDDICDTELReferences(obj, oldName, newName) {
|
|
58
|
+
const changes = [];
|
|
59
|
+
const used = this.reg.getDDICReferences().listWhereUsed(obj);
|
|
60
|
+
for (const u of used) {
|
|
61
|
+
if (u.type !== "DTEL") {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const tabl = this.reg.getObject(u.type, u.name);
|
|
65
|
+
if (tabl === undefined) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
changes.push(...this.buildXMLFileEdits(tabl, "DOMNAME", oldName, newName));
|
|
69
|
+
}
|
|
70
|
+
return changes;
|
|
71
|
+
}
|
|
72
|
+
buildXMLFileEdits(object, xmlTag, oldName, newName) {
|
|
73
|
+
const changes = [];
|
|
74
|
+
const xml = object.getXMLFile();
|
|
45
75
|
if (xml === undefined) {
|
|
46
76
|
return [];
|
|
47
77
|
}
|
package/build/src/registry.js
CHANGED