Enhance result view of Code Inspector/Syntax Check (#3861)

Follow-up to #3717: 
- Proper display of public, protected, and private sections
- Add CLAS prefix to be inline with other object types

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2020-09-11 05:23:33 -04:00 committed by GitHub
parent 4dce10e83c
commit 7e4ae44fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,17 +216,24 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODI_BASE IMPLEMENTATION.
( is_result-sobjname = is_result-objname AND
is_result-sobjtype = is_result-sobjtype ).
lv_obj_txt = |{ is_result-objtype } { is_result-objname }|.
ELSEIF is_result-objtype = 'CLAS'.
ELSEIF is_result-objtype = 'CLAS' OR
( is_result-objtype = 'PROG' AND NOT is_result-sobjname+30(*) IS INITIAL ).
TRY.
CASE is_result-sobjname+30(*).
WHEN seop_incextapp_definition.
lv_obj_txt = |{ is_result-objname } : Local Definitions|.
lv_obj_txt = |CLAS { is_result-objname } : Local Definitions|.
WHEN seop_incextapp_implementation.
lv_obj_txt = |{ is_result-objname } : Local Implementations|.
lv_obj_txt = |CLAS { is_result-objname } : Local Implementations|.
WHEN seop_incextapp_macros.
lv_obj_txt = |{ is_result-objname } : Macros|.
lv_obj_txt = |CLAS { is_result-objname } : Macros|.
WHEN seop_incextapp_testclasses.
lv_obj_txt = |{ is_result-objname } : Test Classes|.
lv_obj_txt = |CLAS { is_result-objname } : Test Classes|.
WHEN 'CU'.
lv_obj_txt = |CLAS { is_result-objname } : Public Section|.
WHEN 'CO'.
lv_obj_txt = |CLAS { is_result-objname } : Protected Section|.
WHEN 'CI'.
lv_obj_txt = |CLAS { is_result-objname } : Private Section|.
WHEN OTHERS.
cl_oo_classname_service=>get_method_by_include(
EXPORTING
@ -238,9 +245,9 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODI_BASE IMPLEMENTATION.
method_not_existing = 2
OTHERS = 3 ).
IF sy-subrc = 0.
lv_obj_txt = |{ ls_mtdkey-clsname }->{ ls_mtdkey-cpdname }|.
lv_obj_txt = |CLAS { ls_mtdkey-clsname }->{ ls_mtdkey-cpdname }|.
ELSE.
lv_obj_txt = is_result-sobjname.
lv_obj_txt = |{ is_result-objtype } { is_result-sobjname }|.
ENDIF.
ENDCASE.