@abaplint/core
Version:
abaplint - Core API
28 lines • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RenameTable = void 0;
const __1 = require("..");
const renamer_helper_1 = require("./renamer_helper");
class RenameTable {
constructor(reg) {
this.reg = reg;
}
buildEdits(obj, oldName, newName) {
if (!(obj instanceof __1.Table)) {
throw new Error("RenameTable, not a table");
}
let changes = [];
const helper = new renamer_helper_1.RenamerHelper(this.reg);
changes = changes.concat(helper.buildXMLFileEdits(obj, "TABNAME", oldName, newName));
changes = changes.concat(helper.buildXMLFileEdits(obj, "FORTABLE", 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));
return {
documentChanges: changes,
};
}
}
exports.RenameTable = RenameTable;
//# sourceMappingURL=rename_table.js.map