mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
Merge branch 'main' into mbtools/multi-transport
This commit is contained in:
commit
010731a81e
|
@ -13,6 +13,19 @@ CLASS zcl_abapgit_code_inspector DEFINITION
|
|||
RAISING
|
||||
zcx_abapgit_exception .
|
||||
|
||||
CLASS-METHODS get_code_inspector
|
||||
IMPORTING
|
||||
!iv_package TYPE devclass
|
||||
RETURNING
|
||||
VALUE(ri_code_inspector) TYPE REF TO zif_abapgit_code_inspector
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
|
||||
CLASS-METHODS set_code_inspector
|
||||
IMPORTING
|
||||
!iv_package TYPE devclass
|
||||
!ii_code_inspector TYPE REF TO zif_abapgit_code_inspector.
|
||||
|
||||
PROTECTED SECTION.
|
||||
DATA mv_package TYPE devclass .
|
||||
|
||||
|
@ -35,6 +48,15 @@ CLASS zcl_abapgit_code_inspector DEFINITION
|
|||
VALUE(rv_skip) TYPE abap_bool.
|
||||
PRIVATE SECTION.
|
||||
|
||||
TYPES:
|
||||
BEGIN OF ty_code_inspector_pack,
|
||||
package TYPE devclass,
|
||||
instance TYPE REF TO zif_abapgit_code_inspector,
|
||||
END OF ty_code_inspector_pack,
|
||||
ty_code_inspector_packs TYPE HASHED TABLE OF ty_code_inspector_pack WITH UNIQUE KEY package.
|
||||
|
||||
CLASS-DATA gt_code_inspector TYPE ty_code_inspector_packs.
|
||||
|
||||
DATA mv_success TYPE abap_bool .
|
||||
DATA mv_summary TYPE string.
|
||||
|
||||
|
@ -266,6 +288,28 @@ CLASS zcl_abapgit_code_inspector IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD get_code_inspector.
|
||||
|
||||
DATA ls_code_inspector LIKE LINE OF gt_code_inspector.
|
||||
|
||||
FIELD-SYMBOLS <ls_code_inspector> TYPE ty_code_inspector_pack.
|
||||
|
||||
READ TABLE gt_code_inspector ASSIGNING <ls_code_inspector> WITH TABLE KEY package = iv_package.
|
||||
IF sy-subrc <> 0.
|
||||
ls_code_inspector-package = iv_package.
|
||||
|
||||
CREATE OBJECT ls_code_inspector-instance TYPE zcl_abapgit_code_inspector
|
||||
EXPORTING
|
||||
iv_package = iv_package.
|
||||
|
||||
INSERT ls_code_inspector INTO TABLE gt_code_inspector ASSIGNING <ls_code_inspector>.
|
||||
ENDIF.
|
||||
|
||||
ri_code_inspector = <ls_code_inspector>-instance.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD run_inspection.
|
||||
|
||||
io_inspection->run(
|
||||
|
@ -290,6 +334,24 @@ CLASS zcl_abapgit_code_inspector IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD set_code_inspector.
|
||||
|
||||
DATA ls_code_inspector LIKE LINE OF gt_code_inspector.
|
||||
|
||||
FIELD-SYMBOLS <ls_code_inspector> LIKE LINE OF gt_code_inspector.
|
||||
|
||||
READ TABLE gt_code_inspector ASSIGNING <ls_code_inspector> WITH TABLE KEY package = iv_package.
|
||||
IF sy-subrc <> 0.
|
||||
ls_code_inspector-package = iv_package.
|
||||
|
||||
INSERT ls_code_inspector INTO TABLE gt_code_inspector ASSIGNING <ls_code_inspector>.
|
||||
ENDIF.
|
||||
|
||||
<ls_code_inspector>-instance = ii_code_inspector.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD skip_object.
|
||||
|
||||
DATA ls_program_type TYPE subc.
|
||||
|
|
|
@ -273,7 +273,7 @@ CLASS zcl_abapgit_repo_online IMPLEMENTATION.
|
|||
ENDIF.
|
||||
|
||||
IF ms_data-local_settings-block_commit = abap_true
|
||||
AND zcl_abapgit_factory=>get_code_inspector( get_package( )
|
||||
AND zcl_abapgit_code_inspector=>get_code_inspector( get_package( )
|
||||
)->is_successful( ) = abap_false.
|
||||
zcx_abapgit_exception=>raise( |A successful code inspection is required| ).
|
||||
ENDIF.
|
||||
|
|
|
@ -4,6 +4,7 @@ CLASS zcl_abapgit_gui_buttons DEFINITION
|
|||
CREATE PUBLIC.
|
||||
|
||||
PUBLIC SECTION.
|
||||
|
||||
CLASS-METHODS new_online
|
||||
RETURNING VALUE(rv_html_string) TYPE string.
|
||||
|
||||
|
@ -28,6 +29,9 @@ CLASS zcl_abapgit_gui_buttons DEFINITION
|
|||
CLASS-METHODS experimental
|
||||
RETURNING VALUE(rv_html_string) TYPE string.
|
||||
|
||||
CLASS-METHODS refresh
|
||||
RETURNING VALUE(rv_html_string) TYPE string.
|
||||
|
||||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
ENDCLASS.
|
||||
|
@ -51,6 +55,11 @@ CLASS zcl_abapgit_gui_buttons IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD flow.
|
||||
rv_html_string = zcl_abapgit_html=>icon( 'flow' ) && ' Flow'.
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD help.
|
||||
rv_html_string = zcl_abapgit_html=>icon(
|
||||
iv_name = 'question-circle-solid'
|
||||
|
@ -68,8 +77,10 @@ CLASS zcl_abapgit_gui_buttons IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD flow.
|
||||
rv_html_string = zcl_abapgit_html=>icon( 'flow' ) && ' Flow'.
|
||||
METHOD refresh.
|
||||
rv_html_string = zcl_abapgit_html=>icon(
|
||||
iv_name = 'redo-alt-solid'
|
||||
iv_hint = 'Refresh' ).
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_gui_page_code_insp IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD ask_user_for_check_variant.
|
||||
|
@ -151,7 +151,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
|
|||
|
||||
DATA li_code_inspector TYPE REF TO zif_abapgit_code_inspector.
|
||||
|
||||
li_code_inspector = zcl_abapgit_factory=>get_code_inspector( mo_repo->get_package( ) ).
|
||||
li_code_inspector = zcl_abapgit_code_inspector=>get_code_inspector( mo_repo->get_package( ) ).
|
||||
|
||||
mt_result = li_code_inspector->run(
|
||||
iv_variant = |{ mv_check_variant }|
|
||||
|
|
|
@ -41,7 +41,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_GUI_PAGE_SYNTAX IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_gui_page_syntax IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD constructor.
|
||||
|
@ -68,7 +68,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_SYNTAX IMPLEMENTATION.
|
|||
|
||||
DATA: li_syntax_check TYPE REF TO zif_abapgit_code_inspector.
|
||||
|
||||
li_syntax_check = zcl_abapgit_factory=>get_code_inspector( mo_repo->get_package( ) ).
|
||||
li_syntax_check = zcl_abapgit_code_inspector=>get_code_inspector( mo_repo->get_package( ) ).
|
||||
|
||||
TRY.
|
||||
mt_result = li_syntax_check->run( c_variant ).
|
||||
|
|
|
@ -104,7 +104,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_GUI_PAGE_SETT_LOCL IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_gui_page_sett_locl IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD choose_check_variant.
|
||||
|
@ -471,7 +471,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_SETT_LOCL IMPLEMENTATION.
|
|||
lv_check_variant = to_upper( io_form_data->get( c_id-code_inspector_check_variant ) ).
|
||||
IF lv_check_variant IS NOT INITIAL.
|
||||
TRY.
|
||||
zcl_abapgit_factory=>get_code_inspector( mo_repo->get_package( )
|
||||
zcl_abapgit_code_inspector=>get_code_inspector( mo_repo->get_package( )
|
||||
)->validate_check_variant( lv_check_variant ).
|
||||
CATCH zcx_abapgit_exception INTO lx_error.
|
||||
ro_validation_log->set(
|
||||
|
|
|
@ -56,6 +56,7 @@ CLASS zcl_abapgit_gui_page_repo_over DEFINITION
|
|||
select TYPE string VALUE 'select',
|
||||
apply_filter TYPE string VALUE 'apply_filter',
|
||||
label_filter TYPE string VALUE 'label_filter',
|
||||
refresh_list TYPE string VALUE 'refresh_list',
|
||||
END OF c_action,
|
||||
c_label_filter_prefix TYPE string VALUE `label:`,
|
||||
c_raw_field_suffix TYPE string VALUE `_RAW` ##NO_TEXT.
|
||||
|
@ -932,6 +933,11 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
save_settings( ).
|
||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
|
||||
|
||||
WHEN c_action-refresh_list.
|
||||
|
||||
zcl_abapgit_repo_srv=>get_instance( )->init( ).
|
||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
|
||||
|
||||
ENDCASE.
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -983,6 +989,11 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
ls_hotkey_action-hotkey = |a|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-description = |Refresh|.
|
||||
ls_hotkey_action-action = c_action-refresh_list.
|
||||
ls_hotkey_action-hotkey = |r|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
" registered/handled in js
|
||||
ls_hotkey_action-description = |Previous Repository|.
|
||||
ls_hotkey_action-action = `#`.
|
||||
|
@ -1024,6 +1035,9 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
)->add(
|
||||
iv_txt = zcl_abapgit_gui_buttons=>settings( )
|
||||
iv_act = zif_abapgit_definitions=>c_action-go_settings
|
||||
)->add(
|
||||
iv_txt = zcl_abapgit_gui_buttons=>refresh( )
|
||||
iv_act = c_action-refresh_list
|
||||
)->add(
|
||||
iv_txt = zcl_abapgit_gui_buttons=>advanced( )
|
||||
io_sub = zcl_abapgit_gui_menus=>advanced( )
|
||||
|
|
|
@ -34,7 +34,7 @@ CLASS zcl_abapgit_popup_code_insp IMPLEMENTATION.
|
|||
|
||||
METHOD fetch_list.
|
||||
|
||||
rt_list = zcl_abapgit_factory=>get_code_inspector( '$TMP' )->list_global_variants( ).
|
||||
rt_list = zcl_abapgit_code_inspector=>get_code_inspector( '$TMP' )->list_global_variants( ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
|
|
@ -13,13 +13,6 @@ CLASS zcl_abapgit_factory DEFINITION
|
|||
!iv_package TYPE devclass
|
||||
RETURNING
|
||||
VALUE(ri_sap_package) TYPE REF TO zif_abapgit_sap_package .
|
||||
CLASS-METHODS get_code_inspector
|
||||
IMPORTING
|
||||
!iv_package TYPE devclass
|
||||
RETURNING
|
||||
VALUE(ri_code_inspector) TYPE REF TO zif_abapgit_code_inspector
|
||||
RAISING
|
||||
zcx_abapgit_exception .
|
||||
CLASS-METHODS get_cts_api
|
||||
RETURNING
|
||||
VALUE(ri_cts_api) TYPE REF TO zif_abapgit_cts_api .
|
||||
|
@ -60,18 +53,9 @@ CLASS zcl_abapgit_factory DEFINITION
|
|||
TYPES:
|
||||
ty_sap_packages TYPE HASHED TABLE OF ty_sap_package
|
||||
WITH UNIQUE KEY package .
|
||||
TYPES:
|
||||
BEGIN OF ty_code_inspector_pack,
|
||||
package TYPE devclass,
|
||||
instance TYPE REF TO zif_abapgit_code_inspector,
|
||||
END OF ty_code_inspector_pack .
|
||||
TYPES:
|
||||
ty_code_inspector_packs TYPE HASHED TABLE OF ty_code_inspector_pack
|
||||
WITH UNIQUE KEY package .
|
||||
|
||||
CLASS-DATA gi_tadir TYPE REF TO zif_abapgit_tadir .
|
||||
CLASS-DATA gt_sap_package TYPE ty_sap_packages .
|
||||
CLASS-DATA gt_code_inspector TYPE ty_code_inspector_packs .
|
||||
CLASS-DATA gi_cts_api TYPE REF TO zif_abapgit_cts_api .
|
||||
CLASS-DATA gi_environment TYPE REF TO zif_abapgit_environment .
|
||||
CLASS-DATA gi_longtext TYPE REF TO zif_abapgit_longtexts .
|
||||
|
@ -88,31 +72,6 @@ ENDCLASS.
|
|||
CLASS zcl_abapgit_factory IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD get_code_inspector.
|
||||
|
||||
DATA: ls_code_inspector LIKE LINE OF gt_code_inspector.
|
||||
FIELD-SYMBOLS: <ls_code_inspector> TYPE ty_code_inspector_pack.
|
||||
|
||||
READ TABLE gt_code_inspector ASSIGNING <ls_code_inspector>
|
||||
WITH TABLE KEY package = iv_package.
|
||||
IF sy-subrc <> 0.
|
||||
ls_code_inspector-package = iv_package.
|
||||
|
||||
CREATE OBJECT ls_code_inspector-instance TYPE zcl_abapgit_code_inspector
|
||||
EXPORTING
|
||||
iv_package = iv_package.
|
||||
|
||||
INSERT ls_code_inspector
|
||||
INTO TABLE gt_code_inspector
|
||||
ASSIGNING <ls_code_inspector>.
|
||||
|
||||
ENDIF.
|
||||
|
||||
ri_code_inspector = <ls_code_inspector>-instance.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD get_cts_api.
|
||||
IF gi_cts_api IS NOT BOUND.
|
||||
CREATE OBJECT gi_cts_api TYPE zcl_abapgit_cts_api.
|
||||
|
|
|
@ -12,10 +12,6 @@ CLASS zcl_abapgit_injector DEFINITION
|
|||
IMPORTING
|
||||
!iv_package TYPE devclass
|
||||
!ii_sap_package TYPE REF TO zif_abapgit_sap_package .
|
||||
CLASS-METHODS set_code_inspector
|
||||
IMPORTING
|
||||
!iv_package TYPE devclass
|
||||
!ii_code_inspector TYPE REF TO zif_abapgit_code_inspector .
|
||||
CLASS-METHODS set_cts_api
|
||||
IMPORTING
|
||||
!ii_cts_api TYPE REF TO zif_abapgit_cts_api .
|
||||
|
@ -52,29 +48,6 @@ ENDCLASS.
|
|||
CLASS zcl_abapgit_injector IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD set_code_inspector.
|
||||
|
||||
DATA: ls_code_inspector LIKE LINE OF zcl_abapgit_factory=>gt_code_inspector.
|
||||
FIELD-SYMBOLS: <ls_code_inspector> LIKE LINE OF zcl_abapgit_factory=>gt_code_inspector.
|
||||
|
||||
READ TABLE zcl_abapgit_factory=>gt_code_inspector
|
||||
ASSIGNING <ls_code_inspector>
|
||||
WITH TABLE KEY package = iv_package.
|
||||
IF sy-subrc <> 0.
|
||||
|
||||
ls_code_inspector-package = iv_package.
|
||||
|
||||
INSERT ls_code_inspector
|
||||
INTO TABLE zcl_abapgit_factory=>gt_code_inspector
|
||||
ASSIGNING <ls_code_inspector>.
|
||||
|
||||
ENDIF.
|
||||
|
||||
<ls_code_inspector>-instance = ii_code_inspector.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD set_cts_api.
|
||||
zcl_abapgit_factory=>gi_cts_api = ii_cts_api.
|
||||
ENDMETHOD.
|
||||
|
|
Loading…
Reference in New Issue
Block a user