All files / output zcl_abapgit_gui_utils.clas.mjs

73.01% Statements 46/63
60% Branches 6/10
27.27% Functions 3/11
73.01% Lines 46/63

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 631x 1x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x     1x 2x 2x 2x 2x 2x 2x 1x 1x 1x 1x 1x     1x 2x 2x 1x     1x 2x 2x 2x 2x 2x 2x 1x 1x 1x 1x 1x     1x 2x 2x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_gui_utils.clas.abap
class zcl_abapgit_gui_utils {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_UTILS';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"IS_RENDERABLE": {"visibility": "U", "parameters": {"RV_YES": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IO_OBJ": {"type": () => {return new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined});}, "is_optional": " "}}},
  "IS_EVENT_HANDLER": {"visibility": "U", "parameters": {"RV_YES": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IO_OBJ": {"type": () => {return new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined});}, "is_optional": " "}}}};
  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_event_handler(INPUT) {
    return zcl_abapgit_gui_utils.is_event_handler(INPUT);
  }
  static async is_event_handler(INPUT) {
    let rv_yes = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let io_obj = INPUT?.io_obj;
    if (io_obj === undefined) { io_obj = new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined}).set(INPUT.io_obj); }
    let li_event_handler = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT_HANDLER"});
    try {
      await abap.statements.cast(li_event_handler, io_obj);
      rv_yes.set(abap.builtin.abap_true);
    } catch (e) {
      if ((abap.Classes['CX_SY_MOVE_CAST_ERROR'] && e instanceof abap.Classes['CX_SY_MOVE_CAST_ERROR'])) {
        rv_yes.set(abap.builtin.abap_false);
      } else {
        throw e;
      }
    }
    return rv_yes;
  }
  async is_renderable(INPUT) {
    return zcl_abapgit_gui_utils.is_renderable(INPUT);
  }
  static async is_renderable(INPUT) {
    let rv_yes = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let io_obj = INPUT?.io_obj;
    if (io_obj === undefined) { io_obj = new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined}).set(INPUT.io_obj); }
    let li_renderable = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});
    try {
      await abap.statements.cast(li_renderable, io_obj);
      rv_yes.set(abap.builtin.abap_true);
    } catch (e) {
      if ((abap.Classes['CX_SY_MOVE_CAST_ERROR'] && e instanceof abap.Classes['CX_SY_MOVE_CAST_ERROR'])) {
        rv_yes.set(abap.builtin.abap_false);
      } else {
        throw e;
      }
    }
    return rv_yes;
  }
}
abap.Classes['ZCL_ABAPGIT_GUI_UTILS'] = zcl_abapgit_gui_utils;
export {zcl_abapgit_gui_utils};