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 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 1x 3x 3x 3x 1x 9x 9x 1x 39x 39x 39x 39x 39x 39x 2x 2x 37x 37x 37x 37x 37x 37x 37x 37x 37x 37x 37x 37x 37x 39x 1x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_feature.clas.abap
class zcl_abapgit_feature {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'ZCL_ABAPGIT_FEATURE';
static IMPLEMENTED_INTERFACES = [];
static ATTRIBUTES = {};
static METHODS = {"IS_ENABLED": {"visibility": "U", "parameters": {"RV_RUN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "R", "type_name": "CharacterType"}, "IV_FEATURE": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}}};
constructor() {
this.me = new abap.types.ABAPObject();
this.me.set(this);
this.INTERNAL_ID = abap.internalIdCounter++;
this.FRIENDS_ACCESS_INSTANCE = {
};
}
async constructor_(INPUT) {
if (super.constructor_) { await super.constructor_(INPUT); }
return this;
}
async is_enabled(INPUT) {
return zcl_abapgit_feature.is_enabled(INPUT);
}
static async is_enabled(INPUT) {
let rv_run = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
let iv_feature = new abap.types.String({qualifiedName: "STRING"});
if (INPUT && INPUT.iv_feature) {iv_feature.set(INPUT.iv_feature);}
let lv_features = new abap.types.String({qualifiedName: "STRING"});
let lt_features = 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.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_environment()).get().zif_abapgit_environment$is_merged()), abap.builtin.abap_true)) {
return rv_run;
}
lv_features.set((await (await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_settings()).get().zif_abapgit_persist_settings$read()).get().get_experimental_features()));
abap.statements.condense(lv_features, {nogaps: true});
rv_run.set(abap.builtin.boolc(abap.compare.eq(lv_features, abap.builtin.abap_true)));
if (abap.compare.initial(iv_feature) === false) {
abap.statements.split({source: lv_features, at: abap.CharacterFactory.get(1, ','), table: lt_features});
abap.statements.readTable(lt_features,{withTableKey: true,
withKey: (i) => {return abap.compare.eq(i.table_line, iv_feature);},
withKeyValue: [{key: (i) => {return i.table_line}, value: iv_feature}],
usesTableLine: true,
withKeySimple: {"table_line": iv_feature}});
rv_run.set(abap.builtin.boolc(abap.compare.eq(rv_run, abap.builtin.abap_true) || abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))));
}
return rv_run;
}
}
abap.Classes['ZCL_ABAPGIT_FEATURE'] = zcl_abapgit_feature;
export {zcl_abapgit_feature}; |