All files / src/objects/core zcl_abapgit_folder_logic.clas.locals_imp.abap

100% Statements 138/138
100% Branches 2/2
100% Functions 0/0
100% Lines 138/138

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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 1391x 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 30x 30x 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 1x 1x 1x 1x 1x 3x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS lcl_package_to_path DEFINITION.
 
  PUBLIC SECTION.
 
    CLASS-METHODS get
      IMPORTING
        !iv_top        TYPE devclass
        !io_dot        TYPE REF TO zcl_abapgit_dot_abapgit
        !iv_package    TYPE devclass
      RETURNING
        VALUE(rv_path) TYPE string.
 
    CLASS-METHODS add
      IMPORTING
        !iv_top     TYPE devclass
        !io_dot     TYPE REF TO zcl_abapgit_dot_abapgit
        !iv_package TYPE devclass
        !iv_path    TYPE string.
 
  PRIVATE SECTION.
 
    TYPES:
      BEGIN OF ty_buffer,
        top             TYPE devclass,
        starting_folder TYPE string,
        folder_logic    TYPE string,
        package         TYPE devclass,
        path            TYPE string,
      END OF ty_buffer.
 
    CLASS-DATA gt_buffer
      TYPE HASHED TABLE OF ty_buffer
      WITH UNIQUE KEY top starting_folder folder_logic package.
 
ENDCLASS.
 
CLASS lcl_package_to_path IMPLEMENTATION.
 
  METHOD get.
 
    FIELD-SYMBOLS <ls_buffer> LIKE LINE OF gt_buffer.
 
    READ TABLE gt_buffer ASSIGNING <ls_buffer> WITH TABLE KEY
      top             = iv_top
      starting_folder = io_dot->get_starting_folder( )
      folder_logic    = io_dot->get_folder_logic( )
      package         = iv_package.
    IF sy-subrc = 0.
      rv_path = <ls_buffer>-path.
    ENDIF.
 
  ENDMETHOD.
 
  METHOD add.
 
    DATA ls_buffer LIKE LINE OF gt_buffer.
 
    CLEAR ls_buffer.
    ls_buffer-top             = iv_top.
    ls_buffer-starting_folder = io_dot->get_starting_folder( ).
    ls_buffer-folder_logic    = io_dot->get_folder_logic( ).
    ls_buffer-package         = iv_package.
    ls_buffer-path            = iv_path.
    INSERT ls_buffer INTO TABLE gt_buffer.
 
  ENDMETHOD.
 
ENDCLASS.
 
CLASS lcl_path_to_package DEFINITION.
 
  PUBLIC SECTION.
 
    CLASS-METHODS get
      IMPORTING
        !iv_top           TYPE devclass
        !io_dot           TYPE REF TO zcl_abapgit_dot_abapgit
        !iv_path          TYPE string
      RETURNING
        VALUE(rv_package) TYPE devclass.
 
    CLASS-METHODS add
      IMPORTING
        !iv_top     TYPE devclass
        !io_dot     TYPE REF TO zcl_abapgit_dot_abapgit
        !iv_path    TYPE string
        !iv_package TYPE devclass.
 
  PRIVATE SECTION.
 
    TYPES:
      BEGIN OF ty_buffer,
        top             TYPE devclass,
        starting_folder TYPE string,
        folder_logic    TYPE string,
        path            TYPE string,
        package         TYPE devclass,
      END OF ty_buffer.
 
    CLASS-DATA gt_buffer
      TYPE HASHED TABLE OF ty_buffer
      WITH UNIQUE KEY top starting_folder folder_logic path.
 
ENDCLASS.
 
CLASS lcl_path_to_package IMPLEMENTATION.
 
  METHOD get.
 
    FIELD-SYMBOLS <ls_buffer> LIKE LINE OF gt_buffer.
 
    READ TABLE gt_buffer ASSIGNING <ls_buffer> WITH TABLE KEY
      top             = iv_top
      starting_folder = io_dot->get_starting_folder( )
      folder_logic    = io_dot->get_folder_logic( )
      path            = iv_path.
    IF sy-subrc = 0.
      rv_package = <ls_buffer>-package.
      RETURN.
    ENDIF.
 
  ENDMETHOD.
 
  METHOD add.
 
    DATA ls_buffer LIKE LINE OF gt_buffer.
 
    CLEAR ls_buffer.
    ls_buffer-top             = iv_top.
    ls_buffer-starting_folder = io_dot->get_starting_folder( ).
    ls_buffer-folder_logic    = io_dot->get_folder_logic( ).
    ls_buffer-path            = iv_path.
    ls_buffer-package         = iv_package.
    INSERT ls_buffer INTO TABLE gt_buffer.
 
  ENDMETHOD.
 
ENDCLASS.