Move open_ie_devtools to front-end services (#6408)

This commit is contained in:
Marc Bernard 2023-08-15 10:04:01 -04:00 committed by GitHub
parent a0c37350a9
commit 2d3e9fffd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 24 deletions

View File

@ -539,7 +539,7 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
CASE ii_event->mv_action.
WHEN zif_abapgit_definitions=>c_action-ie_devtools.
zcl_abapgit_services_basis=>open_ie_devtools( ).
zcl_abapgit_ui_factory=>get_frontend_services( )->open_ie_devtools( ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-clipboard.
lv_clip_content = ii_event->query( )->get( 'CLIPBOARD' ).

View File

@ -12,9 +12,6 @@ CLASS zcl_abapgit_services_basis DEFINITION
VALUE(rv_package) TYPE devclass
RAISING
zcx_abapgit_exception .
CLASS-METHODS open_ie_devtools
RAISING
zcx_abapgit_exception .
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-METHODS raise_error_if_package_exists
@ -55,26 +52,6 @@ CLASS zcl_abapgit_services_basis IMPLEMENTATION.
ENDMETHOD.
METHOD open_ie_devtools.
DATA: lv_system_directory TYPE string,
lv_exe_full_path TYPE string,
lo_frontend_serv TYPE REF TO zif_abapgit_frontend_services.
lo_frontend_serv = zcl_abapgit_ui_factory=>get_frontend_services( ).
IF lo_frontend_serv->is_sapgui_for_windows( ) = abap_false.
zcx_abapgit_exception=>raise( |IE DevTools not supported on frontend OS| ).
ENDIF.
lo_frontend_serv->get_system_directory( CHANGING cv_system_directory = lv_system_directory ).
cl_gui_cfw=>flush( ).
lv_exe_full_path = lv_system_directory && `\F12\IEChooser.exe`.
lo_frontend_serv->execute( iv_application = lv_exe_full_path ).
ENDMETHOD.
METHOD raise_error_if_package_exists.
IF iv_devclass IS INITIAL.

View File

@ -354,6 +354,26 @@ CLASS zcl_abapgit_frontend_services IMPLEMENTATION.
ENDMETHOD.
METHOD zif_abapgit_frontend_services~open_ie_devtools.
DATA: lv_system_directory TYPE string,
lv_exe_full_path TYPE string.
IF zif_abapgit_frontend_services~is_sapgui_for_windows( ) = abap_false.
zcx_abapgit_exception=>raise( |IE DevTools not supported on frontend OS| ).
ENDIF.
zif_abapgit_frontend_services~get_system_directory( CHANGING cv_system_directory = lv_system_directory ).
cl_gui_cfw=>flush( ).
lv_exe_full_path = lv_system_directory && `\F12\IEChooser.exe`.
zif_abapgit_frontend_services~execute( iv_application = lv_exe_full_path ).
ENDMETHOD.
METHOD zif_abapgit_frontend_services~show_file_open_dialog.
DATA:

View File

@ -123,4 +123,8 @@ INTERFACE zif_abapgit_frontend_services PUBLIC.
RETURNING
VALUE(rv_is_webgui) TYPE abap_bool.
METHODS open_ie_devtools
RAISING
zcx_abapgit_exception.
ENDINTERFACE.