Refactoring (#1036)

* refactoring

* Update README.md
This commit is contained in:
oblomov 2024-03-21 19:26:17 +00:00 committed by GitHub
parent 8c95d08017
commit 67557210fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 41 additions and 30 deletions

View File

@ -52,12 +52,14 @@
* Part of the SAP Developer Code Challenge [(SCN - 17.05.2023)](https://groups.community.sap.com/t5/application-development/sap-developer-code-challenge-open-source-abap-week-2/m-p/260727#M1372)
* Showcased at SAP TechEd 2023 [(youtube - 02.11.2023)](https://www.youtube.com/watch?v=kLbF0ooStZs&t=3052s)
* Featured on SAP Developer News [(youtube - 15.12.2023)](https://www.youtube.com/watch?v=CfH9L03WUCg&t=350s)
* Highlighted in the Boring Enterprise Nerdcast [(youtube - 29.01.2024)](https://youtu.be/svDZKFBvqR8?t=1050)
#### Extensions & Apps
* Integrate your apps to SAP Fiori On-Premise Launchpad [(ext-fiori_launchpad)](https://github.com/abap2UI5/ext-service_integration)
* Connect with SAP BTP & SAP Mobile Start [(ext-btp)](https://github.com/abap2UI5/ext-business_technology_platform)
* Pimp up your apps with custom controls and external libraries [(ext-cc)](https://github.com/abap2UI5/abap2UI5-documentation/blob/main/docs/custom_controls.md)
* Discover other projects using abap2UI5 [(abap2UI5/links)](https://github.com/abap2UI5/abap2UI5-documentation/blob/main/links.md)
* And don't forget to explore the [Samples Repository](https://github.com/abap2UI5/abap2UI5-samples) 🧭
#### Credits
* These [**contributors**](https://github.com/abap2UI5/abap2UI5/graphs/contributors) continuously drive the evolution of this project forward
@ -76,7 +78,6 @@ _Thanks to everyone who submits PRs or enriches my knowledge in issues, via Slac
* Experiment with abap2UI5 compiled to JS on open-abap under Node.js [(abap2UI5-web)](https://twitter.com/LarsHvam/status/1648575595897405446)
* Import & Export Excel files in pure ABAP with abap2xslt [(twitter/xslt)](https://twitter.com/abap2UI5/status/1703787345588162907)
* Join the Advent of Code 2023 with abap2UI5 [(SCN - 27.11.2023)](https://blogs.sap.com/2023/11/27/preparing-for-advent-of-code-2023/)
* And don't forget to explore the [Samples Repository](https://github.com/abap2UI5/abap2UI5-samples) 🧭
#### Installation
Install with [abapGit](https://abapgit.org) ![abapGit](https://docs.abapgit.org/img/favicon.png) and set up a new HTTP service with the following handler:

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DEVC" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DEVC>
<CTEXT>abap2UI5 - steampuncification</CTEXT>
</DEVC>
</asx:values>
</asx:abap>
</abapGit>

View File

@ -1,4 +1,4 @@
CLASS z2ui5_cl_util_stmpncfctn DEFINITION
CLASS z2ui5_cl_stmpncfctn_api DEFINITION
PUBLIC
CREATE PUBLIC .
@ -14,13 +14,12 @@ CLASS z2ui5_cl_util_stmpncfctn DEFINITION
TYPES:
BEGIN OF ts_class,
classname TYPE c LENGTH 30,
classname TYPE string,
description TYPE string,
END OF ts_class,
tt_classes TYPE STANDARD TABLE OF ts_class
WITH NON-UNIQUE DEFAULT KEY.
END OF ts_class.
TYPES tt_classes TYPE STANDARD TABLE OF ts_class WITH NON-UNIQUE DEFAULT KEY.
CLASS-METHODS method_get_source
CLASS-METHODS source_get_method
IMPORTING
!iv_classname TYPE clike
!iv_methodname TYPE clike
@ -71,18 +70,19 @@ CLASS z2ui5_cl_util_stmpncfctn DEFINITION
RETURNING
VALUE(result) TYPE tt_classes.
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-METHODS get_class_description_xco
CLASS-METHODS xco_get_class_description
IMPORTING
i_classname TYPE ts_class-classname
i_classname TYPE clike
RETURNING
VALUE(result) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_util_stmpncfctn IMPLEMENTATION.
CLASS z2ui5_cl_stmpncfctn_api IMPLEMENTATION.
METHOD conv_decode_x_base64.
@ -199,7 +199,7 @@ CLASS z2ui5_cl_util_stmpncfctn IMPLEMENTATION.
ENDMETHOD.
METHOD method_get_source.
METHOD source_get_method.
DATA object TYPE REF TO object.
FIELD-SYMBOLS <any> TYPE any.
@ -324,7 +324,7 @@ CLASS z2ui5_cl_util_stmpncfctn IMPLEMENTATION.
result = VALUE #(
FOR implementation_name IN lt_implementation_names
( classname = implementation_name
description = get_class_description_xco( CONV #( implementation_name ) ) ) ).
description = xco_get_class_description( implementation_name ) ) ).
CATCH cx_sy_dyn_call_illegal_class.
@ -551,7 +551,7 @@ CLASS z2ui5_cl_util_stmpncfctn IMPLEMENTATION.
ENDMETHOD.
METHOD get_class_description_xco.
METHOD xco_get_class_description.
DATA:
obj TYPE REF TO object,

View File

@ -16,7 +16,7 @@ CLASS ltcl_test IMPLEMENTATION.
METHOD test_func_get_uuid_32.
DATA(lv_uuid) = z2ui5_cl_util_stmpncfctn=>uuid_get_c32( ).
DATA(lv_uuid) = z2ui5_cl_stmpncfctn_api=>uuid_get_c32( ).
cl_abap_unit_assert=>assert_not_initial( lv_uuid ).
cl_abap_unit_assert=>assert_equals(
act = 32
@ -26,7 +26,7 @@ CLASS ltcl_test IMPLEMENTATION.
METHOD test_func_get_uuid_22.
DATA(lv_uuid) = z2ui5_cl_util_stmpncfctn=>uuid_get_c22( ).
DATA(lv_uuid) = z2ui5_cl_stmpncfctn_api=>uuid_get_c22( ).
cl_abap_unit_assert=>assert_not_initial( lv_uuid ).
cl_abap_unit_assert=>assert_equals(
act = 22
@ -37,10 +37,10 @@ CLASS ltcl_test IMPLEMENTATION.
METHOD test_encoding.
DATA(lv_string) = `my string`.
DATA(lv_xstring) = z2ui5_cl_util_stmpncfctn=>conv_get_xstring_by_string( lv_string ).
DATA(lv_string2) = z2ui5_cl_util_stmpncfctn=>conv_encode_x_base64( lv_xstring ).
DATA(lv_xstring2) = z2ui5_cl_util_stmpncfctn=>conv_decode_x_base64( lv_string2 ).
DATA(lv_string3) = z2ui5_cl_util_stmpncfctn=>conv_get_string_by_xstring( lv_xstring2 ).
DATA(lv_xstring) = z2ui5_cl_stmpncfctn_api=>conv_get_xstring_by_string( lv_string ).
DATA(lv_string2) = z2ui5_cl_stmpncfctn_api=>conv_encode_x_base64( lv_xstring ).
DATA(lv_xstring2) = z2ui5_cl_stmpncfctn_api=>conv_decode_x_base64( lv_string2 ).
DATA(lv_string3) = z2ui5_cl_stmpncfctn_api=>conv_get_string_by_xstring( lv_xstring2 ).
cl_abap_unit_assert=>assert_equals(
act = lv_string3
@ -54,7 +54,7 @@ CLASS ltcl_test IMPLEMENTATION.
RETURN.
ENDIF.
DATA(ls_result) = z2ui5_cl_util_stmpncfctn=>rtti_get_data_element_texts( `UNAME` ).
DATA(ls_result) = z2ui5_cl_stmpncfctn_api=>rtti_get_data_element_texts( `UNAME` ).
cl_abap_unit_assert=>assert_not_initial( ls_result ).
ENDMETHOD.
@ -65,7 +65,7 @@ CLASS ltcl_test IMPLEMENTATION.
RETURN.
ENDIF.
DATA(mt_classes) = z2ui5_cl_util_stmpncfctn=>rtti_get_classes_impl_intf( `IF_SERIALIZABLE_OBJECT` ).
DATA(mt_classes) = z2ui5_cl_stmpncfctn_api=>rtti_get_classes_impl_intf( `IF_SERIALIZABLE_OBJECT` ).
cl_abap_unit_assert=>assert_not_initial( mt_classes ).
ENDMETHOD.

View File

@ -3,7 +3,7 @@
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_UTIL_STMPNCFCTN</CLSNAME>
<CLSNAME>Z2UI5_CL_STMPNCFCTN_API</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>abap2UI5 - running everywhere snippets</DESCRIPT>
<STATE>1</STATE>

View File

@ -1,7 +1,7 @@
CLASS z2ui5_cl_util_api DEFINITION
PUBLIC
CREATE PUBLIC
INHERITING FROM z2ui5_cl_util_stmpncfctn.
INHERITING FROM z2ui5_cl_stmpncfctn_api.
PUBLIC SECTION.
@ -53,7 +53,7 @@ CLASS z2ui5_cl_util_api DEFINITION
RETURNING
VALUE(result) TYPE ty_t_fix_val ##NEEDED.
CLASS-METHODS source_get_method
CLASS-METHODS source_get_method2
IMPORTING
iv_classname TYPE clike
iv_methodname TYPE clike
@ -366,7 +366,7 @@ ENDCLASS.
CLASS z2ui5_cl_util_api IMPLEMENTATION.
CLASS Z2UI5_CL_UTIL_API IMPLEMENTATION.
METHOD boolean_abap_2_json.
@ -901,9 +901,9 @@ CLASS z2ui5_cl_util_api IMPLEMENTATION.
ENDMETHOD.
METHOD source_get_method.
METHOD source_get_method2.
DATA(lt_source) = method_get_source(
DATA(lt_source) = source_get_method(
iv_classname = iv_classname
iv_methodname = iv_methodname ).

View File

@ -32,7 +32,7 @@ CLASS z2ui5_cl_core_app_startup DEFINITION
METHODS on_event_check.
PROTECTED SECTION.
DATA mt_classes TYPE z2ui5_cl_util_stmpncfctn=>tt_classes.
DATA mt_classes TYPE z2ui5_cl_stmpncfctn_api=>tt_classes.
PRIVATE SECTION.
ENDCLASS.