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 | 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");
// zcl_abapgit_syntax_factory.clas.abap
class zcl_abapgit_syntax_factory {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'ZCL_ABAPGIT_SYNTAX_FACTORY';
static IMPLEMENTED_INTERFACES = [];
static ATTRIBUTES = {};
static METHODS = {"CREATE": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER", RTTIName: "\\CLASS=ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER"});}, "is_optional": " ", "parm_kind": "R", "type_name": "ObjectReferenceType"}, "IV_FILENAME": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}, "IV_HIDDEN_CHARS": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}}};
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 create(INPUT) {
return zcl_abapgit_syntax_factory.create(INPUT);
}
static async create(INPUT) {
let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER", RTTIName: "\\CLASS=ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER"});
let iv_filename = INPUT?.iv_filename;
if (iv_filename?.getQualifiedName === undefined || iv_filename.getQualifiedName() !== "STRING") { iv_filename = undefined; }
if (iv_filename === undefined) { iv_filename = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_filename); }
let iv_hidden_chars = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
if (INPUT && INPUT.iv_hidden_chars) {iv_hidden_chars.set(INPUT.iv_hidden_chars);}
if (INPUT === undefined || INPUT.iv_hidden_chars === undefined) {iv_hidden_chars = abap.builtin.abap_false;}
if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(6, '*.abap'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_ABAP']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(5, '*.xml')) || abap.compare.cp(iv_filename, abap.CharacterFactory.get(6, '*.html')) || abap.compare.cp(iv_filename, abap.CharacterFactory.get(5, '*.xdp'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_XML']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(5, '*.css'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_CSS']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(4, '*.js'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_JS']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(6, '*.json')) || abap.compare.cp(iv_filename, abap.CharacterFactory.get(7, '*.jsonc'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_JSON']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(5, '*.txt')) || abap.compare.cp(iv_filename, abap.CharacterFactory.get(5, '*.ini')) || abap.compare.cp(iv_filename, abap.CharacterFactory.get(6, '*.text'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_TXT']()).constructor_());
} else if (abap.compare.cp(iv_filename, abap.CharacterFactory.get(4, '*.po'))) {
ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_SYNTAX_PO']()).constructor_());
} else {
ro_instance.clear();
}
if (abap.compare.initial(ro_instance) === false) {
await ro_instance.get().set_hidden_chars({iv_hidden_chars: iv_hidden_chars});
}
return ro_instance;
}
}
abap.Classes['ZCL_ABAPGIT_SYNTAX_FACTORY'] = zcl_abapgit_syntax_factory;
export {zcl_abapgit_syntax_factory}; |