mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Enhance jump to object (#6360)
This commit is contained in:
parent
5fabbea024
commit
af1a58d2e6
|
@ -49,6 +49,7 @@ CLASS zcl_abapgit_objects DEFINITION
|
||||||
!is_sub_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
!is_sub_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
||||||
!iv_filename TYPE string OPTIONAL
|
!iv_filename TYPE string OPTIONAL
|
||||||
!iv_line_number TYPE i OPTIONAL
|
!iv_line_number TYPE i OPTIONAL
|
||||||
|
!iv_new_window TYPE abap_bool DEFAULT abap_true
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS changed_by
|
CLASS-METHODS changed_by
|
||||||
|
@ -210,7 +211,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_OBJECTS IMPLEMENTATION.
|
CLASS zcl_abapgit_objects IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD changed_by.
|
METHOD changed_by.
|
||||||
|
@ -1102,7 +1103,8 @@ CLASS ZCL_ABAPGIT_OBJECTS IMPLEMENTATION.
|
||||||
lv_exit = zcl_abapgit_ui_factory=>get_gui_jumper( )->jump(
|
lv_exit = zcl_abapgit_ui_factory=>get_gui_jumper( )->jump(
|
||||||
is_item = is_item
|
is_item = is_item
|
||||||
is_sub_item = is_sub_item
|
is_sub_item = is_sub_item
|
||||||
iv_line_number = iv_line_number ).
|
iv_line_number = iv_line_number
|
||||||
|
iv_new_window = iv_new_window ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF lv_exit = abap_false.
|
IF lv_exit = abap_false.
|
||||||
|
|
|
@ -92,6 +92,10 @@ CLASS zcl_abapgit_gui_router DEFINITION
|
||||||
!iv_obj_type TYPE string
|
!iv_obj_type TYPE string
|
||||||
!iv_obj_name TYPE string
|
!iv_obj_name TYPE string
|
||||||
!iv_filename TYPE string
|
!iv_filename TYPE string
|
||||||
|
!iv_sub_type TYPE string OPTIONAL
|
||||||
|
!iv_sub_name TYPE string OPTIONAL
|
||||||
|
!iv_line TYPE string OPTIONAL
|
||||||
|
!iv_new_window TYPE string DEFAULT 'X'
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS jump_display_transport
|
CLASS-METHODS jump_display_transport
|
||||||
|
@ -504,11 +508,21 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
|
|
||||||
DATA:
|
DATA:
|
||||||
ls_item TYPE zif_abapgit_definitions=>ty_item,
|
ls_item TYPE zif_abapgit_definitions=>ty_item,
|
||||||
|
ls_sub_item TYPE zif_abapgit_definitions=>ty_item,
|
||||||
lx_error TYPE REF TO zcx_abapgit_exception,
|
lx_error TYPE REF TO zcx_abapgit_exception,
|
||||||
|
lv_line_number TYPE i,
|
||||||
|
lv_new_window TYPE abap_bool,
|
||||||
li_html_viewer TYPE REF TO zif_abapgit_html_viewer.
|
li_html_viewer TYPE REF TO zif_abapgit_html_viewer.
|
||||||
|
|
||||||
ls_item-obj_type = cl_http_utility=>unescape_url( |{ iv_obj_type }| ).
|
ls_item-obj_type = cl_http_utility=>unescape_url( |{ iv_obj_type }| ).
|
||||||
ls_item-obj_name = cl_http_utility=>unescape_url( |{ iv_obj_name }| ).
|
ls_item-obj_name = cl_http_utility=>unescape_url( |{ iv_obj_name }| ).
|
||||||
|
ls_sub_item-obj_type = cl_http_utility=>unescape_url( |{ iv_sub_type }| ).
|
||||||
|
ls_sub_item-obj_name = cl_http_utility=>unescape_url( |{ iv_sub_name }| ).
|
||||||
|
|
||||||
|
IF iv_line CO '0123456789'.
|
||||||
|
lv_line_number = iv_line.
|
||||||
|
ENDIF.
|
||||||
|
lv_new_window = boolc( iv_new_window IS NOT INITIAL ).
|
||||||
|
|
||||||
TRY.
|
TRY.
|
||||||
li_html_viewer = zcl_abapgit_ui_factory=>get_html_viewer( ).
|
li_html_viewer = zcl_abapgit_ui_factory=>get_html_viewer( ).
|
||||||
|
@ -518,10 +532,18 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
|
|
||||||
IF ls_item-obj_type = zif_abapgit_data_config=>c_data_type-tabu.
|
IF ls_item-obj_type = zif_abapgit_data_config=>c_data_type-tabu.
|
||||||
zcl_abapgit_data_utils=>jump( ls_item ).
|
zcl_abapgit_data_utils=>jump( ls_item ).
|
||||||
|
ELSEIF lv_line_number IS INITIAL OR ls_sub_item IS INITIAL.
|
||||||
|
zcl_abapgit_objects=>jump(
|
||||||
|
is_item = ls_item
|
||||||
|
iv_filename = iv_filename
|
||||||
|
iv_new_window = lv_new_window ).
|
||||||
ELSE.
|
ELSE.
|
||||||
zcl_abapgit_objects=>jump(
|
zcl_abapgit_objects=>jump(
|
||||||
is_item = ls_item
|
is_item = ls_item
|
||||||
iv_filename = iv_filename ).
|
is_sub_item = ls_sub_item
|
||||||
|
iv_filename = iv_filename
|
||||||
|
iv_line_number = lv_line_number
|
||||||
|
iv_new_window = lv_new_window ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
li_html_viewer->set_visiblity( abap_true ).
|
li_html_viewer->set_visiblity( abap_true ).
|
||||||
|
@ -661,7 +683,11 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
jump_object(
|
jump_object(
|
||||||
iv_obj_type = ii_event->query( )->get( 'TYPE' )
|
iv_obj_type = ii_event->query( )->get( 'TYPE' )
|
||||||
iv_obj_name = ii_event->query( )->get( 'NAME' )
|
iv_obj_name = ii_event->query( )->get( 'NAME' )
|
||||||
iv_filename = ii_event->query( )->get( 'FILE' ) ).
|
iv_filename = ii_event->query( )->get( 'FILE' )
|
||||||
|
iv_sub_type = ii_event->query( )->get( 'SUBTYPE' )
|
||||||
|
iv_sub_name = ii_event->query( )->get( 'SUBNAME' )
|
||||||
|
iv_line = ii_event->query( )->get( 'LINE' )
|
||||||
|
iv_new_window = ii_event->query( )->get( 'NEW_WINDOW' ) ).
|
||||||
|
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user