UNPKG

@abaplint/core

Version:
28 lines 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RenameDataElement = void 0; const __1 = require(".."); const renamer_helper_1 = require("./renamer_helper"); class RenameDataElement { constructor(reg) { this.reg = reg; } buildEdits(obj, oldName, newName) { if (!(obj instanceof __1.DataElement)) { throw new Error("RenameDataElement, not a data element"); } let changes = []; const helper = new renamer_helper_1.RenamerHelper(this.reg); changes = changes.concat(helper.buildXMLFileEdits(obj, "ROLLNAME", oldName, newName)); changes = changes.concat(helper.renameFiles(obj, oldName, newName)); changes = changes.concat(helper.renameDDICCodeReferences(obj, oldName, newName)); changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName)); changes = changes.concat(helper.renameDDICTTYPReferences(obj, oldName, newName)); changes = changes.concat(helper.renameDDICAUTHReferences(obj, oldName, newName)); return { documentChanges: changes, }; } } exports.RenameDataElement = RenameDataElement; //# sourceMappingURL=rename_data_element.js.map