Skip to content

Commit

Permalink
Refactor: Types related to object interface (abapGit#7096)
Browse files Browse the repository at this point in the history
Co-authored-by: Lars Hvam <[email protected]>
  • Loading branch information
mbtools and larshp authored Dec 5, 2024
1 parent da3f5e2 commit cb58678
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/objects/core/zcl_abapgit_serialize.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ CLASS zcl_abapgit_serialize IMPLEMENTATION.
METHOD filter_unsupported_objects.

DATA: ls_unsupported_count TYPE ty_unsupported_count,
lt_supported_types TYPE zcl_abapgit_objects=>ty_types_tt,
lt_supported_types TYPE zif_abapgit_objects=>ty_types_tt,
lt_unsupported_count TYPE ty_unsupported_count_tt.

FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF ct_tadir,
Expand Down
2 changes: 1 addition & 1 deletion src/objects/zcl_abapgit_object_doma.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CLASS zcl_abapgit_object_doma DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje

METHODS handle_dependencies
IMPORTING
!iv_step TYPE zif_abapgit_definitions=>ty_deserialization_step
!iv_step TYPE zif_abapgit_objects=>ty_deserialization_step
CHANGING
!cv_exit TYPE dd01v-convexit
!cv_done TYPE abap_bool.
Expand Down
2 changes: 1 addition & 1 deletion src/objects/zcl_abapgit_object_shlp.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CLASS zcl_abapgit_object_shlp DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje

METHODS handle_dependencies
IMPORTING
!iv_step TYPE zif_abapgit_definitions=>ty_deserialization_step
!iv_step TYPE zif_abapgit_objects=>ty_deserialization_step
CHANGING
!cv_exit TYPE dd30v-selmexit
!cv_done TYPE abap_bool.
Expand Down
9 changes: 3 additions & 6 deletions src/objects/zcl_abapgit_objects.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ CLASS zcl_abapgit_objects DEFINITION

PUBLIC SECTION.

TYPES:
ty_types_tt TYPE SORTED TABLE OF tadir-object WITH UNIQUE KEY table_line .

CLASS-METHODS serialize
IMPORTING
!is_item TYPE zif_abapgit_definitions=>ty_item
Expand Down Expand Up @@ -71,7 +68,7 @@ CLASS zcl_abapgit_objects DEFINITION
VALUE(rv_bool) TYPE abap_bool .
CLASS-METHODS supported_list
RETURNING
VALUE(rt_types) TYPE ty_types_tt .
VALUE(rt_types) TYPE zif_abapgit_objects=>ty_types_tt.
CLASS-METHODS is_active
IMPORTING
!is_item TYPE zif_abapgit_definitions=>ty_item
Expand Down Expand Up @@ -663,7 +660,7 @@ CLASS zcl_abapgit_objects IMPLEMENTATION.
li_progress TYPE REF TO zif_abapgit_progress,
lv_path TYPE string,
lt_items TYPE zif_abapgit_definitions=>ty_items_tt,
lt_steps_id TYPE zif_abapgit_definitions=>ty_deserialization_step_tt,
lt_steps_id TYPE zif_abapgit_objects=>ty_deserialization_step_tt,
lt_steps TYPE zif_abapgit_objects=>ty_step_data_tt,
lx_exc TYPE REF TO zcx_abapgit_exception.
DATA lo_folder_logic TYPE REF TO zcl_abapgit_folder_logic.
Expand All @@ -672,7 +669,7 @@ CLASS zcl_abapgit_objects IMPLEMENTATION.
DATA lo_abap_language_vers TYPE REF TO zcl_abapgit_abap_language_vers.

FIELD-SYMBOLS: <ls_result> TYPE zif_abapgit_definitions=>ty_result,
<lv_step_id> TYPE LINE OF zif_abapgit_definitions=>ty_deserialization_step_tt,
<lv_step_id> TYPE LINE OF zif_abapgit_objects=>ty_deserialization_step_tt,
<ls_step> TYPE LINE OF zif_abapgit_objects=>ty_step_data_tt,
<ls_deser> TYPE LINE OF zif_abapgit_objects=>ty_deserialization_tt.

Expand Down
2 changes: 1 addition & 1 deletion src/objects/zcl_abapgit_objects.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CLASS ltcl_object_types IMPLEMENTATION.

DATA: ls_item TYPE zif_abapgit_definitions=>ty_item,
lv_exists TYPE abap_bool,
lt_types TYPE zcl_abapgit_objects=>ty_types_tt.
lt_types TYPE zif_abapgit_objects=>ty_types_tt.

FIELD-SYMBOLS: <lv_type> LIKE LINE OF lt_types.

Expand Down
15 changes: 7 additions & 8 deletions src/objects/zif_abapgit_object.intf.abap
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
INTERFACE zif_abapgit_object
PUBLIC .
INTERFACE zif_abapgit_object PUBLIC.

CONSTANTS:
BEGIN OF gc_step_id,
early TYPE zif_abapgit_definitions=>ty_deserialization_step VALUE `EARLY`,
abap TYPE zif_abapgit_definitions=>ty_deserialization_step VALUE `ABAP`,
ddic TYPE zif_abapgit_definitions=>ty_deserialization_step VALUE `DDIC`,
late TYPE zif_abapgit_definitions=>ty_deserialization_step VALUE `LATE`,
early TYPE zif_abapgit_objects=>ty_deserialization_step VALUE 'EARLY',
abap TYPE zif_abapgit_objects=>ty_deserialization_step VALUE 'ABAP',
ddic TYPE zif_abapgit_objects=>ty_deserialization_step VALUE 'DDIC',
late TYPE zif_abapgit_objects=>ty_deserialization_step VALUE 'LATE',
END OF gc_step_id.

METHODS serialize
Expand All @@ -19,7 +18,7 @@ INTERFACE zif_abapgit_object
IMPORTING
!iv_package TYPE devclass
!io_xml TYPE REF TO zif_abapgit_xml_input
!iv_step TYPE zif_abapgit_definitions=>ty_deserialization_step
!iv_step TYPE zif_abapgit_objects=>ty_deserialization_step
!ii_log TYPE REF TO zif_abapgit_log
!iv_transport TYPE trkorr
RAISING
Expand Down Expand Up @@ -78,7 +77,7 @@ INTERFACE zif_abapgit_object

METHODS get_deserialize_steps
RETURNING
VALUE(rt_steps) TYPE zif_abapgit_definitions=>ty_deserialization_step_tt .
VALUE(rt_steps) TYPE zif_abapgit_objects=>ty_deserialization_step_tt.

METHODS get_deserialize_order
IMPORTING
Expand Down
11 changes: 8 additions & 3 deletions src/objects/zif_abapgit_objects.intf.abap
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
INTERFACE zif_abapgit_objects
PUBLIC.
INTERFACE zif_abapgit_objects PUBLIC.

TYPES:
BEGIN OF ty_serialization,
Expand All @@ -15,9 +14,15 @@ INTERFACE zif_abapgit_objects
END OF ty_deserialization .
TYPES:
ty_deserialization_tt TYPE STANDARD TABLE OF ty_deserialization WITH DEFAULT KEY .
TYPES:
ty_types_tt TYPE SORTED TABLE OF tadir-object WITH UNIQUE KEY table_line.
TYPES:
ty_deserialization_step TYPE string.
TYPES:
ty_deserialization_step_tt TYPE STANDARD TABLE OF ty_deserialization_step WITH DEFAULT KEY.
TYPES:
BEGIN OF ty_step_data,
step_id TYPE zif_abapgit_definitions=>ty_deserialization_step,
step_id TYPE ty_deserialization_step,
order TYPE i,
descr TYPE string,
syntax_check TYPE abap_bool,
Expand Down
4 changes: 2 additions & 2 deletions src/repo/zcl_abapgit_repo.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ENDCLASS.



CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
CLASS zcl_abapgit_repo IMPLEMENTATION.


METHOD bind_listener.
Expand Down Expand Up @@ -402,7 +402,7 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
METHOD get_unsupported_objects_local.

DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt,
lt_supported_types TYPE zcl_abapgit_objects=>ty_types_tt.
lt_supported_types TYPE zif_abapgit_objects=>ty_types_tt.

FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF lt_tadir,
<ls_object> LIKE LINE OF rt_objects.
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/sett/zcl_abapgit_gui_page_sett_info.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ CLASS zcl_abapgit_gui_page_sett_info IMPLEMENTATION.
DATA:
ls_stats TYPE ty_stats,
ls_item TYPE zif_abapgit_definitions=>ty_item,
lt_supported_types TYPE zcl_abapgit_objects=>ty_types_tt.
lt_supported_types TYPE zif_abapgit_objects=>ty_types_tt.

ls_stats-measure = 'Number of Objects'.

Expand Down
6 changes: 3 additions & 3 deletions src/ui/pages/zcl_abapgit_gui_page_debuginfo.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.

DATA: lv_list TYPE string,
li_html TYPE REF TO zif_abapgit_html,
lt_types TYPE zcl_abapgit_objects=>ty_types_tt,
lt_types TYPE zif_abapgit_objects=>ty_types_tt,
lv_type LIKE LINE OF lt_types,
lt_obj TYPE STANDARD TABLE OF ko100 WITH DEFAULT KEY,
lv_class TYPE seoclsname,
li_object TYPE REF TO zif_abapgit_object,
ls_item TYPE zif_abapgit_definitions=>ty_item,
ls_metadata TYPE zif_abapgit_definitions=>ty_metadata,
lv_step TYPE zif_abapgit_definitions=>ty_deserialization_step,
lt_steps TYPE zif_abapgit_definitions=>ty_deserialization_step_tt.
lv_step TYPE zif_abapgit_objects=>ty_deserialization_step,
lt_steps TYPE zif_abapgit_objects=>ty_deserialization_step_tt.

FIELD-SYMBOLS: <ls_obj> TYPE ko100.

Expand Down
5 changes: 0 additions & 5 deletions src/zif_abapgit_definitions.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@ INTERFACE zif_abapgit_definitions
prerelase TYPE string,
prerelase_patch TYPE i,
END OF ty_version.
TYPES:
ty_deserialization_step TYPE string.
TYPES:
ty_deserialization_step_tt TYPE STANDARD TABLE OF ty_deserialization_step
WITH DEFAULT KEY .
TYPES ty_sci_result TYPE c LENGTH 1.
CONSTANTS:
BEGIN OF c_sci_result,
Expand Down

0 comments on commit cb58678

Please sign in to comment.