mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Merge branch 'main' into mbtools/exit-support-obj-type
This commit is contained in:
commit
743511437c
|
@ -1,14 +1,15 @@
|
||||||
CLASS zcl_abapgit_html DEFINITION
|
CLASS zcl_abapgit_html DEFINITION
|
||||||
PUBLIC
|
PUBLIC
|
||||||
CREATE PUBLIC .
|
CREATE PUBLIC.
|
||||||
|
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
|
|
||||||
INTERFACES zif_abapgit_html .
|
INTERFACES zif_abapgit_html.
|
||||||
|
|
||||||
CONSTANTS c_indent_size TYPE i VALUE 2 ##NO_TEXT.
|
CONSTANTS c_indent_size TYPE i VALUE 2 ##NO_TEXT.
|
||||||
|
|
||||||
CLASS-METHODS class_constructor .
|
CLASS-METHODS class_constructor.
|
||||||
|
|
||||||
CLASS-METHODS create
|
CLASS-METHODS create
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_initial_chunk TYPE any OPTIONAL
|
!iv_initial_chunk TYPE any OPTIONAL
|
||||||
|
@ -22,21 +23,25 @@ CLASS zcl_abapgit_html DEFINITION
|
||||||
!iv_class TYPE string OPTIONAL
|
!iv_class TYPE string OPTIONAL
|
||||||
!iv_onclick TYPE string OPTIONAL
|
!iv_onclick TYPE string OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_str) TYPE string .
|
VALUE(rv_str) TYPE string.
|
||||||
|
|
||||||
CLASS-METHODS checkbox
|
CLASS-METHODS checkbox
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_id TYPE string OPTIONAL
|
iv_id TYPE string OPTIONAL
|
||||||
iv_checked TYPE abap_bool OPTIONAL
|
iv_checked TYPE abap_bool OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_html) TYPE string .
|
VALUE(rv_html) TYPE string.
|
||||||
|
|
||||||
CLASS-METHODS parse_data_attr
|
CLASS-METHODS parse_data_attr
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_str TYPE string OPTIONAL
|
iv_str TYPE string OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rs_data_attr) TYPE zif_abapgit_html=>ty_data_attr .
|
VALUE(rs_data_attr) TYPE zif_abapgit_html=>ty_data_attr.
|
||||||
|
|
||||||
CLASS-METHODS set_debug_mode
|
CLASS-METHODS set_debug_mode
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_mode TYPE abap_bool.
|
iv_mode TYPE abap_bool.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
|
@ -51,7 +56,8 @@ CLASS zcl_abapgit_html DEFINITION
|
||||||
within_pre TYPE abap_bool,
|
within_pre TYPE abap_bool,
|
||||||
indent TYPE i,
|
indent TYPE i,
|
||||||
indent_str TYPE string,
|
indent_str TYPE string,
|
||||||
END OF ty_indent_context .
|
END OF ty_indent_context.
|
||||||
|
|
||||||
TYPES:
|
TYPES:
|
||||||
BEGIN OF ty_study_result,
|
BEGIN OF ty_study_result,
|
||||||
style_open TYPE abap_bool,
|
style_open TYPE abap_bool,
|
||||||
|
@ -67,23 +73,25 @@ CLASS zcl_abapgit_html DEFINITION
|
||||||
openings TYPE i,
|
openings TYPE i,
|
||||||
closings TYPE i,
|
closings TYPE i,
|
||||||
singles TYPE i,
|
singles TYPE i,
|
||||||
END OF ty_study_result .
|
END OF ty_study_result.
|
||||||
|
|
||||||
CLASS-DATA go_single_tags_re TYPE REF TO cl_abap_regex .
|
CLASS-DATA go_single_tags_re TYPE REF TO cl_abap_regex.
|
||||||
DATA mt_buffer TYPE string_table .
|
CLASS-DATA gv_spaces TYPE string.
|
||||||
CLASS-DATA gv_spaces TYPE string .
|
CLASS-DATA gv_debug_mode TYPE abap_bool.
|
||||||
CLASS-DATA gv_debug_mode TYPE abap_bool .
|
DATA mt_buffer TYPE string_table.
|
||||||
|
|
||||||
METHODS indent_line
|
METHODS indent_line
|
||||||
CHANGING
|
CHANGING
|
||||||
!cs_context TYPE ty_indent_context
|
!cs_context TYPE ty_indent_context
|
||||||
!cv_line TYPE string .
|
!cv_line TYPE string.
|
||||||
|
|
||||||
METHODS study_line
|
METHODS study_line
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_line TYPE string
|
!iv_line TYPE string
|
||||||
!is_context TYPE ty_indent_context
|
!is_context TYPE ty_indent_context
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rs_result) TYPE ty_study_result .
|
VALUE(rs_result) TYPE ty_study_result.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -495,6 +503,7 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_html~div.
|
METHOD zif_abapgit_html~div.
|
||||||
|
|
||||||
zif_abapgit_html~wrap(
|
zif_abapgit_html~wrap(
|
||||||
iv_tag = 'div'
|
iv_tag = 'div'
|
||||||
iv_content = iv_content
|
iv_content = iv_content
|
||||||
|
@ -502,8 +511,11 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
is_data_attr = is_data_attr
|
is_data_attr = is_data_attr
|
||||||
it_data_attrs = it_data_attrs
|
it_data_attrs = it_data_attrs
|
||||||
iv_id = iv_id
|
iv_id = iv_id
|
||||||
|
iv_style = iv_style
|
||||||
iv_class = iv_class ).
|
iv_class = iv_class ).
|
||||||
|
|
||||||
ri_self = me.
|
ri_self = me.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -554,6 +566,7 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_html~td.
|
METHOD zif_abapgit_html~td.
|
||||||
|
|
||||||
zif_abapgit_html~wrap(
|
zif_abapgit_html~wrap(
|
||||||
iv_format_single_line = iv_format_single_line
|
iv_format_single_line = iv_format_single_line
|
||||||
iv_tag = 'td'
|
iv_tag = 'td'
|
||||||
|
@ -561,14 +574,18 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
ii_content = ii_content
|
ii_content = ii_content
|
||||||
iv_id = iv_id
|
iv_id = iv_id
|
||||||
iv_class = iv_class
|
iv_class = iv_class
|
||||||
|
iv_style = iv_style
|
||||||
is_data_attr = is_data_attr
|
is_data_attr = is_data_attr
|
||||||
it_data_attrs = it_data_attrs
|
it_data_attrs = it_data_attrs
|
||||||
iv_hint = iv_hint ).
|
iv_hint = iv_hint ).
|
||||||
|
|
||||||
ri_self = me.
|
ri_self = me.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_html~th.
|
METHOD zif_abapgit_html~th.
|
||||||
|
|
||||||
zif_abapgit_html~wrap(
|
zif_abapgit_html~wrap(
|
||||||
iv_format_single_line = iv_format_single_line
|
iv_format_single_line = iv_format_single_line
|
||||||
iv_tag = 'th'
|
iv_tag = 'th'
|
||||||
|
@ -576,10 +593,13 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
ii_content = ii_content
|
ii_content = ii_content
|
||||||
iv_id = iv_id
|
iv_id = iv_id
|
||||||
iv_class = iv_class
|
iv_class = iv_class
|
||||||
|
iv_style = iv_style
|
||||||
is_data_attr = is_data_attr
|
is_data_attr = is_data_attr
|
||||||
it_data_attrs = it_data_attrs
|
it_data_attrs = it_data_attrs
|
||||||
iv_hint = iv_hint ).
|
iv_hint = iv_hint ).
|
||||||
|
|
||||||
ri_self = me.
|
ri_self = me.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -590,6 +610,7 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
DATA ls_data_attr LIKE LINE OF it_data_attrs.
|
DATA ls_data_attr LIKE LINE OF it_data_attrs.
|
||||||
|
|
||||||
DATA: lv_class TYPE string,
|
DATA: lv_class TYPE string,
|
||||||
|
lv_style TYPE string,
|
||||||
lv_id TYPE string,
|
lv_id TYPE string,
|
||||||
lv_data_attr TYPE string,
|
lv_data_attr TYPE string,
|
||||||
lv_title TYPE string.
|
lv_title TYPE string.
|
||||||
|
@ -602,6 +623,10 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
lv_class = | class="{ iv_class }"|.
|
lv_class = | class="{ iv_class }"|.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
IF iv_style IS NOT INITIAL.
|
||||||
|
lv_style = | style="{ iv_style }"|.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
IF iv_hint IS NOT INITIAL.
|
IF iv_hint IS NOT INITIAL.
|
||||||
lv_title = | title="{ iv_hint }"|.
|
lv_title = | title="{ iv_hint }"|.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -614,7 +639,7 @@ CLASS zcl_abapgit_html IMPLEMENTATION.
|
||||||
lv_data_attr = lv_data_attr && | data-{ ls_data_attr-name }="{ ls_data_attr-value }"|.
|
lv_data_attr = lv_data_attr && | data-{ ls_data_attr-name }="{ ls_data_attr-value }"|.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
lv_open_tag = |<{ iv_tag }{ lv_id }{ lv_class }{ lv_data_attr }{ lv_title }>|.
|
lv_open_tag = |<{ iv_tag }{ lv_id }{ lv_class }{ lv_style }{ lv_data_attr }{ lv_title }>|.
|
||||||
lv_close_tag = |</{ iv_tag }>|.
|
lv_close_tag = |</{ iv_tag }>|.
|
||||||
|
|
||||||
IF ii_content IS NOT BOUND AND iv_content IS INITIAL.
|
IF ii_content IS NOT BOUND AND iv_content IS INITIAL.
|
||||||
|
|
|
@ -111,6 +111,7 @@ INTERFACE zif_abapgit_html PUBLIC.
|
||||||
!iv_id TYPE string OPTIONAL
|
!iv_id TYPE string OPTIONAL
|
||||||
!iv_class TYPE string OPTIONAL
|
!iv_class TYPE string OPTIONAL
|
||||||
!iv_hint TYPE string OPTIONAL
|
!iv_hint TYPE string OPTIONAL
|
||||||
|
!iv_style TYPE string OPTIONAL
|
||||||
!iv_format_single_line TYPE abap_bool DEFAULT abap_false
|
!iv_format_single_line TYPE abap_bool DEFAULT abap_false
|
||||||
!is_data_attr TYPE ty_data_attr OPTIONAL
|
!is_data_attr TYPE ty_data_attr OPTIONAL
|
||||||
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
||||||
|
@ -124,6 +125,7 @@ INTERFACE zif_abapgit_html PUBLIC.
|
||||||
!iv_id TYPE string OPTIONAL
|
!iv_id TYPE string OPTIONAL
|
||||||
!iv_class TYPE string OPTIONAL
|
!iv_class TYPE string OPTIONAL
|
||||||
!iv_hint TYPE string OPTIONAL
|
!iv_hint TYPE string OPTIONAL
|
||||||
|
!iv_style TYPE string OPTIONAL
|
||||||
!iv_format_single_line TYPE abap_bool DEFAULT abap_true
|
!iv_format_single_line TYPE abap_bool DEFAULT abap_true
|
||||||
!is_data_attr TYPE ty_data_attr OPTIONAL
|
!is_data_attr TYPE ty_data_attr OPTIONAL
|
||||||
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
||||||
|
@ -138,6 +140,7 @@ INTERFACE zif_abapgit_html PUBLIC.
|
||||||
!iv_id TYPE string OPTIONAL
|
!iv_id TYPE string OPTIONAL
|
||||||
!iv_class TYPE string OPTIONAL
|
!iv_class TYPE string OPTIONAL
|
||||||
!iv_hint TYPE string OPTIONAL
|
!iv_hint TYPE string OPTIONAL
|
||||||
|
!iv_style TYPE string OPTIONAL
|
||||||
!iv_format_single_line TYPE abap_bool DEFAULT abap_true
|
!iv_format_single_line TYPE abap_bool DEFAULT abap_true
|
||||||
!is_data_attr TYPE ty_data_attr OPTIONAL
|
!is_data_attr TYPE ty_data_attr OPTIONAL
|
||||||
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
||||||
|
@ -151,6 +154,7 @@ INTERFACE zif_abapgit_html PUBLIC.
|
||||||
!ii_content TYPE REF TO zif_abapgit_html OPTIONAL
|
!ii_content TYPE REF TO zif_abapgit_html OPTIONAL
|
||||||
!iv_id TYPE string OPTIONAL
|
!iv_id TYPE string OPTIONAL
|
||||||
!iv_class TYPE string OPTIONAL
|
!iv_class TYPE string OPTIONAL
|
||||||
|
!iv_style TYPE string OPTIONAL
|
||||||
!is_data_attr TYPE ty_data_attr OPTIONAL
|
!is_data_attr TYPE ty_data_attr OPTIONAL
|
||||||
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
!it_data_attrs TYPE ty_data_attrs OPTIONAL
|
||||||
PREFERRED PARAMETER iv_content
|
PREFERRED PARAMETER iv_content
|
||||||
|
|
|
@ -62,6 +62,10 @@ CLASS zcl_abapgit_gui_page_debuginfo DEFINITION
|
||||||
!iv_obj_name TYPE csequence
|
!iv_obj_name TYPE csequence
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_html) TYPE string .
|
VALUE(rv_html) TYPE string .
|
||||||
|
METHODS resolve_exit_include
|
||||||
|
CHANGING
|
||||||
|
!cv_clsname TYPE seoclsname
|
||||||
|
!ct_source TYPE string_table.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -187,10 +191,16 @@ CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.
|
||||||
" Standalone version
|
" Standalone version
|
||||||
lt_source = zcl_abapgit_factory=>get_sap_report( )->read_report( c_exit_standalone ).
|
lt_source = zcl_abapgit_factory=>get_sap_report( )->read_report( c_exit_standalone ).
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
|
resolve_exit_include(
|
||||||
|
CHANGING
|
||||||
|
cv_clsname = ls_class_key-clsname
|
||||||
|
ct_source = lt_source ).
|
||||||
ri_html->add( |<div>User exits are active (include { get_jump_object(
|
ri_html->add( |<div>User exits are active (include { get_jump_object(
|
||||||
iv_obj_type = 'PROG'
|
iv_obj_type = 'PROG'
|
||||||
iv_obj_name = c_exit_standalone ) } found)</div><br>| ).
|
iv_obj_name = c_exit_standalone ) } found)</div><br>| ).
|
||||||
ri_html->add( render_exit_info_methods( lt_source ) ).
|
ri_html->add( render_exit_info_methods(
|
||||||
|
it_source = lt_source
|
||||||
|
iv_clsname = to_upper( ls_class_key-clsname ) ) ).
|
||||||
ELSE.
|
ELSE.
|
||||||
ri_html->add( |<div>No user exits implemented (include { c_exit_standalone } not found)</div><br>| ).
|
ri_html->add( |<div>No user exits implemented (include { c_exit_standalone } not found)</div><br>| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -410,6 +420,32 @@ CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD resolve_exit_include.
|
||||||
|
|
||||||
|
DATA lv_include TYPE progname.
|
||||||
|
|
||||||
|
cv_clsname = c_exit_class.
|
||||||
|
|
||||||
|
DO.
|
||||||
|
FIND REGEX 'CLASS\s+(.*)\s+DEFINITION' IN TABLE ct_source SUBMATCHES cv_clsname IGNORING CASE.
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
RETURN.
|
||||||
|
ENDIF.
|
||||||
|
FIND REGEX 'INCLUDE\s+(.*)\s*\.' IN TABLE ct_source SUBMATCHES lv_include IGNORING CASE.
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
TRY.
|
||||||
|
ct_source = zcl_abapgit_factory=>get_sap_report( )->read_report( lv_include ).
|
||||||
|
CATCH zcx_abapgit_exception.
|
||||||
|
RETURN. " rely on original include
|
||||||
|
ENDTRY.
|
||||||
|
ELSE.
|
||||||
|
RETURN.
|
||||||
|
ENDIF.
|
||||||
|
ENDDO.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_gui_event_handler~on_event.
|
METHOD zif_abapgit_gui_event_handler~on_event.
|
||||||
|
|
||||||
DATA:
|
DATA:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user