mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
Repo view: Show icon for different original language (#6297)
This commit is contained in:
parent
9c38d5f07d
commit
9d4f2b4675
|
@ -28,6 +28,7 @@ FUNCTION z_abapgit_serialize_parallel.
|
||||||
ls_item-obj_name = iv_obj_name.
|
ls_item-obj_name = iv_obj_name.
|
||||||
ls_item-devclass = iv_devclass.
|
ls_item-devclass = iv_devclass.
|
||||||
ls_item-srcsystem = iv_srcsystem.
|
ls_item-srcsystem = iv_srcsystem.
|
||||||
|
ls_item-origlang = iv_language.
|
||||||
|
|
||||||
ls_files = zcl_abapgit_objects=>serialize(
|
ls_files = zcl_abapgit_objects=>serialize(
|
||||||
is_item = ls_item
|
is_item = ls_item
|
||||||
|
|
|
@ -608,6 +608,7 @@ CLASS zcl_abapgit_serialize IMPLEMENTATION.
|
||||||
ls_file_item-item-obj_name = is_tadir-obj_name.
|
ls_file_item-item-obj_name = is_tadir-obj_name.
|
||||||
ls_file_item-item-devclass = is_tadir-devclass.
|
ls_file_item-item-devclass = is_tadir-devclass.
|
||||||
ls_file_item-item-srcsystem = is_tadir-srcsystem.
|
ls_file_item-item-srcsystem = is_tadir-srcsystem.
|
||||||
|
ls_file_item-item-origlang = is_tadir-masterlang.
|
||||||
|
|
||||||
TRY.
|
TRY.
|
||||||
ls_file_item = zcl_abapgit_objects=>serialize(
|
ls_file_item = zcl_abapgit_objects=>serialize(
|
||||||
|
|
|
@ -96,6 +96,7 @@ CLASS ltcl_serialize IMPLEMENTATION.
|
||||||
<ls_tadir>-obj_name = 'RSABAPPROGRAM'.
|
<ls_tadir>-obj_name = 'RSABAPPROGRAM'.
|
||||||
<ls_tadir>-devclass = 'PACKAGE'.
|
<ls_tadir>-devclass = 'PACKAGE'.
|
||||||
<ls_tadir>-path = 'foobar'.
|
<ls_tadir>-path = 'foobar'.
|
||||||
|
<ls_tadir>-masterlang = sy-langu.
|
||||||
|
|
||||||
lt_sequential = mo_cut->serialize(
|
lt_sequential = mo_cut->serialize(
|
||||||
it_tadir = lt_tadir
|
it_tadir = lt_tadir
|
||||||
|
|
|
@ -91,11 +91,12 @@ CLASS zcl_abapgit_tadir IMPLEMENTATION.
|
||||||
" Local packages are not in TADIR, only in TDEVC, act as if they were
|
" Local packages are not in TADIR, only in TDEVC, act as if they were
|
||||||
IF <lv_package> CP '$*'. " OR <package> CP 'T*' ).
|
IF <lv_package> CP '$*'. " OR <package> CP 'T*' ).
|
||||||
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_tadir>.
|
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_tadir>.
|
||||||
<ls_tadir>-pgmid = 'R3TR'.
|
<ls_tadir>-pgmid = 'R3TR'.
|
||||||
<ls_tadir>-object = 'DEVC'.
|
<ls_tadir>-object = 'DEVC'.
|
||||||
<ls_tadir>-obj_name = <lv_package>.
|
<ls_tadir>-obj_name = <lv_package>.
|
||||||
<ls_tadir>-devclass = <lv_package>.
|
<ls_tadir>-devclass = <lv_package>.
|
||||||
<ls_tadir>-srcsystem = sy-sysid.
|
<ls_tadir>-srcsystem = sy-sysid.
|
||||||
|
<ls_tadir>-masterlang = sy-langu.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
@ -128,11 +129,12 @@ CLASS zcl_abapgit_tadir IMPLEMENTATION.
|
||||||
WITH KEY pgmid = 'R3TR' object = 'NSPC' obj_name = lv_namespace.
|
WITH KEY pgmid = 'R3TR' object = 'NSPC' obj_name = lv_namespace.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_tadir>.
|
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_tadir>.
|
||||||
<ls_tadir>-pgmid = 'R3TR'.
|
<ls_tadir>-pgmid = 'R3TR'.
|
||||||
<ls_tadir>-object = 'NSPC'.
|
<ls_tadir>-object = 'NSPC'.
|
||||||
<ls_tadir>-obj_name = lv_namespace.
|
<ls_tadir>-obj_name = lv_namespace.
|
||||||
<ls_tadir>-devclass = iv_package.
|
<ls_tadir>-devclass = iv_package.
|
||||||
<ls_tadir>-srcsystem = sy-sysid.
|
<ls_tadir>-srcsystem = sy-sysid.
|
||||||
|
<ls_tadir>-masterlang = sy-langu.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -367,13 +369,14 @@ CLASS zcl_abapgit_tadir IMPLEMENTATION.
|
||||||
iv_object = iv_object
|
iv_object = iv_object
|
||||||
iv_obj_name = iv_obj_name ).
|
iv_obj_name = iv_obj_name ).
|
||||||
|
|
||||||
IF ls_tadir-delflag = 'X'.
|
IF ls_tadir-delflag = abap_true.
|
||||||
RETURN. "Mark for deletion -> return nothing
|
RETURN. "Mark for deletion -> return nothing
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ls_item-obj_type = ls_tadir-object.
|
ls_item-obj_type = ls_tadir-object.
|
||||||
ls_item-obj_name = ls_tadir-obj_name.
|
ls_item-obj_name = ls_tadir-obj_name.
|
||||||
ls_item-devclass = ls_tadir-devclass.
|
ls_item-devclass = ls_tadir-devclass.
|
||||||
|
|
||||||
IF zcl_abapgit_objects=>exists( ls_item ) = abap_false.
|
IF zcl_abapgit_objects=>exists( ls_item ) = abap_false.
|
||||||
RETURN.
|
RETURN.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -118,6 +118,7 @@ CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
||||||
rs_result-obj_name = is_local-item-obj_name.
|
rs_result-obj_name = is_local-item-obj_name.
|
||||||
rs_result-package = is_local-item-devclass.
|
rs_result-package = is_local-item-devclass.
|
||||||
rs_result-srcsystem = is_local-item-srcsystem.
|
rs_result-srcsystem = is_local-item-srcsystem.
|
||||||
|
rs_result-origlang = is_local-item-origlang.
|
||||||
rs_result-inactive = is_local-item-inactive.
|
rs_result-inactive = is_local-item-inactive.
|
||||||
|
|
||||||
" File
|
" File
|
||||||
|
@ -162,6 +163,7 @@ CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
||||||
rs_result-obj_name = is_local-item-obj_name.
|
rs_result-obj_name = is_local-item-obj_name.
|
||||||
rs_result-package = is_local-item-devclass.
|
rs_result-package = is_local-item-devclass.
|
||||||
rs_result-srcsystem = is_local-item-srcsystem.
|
rs_result-srcsystem = is_local-item-srcsystem.
|
||||||
|
rs_result-origlang = is_local-item-origlang.
|
||||||
rs_result-inactive = is_local-item-inactive.
|
rs_result-inactive = is_local-item-inactive.
|
||||||
|
|
||||||
" File
|
" File
|
||||||
|
@ -208,6 +210,7 @@ CLASS zcl_abapgit_file_status IMPLEMENTATION.
|
||||||
rs_result-obj_name = ls_item-obj_name.
|
rs_result-obj_name = ls_item-obj_name.
|
||||||
rs_result-package = ls_item-devclass.
|
rs_result-package = ls_item-devclass.
|
||||||
rs_result-srcsystem = sy-sysid.
|
rs_result-srcsystem = sy-sysid.
|
||||||
|
rs_result-origlang = sy-langu.
|
||||||
|
|
||||||
READ TABLE it_state_idx INTO ls_file_sig
|
READ TABLE it_state_idx INTO ls_file_sig
|
||||||
WITH KEY
|
WITH KEY
|
||||||
|
|
|
@ -121,6 +121,11 @@ CLASS zcl_abapgit_gui_page_repo_view DEFINITION
|
||||||
!is_item TYPE zif_abapgit_definitions=>ty_repo_item
|
!is_item TYPE zif_abapgit_definitions=>ty_repo_item
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_srcsystem_html_code) TYPE string .
|
VALUE(rv_srcsystem_html_code) TYPE string .
|
||||||
|
METHODS build_origlang_code
|
||||||
|
IMPORTING
|
||||||
|
!is_item TYPE zif_abapgit_definitions=>ty_repo_item
|
||||||
|
RETURNING
|
||||||
|
VALUE(rv_html_code) TYPE string .
|
||||||
METHODS open_in_main_language
|
METHODS open_in_main_language
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
@ -481,6 +486,18 @@ CLASS zcl_abapgit_gui_page_repo_view IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD build_origlang_code.
|
||||||
|
|
||||||
|
IF is_item-origlang IS NOT INITIAL AND is_item-origlang <> mo_repo->get_dot_abapgit( )->get_main_language( ).
|
||||||
|
rv_html_code = zcl_abapgit_html=>icon(
|
||||||
|
iv_name = 'language-solid/grey'
|
||||||
|
iv_hint = |Original language: { is_item-origlang }|
|
||||||
|
iv_class = 'cursor-pointer' ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD build_srcsystem_code.
|
METHOD build_srcsystem_code.
|
||||||
|
|
||||||
IF is_item-srcsystem IS NOT INITIAL AND is_item-srcsystem <> sy-sysid.
|
IF is_item-srcsystem IS NOT INITIAL AND is_item-srcsystem <> sy-sysid.
|
||||||
|
@ -792,7 +809,7 @@ CLASS zcl_abapgit_gui_page_repo_view IMPLEMENTATION.
|
||||||
lv_link = zcl_abapgit_gui_chunk_lib=>get_item_link( is_item ).
|
lv_link = zcl_abapgit_gui_chunk_lib=>get_item_link( is_item ).
|
||||||
ri_html->add( |<td class="type">{ is_item-obj_type }</td>| ).
|
ri_html->add( |<td class="type">{ is_item-obj_type }</td>| ).
|
||||||
ri_html->add( |<td class="object">{ lv_link } { build_inactive_object_code( is_item )
|
ri_html->add( |<td class="object">{ lv_link } { build_inactive_object_code( is_item )
|
||||||
} { build_srcsystem_code( is_item ) }</td>| ).
|
} { build_srcsystem_code( is_item ) } { build_origlang_code( is_item ) }</td>| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
INCLUDE TYPE ty_item_signature.
|
INCLUDE TYPE ty_item_signature.
|
||||||
TYPES:
|
TYPES:
|
||||||
srcsystem TYPE tadir-srcsystem,
|
srcsystem TYPE tadir-srcsystem,
|
||||||
|
origlang TYPE tadir-masterlang,
|
||||||
inactive TYPE abap_bool,
|
inactive TYPE abap_bool,
|
||||||
END OF ty_item .
|
END OF ty_item .
|
||||||
TYPES:
|
TYPES:
|
||||||
|
@ -110,15 +111,16 @@ INTERFACE zif_abapgit_definitions
|
||||||
WITH NON-UNIQUE SORTED KEY type COMPONENTS type sha1 .
|
WITH NON-UNIQUE SORTED KEY type COMPONENTS type sha1 .
|
||||||
TYPES:
|
TYPES:
|
||||||
BEGIN OF ty_tadir,
|
BEGIN OF ty_tadir,
|
||||||
pgmid TYPE tadir-pgmid,
|
pgmid TYPE tadir-pgmid,
|
||||||
object TYPE tadir-object,
|
object TYPE tadir-object,
|
||||||
obj_name TYPE tadir-obj_name,
|
obj_name TYPE tadir-obj_name,
|
||||||
devclass TYPE tadir-devclass,
|
devclass TYPE tadir-devclass,
|
||||||
korrnum TYPE tadir-korrnum, " used by ZCL_ABAPGIT_DEPENDENCIES->RESOLVE
|
korrnum TYPE tadir-korrnum, " used by ZCL_ABAPGIT_DEPENDENCIES->RESOLVE
|
||||||
delflag TYPE tadir-delflag,
|
delflag TYPE tadir-delflag,
|
||||||
genflag TYPE tadir-genflag,
|
genflag TYPE tadir-genflag,
|
||||||
path TYPE string,
|
path TYPE string,
|
||||||
srcsystem TYPE tadir-srcsystem,
|
srcsystem TYPE tadir-srcsystem,
|
||||||
|
masterlang TYPE tadir-masterlang,
|
||||||
END OF ty_tadir .
|
END OF ty_tadir .
|
||||||
TYPES:
|
TYPES:
|
||||||
ty_tadir_tt TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY .
|
ty_tadir_tt TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY .
|
||||||
|
@ -135,6 +137,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
rstate TYPE zif_abapgit_git_definitions=>ty_item_state,
|
rstate TYPE zif_abapgit_git_definitions=>ty_item_state,
|
||||||
packmove TYPE abap_bool,
|
packmove TYPE abap_bool,
|
||||||
srcsystem TYPE tadir-srcsystem,
|
srcsystem TYPE tadir-srcsystem,
|
||||||
|
origlang TYPE tadir-masterlang,
|
||||||
END OF ty_result .
|
END OF ty_result .
|
||||||
TYPES:
|
TYPES:
|
||||||
ty_results_tt TYPE STANDARD TABLE OF ty_result WITH DEFAULT KEY .
|
ty_results_tt TYPE STANDARD TABLE OF ty_result WITH DEFAULT KEY .
|
||||||
|
@ -245,6 +248,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
transport TYPE trkorr,
|
transport TYPE trkorr,
|
||||||
packmove TYPE abap_bool,
|
packmove TYPE abap_bool,
|
||||||
srcsystem TYPE tadir-srcsystem,
|
srcsystem TYPE tadir-srcsystem,
|
||||||
|
origlang TYPE tadir-masterlang,
|
||||||
END OF ty_repo_item .
|
END OF ty_repo_item .
|
||||||
TYPES:
|
TYPES:
|
||||||
ty_repo_item_tt TYPE STANDARD TABLE OF ty_repo_item WITH DEFAULT KEY .
|
ty_repo_item_tt TYPE STANDARD TABLE OF ty_repo_item WITH DEFAULT KEY .
|
||||||
|
|
Loading…
Reference in New Issue
Block a user