zif_abapgit_html_viewer do abstraction (#6037)

This commit is contained in:
Lars Hvam 2023-02-04 09:57:30 +01:00 committed by GitHub
parent a7c20da7a2
commit 5e070bdc24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 19 deletions

View File

@ -371,16 +371,7 @@ CLASS zcl_abapgit_gui IMPLEMENTATION.
METHOD set_focus.
cl_gui_control=>set_focus(
EXPORTING
control = mi_html_viewer->get_viewer( )
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error in: cl_gui_control=>set_focus - SUBRC = { sy-subrc }| ).
ENDIF.
mi_html_viewer->set_focus( ).
ENDMETHOD.

View File

@ -96,11 +96,6 @@ CLASS zcl_abapgit_html_viewer_gui IMPLEMENTATION.
ENDMETHOD.
METHOD zif_abapgit_html_viewer~get_viewer.
ro_result = mo_html_viewer.
ENDMETHOD.
METHOD zif_abapgit_html_viewer~load_data.
DATA lv_url TYPE c LENGTH 250.
@ -132,6 +127,20 @@ CLASS zcl_abapgit_html_viewer_gui IMPLEMENTATION.
ENDMETHOD.
METHOD zif_abapgit_html_viewer~set_focus.
cl_gui_control=>set_focus(
EXPORTING
control = mo_html_viewer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error in: cl_gui_control=>set_focus - SUBRC = { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_html_viewer~set_registered_events.
mo_html_viewer->set_registered_events(

View File

@ -55,7 +55,5 @@ INTERFACE zif_abapgit_html_viewer
METHODS set_visiblity
IMPORTING
!iv_visible TYPE abap_bool .
METHODS get_viewer
RETURNING
VALUE(ro_result) TYPE REF TO cl_gui_html_viewer .
METHODS set_focus RAISING zcx_abapgit_exception.
ENDINTERFACE.