Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | 1x 1x 15x 15x 15x 15x 15x 15x 15x 15x 1x 1x 1x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 60x 60x 60x 32x 60x 8x 7x 7x 28x 10x 3x 3x 10x 9x 7x 9x 2x 2x 10x 1x 60x 14x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 15x 14x 14x 14x 15x 15x 15x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_git_add_patch.clas.abap class zcl_abapgit_git_add_patch { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_GIT_ADD_PATCH'; static IMPLEMENTED_INTERFACES = []; static ATTRIBUTES = {"MT_DIFF": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}), "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}), "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}), "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}), "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}), "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MT_PATCH": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "visibility": "I", "is_constant": " ", "is_class": " "}}; static METHODS = {"CALCULATE_PATCH": {"visibility": "I", "parameters": {"RT_PATCH": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "is_optional": " "}}}, "CONSTRUCTOR": {"visibility": "U", "parameters": {"IT_DIFF": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}), "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}), "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}), "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}), "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}), "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");}, "is_optional": " "}}}, "GET_PATCH": {"visibility": "U", "parameters": {"RT_PATCH": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "is_optional": " "}}}, "GET_PATCH_BINARY": {"visibility": "U", "parameters": {"RV_PATCH_BINARY": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}}}; #mt_diff; #mt_patch; constructor() { this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "calculate_patch": this.#calculate_patch.bind(this), "get_patch": this.get_patch.bind(this), "get_patch_binary": this.get_patch_binary.bind(this), }; this.#mt_diff = abap.types.TableFactory.construct(new abap.types.Structure({ "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}), "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}), "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}), "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}), "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}), "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt"); this.FRIENDS_ACCESS_INSTANCE["mt_diff"] = this.#mt_diff; this.#mt_patch = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); this.FRIENDS_ACCESS_INSTANCE["mt_patch"] = this.#mt_patch; } async #calculate_patch() { let rt_patch = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({ "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}), "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}), "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}), "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}), "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}), "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {})); for await (const unique118 of abap.statements.loop(this.#mt_diff)) { fs_ls_diff_.assign(unique118); let unique119 = fs_ls_diff_.get().result; if (abap.compare.eq(unique119, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().unchanged)) { abap.statements.insertInternal({data: fs_ls_diff_.get().old, table: rt_patch}); } else if (abap.compare.eq(unique119, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().insert)) { if (abap.compare.eq(fs_ls_diff_.get().patch_flag, abap.builtin.abap_true)) { abap.statements.insertInternal({data: fs_ls_diff_.get().new, table: rt_patch}); } } else if (abap.compare.eq(unique119, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().delete)) { if (abap.compare.eq(fs_ls_diff_.get().patch_flag, abap.builtin.abap_false)) { abap.statements.insertInternal({data: fs_ls_diff_.get().old, table: rt_patch}); } } else if (abap.compare.eq(unique119, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().update)) { if (abap.compare.eq(fs_ls_diff_.get().patch_flag, abap.builtin.abap_true)) { abap.statements.insertInternal({data: fs_ls_diff_.get().new, table: rt_patch}); } else { abap.statements.insertInternal({data: fs_ls_diff_.get().old, table: rt_patch}); } } else { await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unknown result`)}); } } return rt_patch; } async constructor_(INPUT) { let it_diff = INPUT?.it_diff; if (it_diff?.getQualifiedName === undefined || it_diff.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFFS_TT") { it_diff = undefined; } if (it_diff === undefined) { it_diff = abap.types.TableFactory.construct(new abap.types.Structure({ "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}), "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}), "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}), "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}), "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}), "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt").set(INPUT.it_diff); } this.#mt_diff.set(it_diff); return this; } async get_patch() { let rt_patch = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); if (abap.compare.initial(this.#mt_patch)) { this.#mt_patch.set((await this.#calculate_patch())); } rt_patch.set(this.#mt_patch); return rt_patch; } async get_patch_binary() { let rv_patch_binary = new abap.types.XString({qualifiedName: "XSTRING"}); let lv_string = new abap.types.String({qualifiedName: "STRING"}); if (abap.compare.initial(this.#mt_patch)) { this.#mt_patch.set((await this.#calculate_patch())); } abap.statements.concatenate({source: [this.#mt_patch], target: lv_string, separatedBy: abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, lines: true}); lv_string.set(abap.operators.concat(lv_string,abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)); rv_patch_binary.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].string_to_xstring_utf8({iv_string: lv_string}))); return rv_patch_binary; } } abap.Classes['ZCL_ABAPGIT_GIT_ADD_PATCH'] = zcl_abapgit_git_add_patch; export {zcl_abapgit_git_add_patch}; |