All files / output cl_ctmenu.clas.mjs

31.94% Statements 23/72
100% Branches 2/2
5% Functions 1/20
31.94% Lines 23/72

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 721x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                       1x       1x                           1x     1x     1x                           1x           1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_ctmenu.clas.abap
class cl_ctmenu {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_CTMENU';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"HIDE_FUNCTIONS": {"visibility": "U", "parameters": {"FCODES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(70, {"qualifiedName":"UI_FUNC","ddicName":"UI_FUNC","description":"UI_FUNC"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "UI_FUNCTIONS");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}}},
  "ADD_FUNCTION": {"visibility": "U", "parameters": {"FCODE": {"type": () => {return new abap.types.Character(70, {"qualifiedName":"UI_FUNC","ddicName":"UI_FUNC","description":"UI_FUNC"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "TEXT": {"type": () => {return new abap.types.Character(40, {"qualifiedName":"GUI_TEXT","ddicName":"GUI_TEXT","description":"GUI_TEXT"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "CHECKED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "ACCELERATOR": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CGenericType"}, "DISABLED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}},
  "ADD_SEPARATOR": {"visibility": "U", "parameters": {}},
  "CLEAR": {"visibility": "U", "parameters": {}},
  "ADD_SUBMENU": {"visibility": "U", "parameters": {"MENU": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_CTMENU", RTTIName: "\\CLASS=CL_CTMENU"});}, "is_optional": " ", "parm_kind": "I", "type_name": "ObjectReferenceType"}, "TEXT": {"type": () => {return new abap.types.Character(40, {"qualifiedName":"GUI_TEXT","ddicName":"GUI_TEXT","description":"GUI_TEXT"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "ICON": {"type": () => {return new abap.types.Character(4, {"qualifiedName":"ICON_D","ddicName":"ICON_D","description":"ICON_D"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "DISABLED": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "HIDDEN": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "ACCELERATOR": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "hide_functions": this.hide_functions.bind(this),
      "add_function": this.add_function.bind(this),
      "add_separator": this.add_separator.bind(this),
      "clear": this.clear.bind(this),
      "add_submenu": this.add_submenu.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async add_submenu(INPUT) {
    let menu = INPUT?.menu;
    if (menu?.getQualifiedName === undefined || menu.getQualifiedName() !== "CL_CTMENU") { menu = undefined; }
    if (menu === undefined) { menu = new abap.types.ABAPObject({qualifiedName: "CL_CTMENU", RTTIName: "\\CLASS=CL_CTMENU"}).set(INPUT.menu); }
    let text = INPUT?.text;
    if (text?.getQualifiedName === undefined || text.getQualifiedName() !== "GUI_TEXT") { text = undefined; }
    if (text === undefined) { text = new abap.types.Character(40, {"qualifiedName":"GUI_TEXT","ddicName":"GUI_TEXT","description":"GUI_TEXT"}).set(INPUT.text); }
    let icon = new abap.types.Character(4, {"qualifiedName":"ICON_D","ddicName":"ICON_D","description":"ICON_D"});
    if (INPUT && INPUT.icon) {icon.set(INPUT.icon);}
    let disabled = INPUT?.disabled || new abap.types.Character(4);
    let hidden = INPUT?.hidden || new abap.types.Character(4);
    let accelerator = INPUT?.accelerator || new abap.types.Character(4);
    return;
  }
  async clear() {
    return;
  }
  async add_separator() {
    return;
  }
  async add_function(INPUT) {
    let fcode = INPUT?.fcode;
    if (fcode?.getQualifiedName === undefined || fcode.getQualifiedName() !== "UI_FUNC") { fcode = undefined; }
    if (fcode === undefined) { fcode = new abap.types.Character(70, {"qualifiedName":"UI_FUNC","ddicName":"UI_FUNC","description":"UI_FUNC"}).set(INPUT.fcode); }
    let text = INPUT?.text;
    if (text?.getQualifiedName === undefined || text.getQualifiedName() !== "GUI_TEXT") { text = undefined; }
    if (text === undefined) { text = new abap.types.Character(40, {"qualifiedName":"GUI_TEXT","ddicName":"GUI_TEXT","description":"GUI_TEXT"}).set(INPUT.text); }
    let checked = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.checked) {checked.set(INPUT.checked);}
    let accelerator = INPUT?.accelerator || new abap.types.Character();
    let disabled = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.disabled) {disabled.set(INPUT.disabled);}
    return;
  }
  async hide_functions(INPUT) {
    let fcodes = INPUT?.fcodes;
    if (fcodes?.getQualifiedName === undefined || fcodes.getQualifiedName() !== "UI_FUNCTIONS") { fcodes = undefined; }
    if (fcodes === undefined) { fcodes = abap.types.TableFactory.construct(new abap.types.Character(70, {"qualifiedName":"UI_FUNC","ddicName":"UI_FUNC","description":"UI_FUNC"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "UI_FUNCTIONS").set(INPUT.fcodes); }
    return;
  }
}
abap.Classes['CL_CTMENU'] = cl_ctmenu;
export {cl_ctmenu};