html: refactor setting debug mode (#7005)
Some checks are pending
main-build / build-merged (push) Waiting to run
main-build / auto-tag (push) Waiting to run
main-build / auto-tag-artifact (push) Blocked by required conditions
main-build / coverage (push) Waiting to run

This commit is contained in:
Lars Hvam 2024-07-31 18:22:04 +02:00 committed by GitHub
parent 1c2b65814f
commit 5d59d6f8d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View File

@ -34,6 +34,9 @@ CLASS zcl_abapgit_html DEFINITION
iv_str TYPE string OPTIONAL
RETURNING
VALUE(rs_data_attr) TYPE zif_abapgit_html=>ty_data_attr .
CLASS-METHODS set_debug_mode
IMPORTING
iv_mode TYPE abap_bool.
PROTECTED SECTION.
PRIVATE SECTION.
@ -105,8 +108,6 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
METHOD class_constructor.
DATA lv_mode TYPE tabname.
CREATE OBJECT go_single_tags_re
EXPORTING
pattern = '<(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|LINK|META|PARAM|SOURCE|!)'
@ -116,12 +117,13 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
val = ` `
occ = c_max_indent ).
GET PARAMETER ID 'DBT' FIELD lv_mode.
gv_debug_mode = boolc( lv_mode = 'HREF' ).
ENDMETHOD.
METHOD set_debug_mode.
gv_debug_mode = iv_mode.
ENDMETHOD.
METHOD create.
CREATE OBJECT ri_instance TYPE zcl_abapgit_html.
IF iv_initial_chunk IS NOT INITIAL.

View File

@ -246,6 +246,8 @@ FORM open_gui RAISING zcx_abapgit_exception.
lv_action = zif_abapgit_definitions=>c_action-go_home.
ENDCASE.
zcl_abapgit_html=>set_debug_mode( boolc( lv_mode = 'HREF' ) ).
lcl_startup=>prepare_gui_startup( ).
zcl_abapgit_ui_factory=>get_gui( )->go_home( lv_action ).
CALL SELECTION-SCREEN 1001. " trigger screen