All files / src/ui/popups zcl_abapgit_popup_code_insp.clas.abap

100% Statements 63/63
100% Branches 0/0
100% Functions 0/0
100% Lines 63/63

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 641x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS zcl_abapgit_popup_code_insp DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .
 
  PUBLIC SECTION.
 
    INTERFACES zif_abapgit_gui_render_item .
    INTERFACES zif_abapgit_html_popup .
 
    CLASS-METHODS create
      RETURNING
        VALUE(ri_popup) TYPE REF TO zif_abapgit_html_popup .
  PROTECTED SECTION.
  PRIVATE SECTION.
 
    METHODS fetch_list
      RETURNING
        VALUE(rt_list) TYPE zif_abapgit_code_inspector=>ty_variants
      RAISING
        zcx_abapgit_exception.
 
ENDCLASS.
 
 
 
CLASS ZCL_ABAPGIT_POPUP_CODE_INSP IMPLEMENTATION.
 
 
  METHOD create.
    CREATE OBJECT ri_popup TYPE zcl_abapgit_popup_code_insp.
  ENDMETHOD.
 
 
  METHOD fetch_list.
 
    rt_list = zcl_abapgit_factory=>get_code_inspector( '$TMP' )->list_global_variants( ).
 
  ENDMETHOD.
 
 
  METHOD zif_abapgit_gui_render_item~render.
 
    FIELD-SYMBOLS <ls_item> TYPE LINE OF zif_abapgit_code_inspector=>ty_variants.
 
    ASSIGN iv_item TO <ls_item>.
    ASSERT sy-subrc = 0.
 
    ri_html = zcl_abapgit_html=>create( |<b>{ <ls_item>-name }</b> - { <ls_item>-description }| ).
 
  ENDMETHOD.
 
 
  METHOD zif_abapgit_html_popup~create_picklist.
 
    CREATE OBJECT ro_picklist
      EXPORTING
        iv_title         = 'Choose Variant'
        it_list          = fetch_list( )
        ii_item_renderer = me.
 
  ENDMETHOD.
ENDCLASS.