WDYN support, close #100 😋

This commit is contained in:
Lars Hvam 2015-08-10 17:03:51 +02:00
parent 667f1b12f1
commit c258c5f72a

View File

@ -3,7 +3,7 @@ REPORT zabapgit.
* See https://github.com/larshp/abapGit/
CONSTANTS: gc_xml_version TYPE string VALUE 'v0.2-alpha', "#EC NOTEXT
gc_abap_version TYPE string VALUE 'v0.53'. "#EC NOTEXT
gc_abap_version TYPE string VALUE 'v0.54'. "#EC NOTEXT
********************************************************************************
* The MIT License (MIT)
@ -248,7 +248,7 @@ CLASS lcl_tadir IMPLEMENTATION.
WHEN 'INTF'.
SELECT SINGLE category FROM seoclassdf INTO lv_category
WHERE clsname = <ls_tadir>-obj_name
AND version = '1'.
AND ( version = '1' OR version = '0' ).
IF sy-subrc = 0 AND lv_category = seoc_category_webdynpro_class.
DELETE rt_tadir INDEX lv_index.
ENDIF.
@ -800,7 +800,7 @@ CLASS lcl_xml IMPLEMENTATION.
IF iv_name IS INITIAL.
lv_name = lo_descr->get_relative_name( ).
IF lv_name IS INITIAL.
_raise 'no name, element add'.
_raise 'no name, element add'.
ENDIF.
ELSE.
lv_name = iv_name.
@ -1361,7 +1361,7 @@ CLASS lcl_diff DEFINITION FINAL.
IMPORTING it_local TYPE abaptxt255_tab
it_remote TYPE abaptxt255_tab
it_delta TYPE vxabapt255_tab
RETURNING VALUE(rt_diff) TYPE tt_diffs.
RETURNING VALUE(rt_diff) TYPE tt_diffs.
CLASS-METHODS: compute
IMPORTING it_local TYPE abaptxt255_tab
@ -2061,7 +2061,7 @@ CLASS lcl_objects_common IMPLEMENTATION.
* todo, refactoring
CASE iv_type.
WHEN 'CLAS'.
WHEN 'CLAS' or 'WDYN'.
CALL FUNCTION 'RS_INACTIVE_OBJECTS_IN_OBJECT'
EXPORTING
obj_name = lv_obj_name
@ -2781,7 +2781,7 @@ CLASS lcl_object_clas IMPLEMENTATION.
lv_remove = abap_false.
LOOP AT ct_source INTO lv_source.
IF lv_source = lv_begin.
lv_remove = abap_true.
lv_remove = abap_true.
ENDIF.
IF lv_remove = abap_true.
DELETE ct_source INDEX sy-tabix.
@ -2861,7 +2861,7 @@ CLASS lcl_object_clas IMPLEMENTATION.
lt_source = serialize_testclasses( ls_clskey ).
IF NOT lt_source[] IS INITIAL.
ls_file = abap_to_file( is_item = is_item
iv_extra = 'testclasses'
iv_extra = 'testclasses'
it_abap = lt_source ). "#EC NOTEXT
APPEND ls_file TO rt_files.
ENDIF.
@ -4203,21 +4203,8 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
ls_obj_old-objtype = wdyn_limu_component_definition.
ls_obj_old-objname = ls_key-component_name.
CALL FUNCTION 'WDYD_GET_OBJECT'
EXPORTING
component_key = ls_key
get_all_translations = abap_false
TABLES
definition = ls_obj_new-wdyd-defin
descriptions = ls_obj_new-wdyd-descr
component_usages = ls_obj_new-wdyd-cusag
interface_implementings = ls_obj_new-wdyd-intrf
library_usages = ls_obj_new-wdyd-libra
ext_ctlr_usages = ls_obj_new-wdyd-ctuse
ext_ctx_mappings = ls_obj_new-wdyd-ctmap.
APPEND is_definition-definition TO ls_obj_old-wdyd-defin.
ls_obj_old-wdyd-descr = is_definition-descriptions.
ls_obj_old-wdyd-descr = is_definition-descriptions.
ls_obj_old-wdyd-cusag = is_definition-component_usages.
ls_obj_old-wdyd-intrf = is_definition-interface_implementings.
ls_obj_old-wdyd-libra = is_definition-library_usages.
@ -4226,8 +4213,8 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA'
EXPORTING
obj_old = ls_obj_old
obj_new = ls_obj_new
obj_old = ls_obj_new
obj_new = ls_obj_old
CHANGING
delta = rs_delta
EXCEPTIONS
@ -4275,27 +4262,6 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
ls_obj_old-objtype = wdyn_limu_component_controller.
ls_obj_old-objname = ls_key.
CALL FUNCTION 'WDYC_GET_OBJECT'
EXPORTING
controller_key = ls_key
get_all_translations = abap_false
TABLES
controller_components = ls_obj_new-wdyc-ccomp
controller_component_sources = ls_obj_new-wdyc-ccoms
definition = ls_obj_new-wdyc-defin
descriptions = ls_obj_new-wdyc-descr
controller_usages = ls_obj_new-wdyc-cusag
controller_component_texts = ls_obj_new-wdyc-ccomt
controller_parameters = ls_obj_new-wdyc-cpara
controller_parameter_texts = ls_obj_new-wdyc-cpart
context_nodes = ls_obj_new-wdyc-cnode
context_attributes = ls_obj_new-wdyc-cattr
context_mappings = ls_obj_new-wdyc-cmapp
controller_exceptions = ls_obj_new-wdyc-excp
controller_exception_texts = ls_obj_new-wdyc-excpt
fieldgroups = ls_obj_new-wdyc-fgrps.
APPEND is_controller-definition TO ls_obj_old-wdyc-defin.
LOOP AT gt_components ASSIGNING <ls_component>
@ -4317,14 +4283,14 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
ls_obj_old-wdyc-cnode = is_controller-context_nodes.
ls_obj_old-wdyc-cattr = is_controller-context_attributes.
ls_obj_old-wdyc-cmapp = is_controller-context_mappings.
ls_obj_old-wdyc-excp = is_controller-controller_exceptions.
ls_obj_old-wdyc-excp = is_controller-controller_exceptions.
ls_obj_old-wdyc-excpt = is_controller-controller_exception_texts.
ls_obj_old-wdyc-fgrps = is_controller-fieldgroups.
CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA'
EXPORTING
obj_old = ls_obj_old
obj_new = ls_obj_new
obj_old = ls_obj_new
obj_new = ls_obj_old
CHANGING
delta = rs_delta
EXCEPTIONS
@ -4373,32 +4339,6 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
ls_obj_old-objtype = wdyn_limu_component_view.
ls_obj_old-objname = ls_key.
CALL FUNCTION 'WDYV_GET_OBJECT'
EXPORTING
view_key = ls_key
get_all_translations = abap_false
TABLES
definition = ls_obj_new-wdyv-defin
descriptions = ls_obj_new-wdyv-descr
view_containers = ls_obj_new-wdyv-vcont
view_container_texts = ls_obj_new-wdyv-vcntt
iobound_plugs = ls_obj_new-wdyv-ibplg
iobound_plug_texts = ls_obj_new-wdyv-ibplt
plug_parameters = ls_obj_new-wdyv-plpar
plug_parameter_texts = ls_obj_new-wdyv-plprt
ui_elements = ls_obj_new-wdyv-uiele
ui_context_bindings = ls_obj_new-wdyv-uicon
ui_event_bindings = ls_obj_new-wdyv-uievt
ui_ddic_bindings = ls_obj_new-wdyv-uiddc
ui_properties = ls_obj_new-wdyv-uiprp
navigation_links = ls_obj_new-wdyv-navil
navigation_target_refs = ls_obj_new-wdyv-navit
vsh_nodes = ls_obj_new-wdyv-vshno
vsh_placeholders = ls_obj_new-wdyv-vshpl
viewset_properties = ls_obj_new-wdyv-views
psmodilog = lt_psmodilog
psmodisrc = lt_psmodisrc.
APPEND INITIAL LINE TO ls_obj_old-wdyv-defin ASSIGNING <ls_def>.
MOVE-CORRESPONDING is_view-definition TO <ls_def>.
@ -4422,8 +4362,8 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA'
EXPORTING
obj_old = ls_obj_old
obj_new = ls_obj_new
obj_old = ls_obj_new
obj_new = ls_obj_old
CHANGING
delta = rs_delta
EXCEPTIONS
@ -4541,7 +4481,7 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
ENDMETHOD.
METHOD read_definition.
METHOD read_definition.
DATA: lt_definition TYPE TABLE OF wdy_component.
@ -4725,18 +4665,23 @@ CLASS lcl_object_wdyn IMPLEMENTATION.
CHANGING
ct_table = gt_sources ).
ls_component-comp_metadata-definition-author = sy-uname.
ls_component-comp_metadata-definition-createdon = sy-datum.
recover_definition( ls_component-comp_metadata ).
LOOP AT ls_component-ctlr_metadata ASSIGNING <ls_controller>.
<ls_controller>-definition-author = sy-uname.
<ls_controller>-definition-createdon = sy-datum.
recover_controller( <ls_controller> ).
ENDLOOP.
LOOP AT ls_component-view_metadata ASSIGNING <ls_view>.
<ls_view>-definition-author = sy-uname.
<ls_view>-definition-createdon = sy-datum.
recover_view( <ls_view> ).
ENDLOOP.
* todo, activate
* _raise 'todo, wdyn'.
activation_add( iv_type = is_item-obj_type
iv_name = is_item-obj_name ).
ENDMETHOD.
@ -5442,7 +5387,7 @@ CLASS lcl_object_tabl IMPLEMENTATION.
EXCEPTIONS
not_executed = 1
object_not_found = 2
object_not_specified = 3
object_not_specified = 3
permission_failure = 4.
IF sy-subrc <> 0.
_raise 'error from RS_DD_DELETE_OBJ, TABL'.
@ -5460,7 +5405,7 @@ CLASS lcl_object_tabl IMPLEMENTATION.
lt_dd03p TYPE TABLE OF dd03p,
lt_dd05m TYPE TABLE OF dd05m,
lt_dd08v TYPE TABLE OF dd08v,
lt_dd12v TYPE dd12vtab,
lt_dd12v TYPE dd12vtab,
lt_dd17v TYPE dd17vtab,
lt_dd35v TYPE TABLE OF dd35v,
lt_dd36m TYPE dd36mttyp.
@ -7726,7 +7671,7 @@ CLASS lcl_object_prog IMPLEMENTATION.
lo_xml = read_xml( is_item = is_item
it_files = it_files ).
read_abap( EXPORTING is_item = is_item
read_abap( EXPORTING is_item = is_item
it_files = it_files
CHANGING ct_abap = lt_source ).
@ -9231,7 +9176,7 @@ CLASS lcl_pack IMPLEMENTATION.
cl_abap_gzip=>compress_binary(
EXPORTING
raw_in = <ls_object>-data
IMPORTING
IMPORTING
gzip_out = lv_compressed ).
CONCATENATE rv_data c_zlib lv_compressed INTO rv_data IN BYTE MODE.
@ -9239,7 +9184,7 @@ CLASS lcl_pack IMPLEMENTATION.
lv_adler32 = lcl_hash=>adler32( <ls_object>-data ).
CONCATENATE rv_data lv_adler32 INTO rv_data IN BYTE MODE.
ENDLOOP.
ENDLOOP.
lv_sha1 = lcl_hash=>sha1_raw( rv_data ).
CONCATENATE rv_data lv_sha1 INTO rv_data IN BYTE MODE.
@ -9270,7 +9215,7 @@ CLASS lcl_persistence DEFINITION FINAL.
iv_branch TYPE t_sha1 OPTIONAL
iv_package TYPE devclass
iv_offline TYPE sap_bool DEFAULT abap_false
RAISING lcx_exception.
RAISING lcx_exception.
CLASS-METHODS validate_package
IMPORTING iv_package TYPE devclass
@ -9714,7 +9659,7 @@ CLASS lcl_transport IMPLEMENTATION.
ii_client->request->set_header_field(
name = '~request_method'
name = '~request_method'
value = 'POST' ).
lv_value = lcl_url=>path_name( is_repo-url ) && '.git/git-' && iv_service && '-pack'.
@ -10257,7 +10202,7 @@ CLASS lcl_zip IMPLEMENTATION.
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
@ -10428,7 +10373,7 @@ CLASS lcl_zip IMPLEMENTATION.
<ls_file>-filename = filename( <ls_splice>-name ).
<ls_file>-data = lv_xstr.
ENDLOOP.
ENDLOOP.
ENDMETHOD. "decode_files
@ -10636,7 +10581,7 @@ CLASS lcl_porcelain DEFINITION FINAL.
RETURNING VALUE(rt_nodes) TYPE tt_nodes
RAISING lcx_exception.
CLASS-METHODS receive_pack
CLASS-METHODS receive_pack
IMPORTING is_comment TYPE st_comment
is_repo TYPE st_repo
it_nodes TYPE tt_nodes
@ -11444,7 +11389,7 @@ CLASS lcl_gui IMPLEMENTATION.
MESSAGE lx_exception->mv_text TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
ENDMETHOD. "on_event
ENDMETHOD. "on_event
METHOD uninstall.
@ -11571,7 +11516,7 @@ CLASS lcl_gui IMPLEMENTATION.
MOVE-CORRESPONDING is_repo_persi TO ls_repo.
lv_branch = lcl_porcelain=>push( is_comment = ls_comment
is_repo = ls_repo
is_repo = ls_repo
it_files = lt_files ).
lcl_persistence=>update( is_repo = ls_repo
@ -11850,7 +11795,7 @@ CLASS lcl_gui IMPLEMENTATION.
LOOP AT lt_repos INTO ls_repo.
lv_f = ( sy-tabix / lines( lt_repos ) ) * 100.
lv_pct = lv_f.
IF lv_pct = 100.
IF lv_pct = 100.
lv_pct = 99.
ENDIF.
lv_text = repo_name( ls_repo ).
@ -12658,7 +12603,7 @@ CLASS ltcl_abap_unit IMPLEMENTATION.
DATA: lt_objects TYPE tt_objects,
ls_object LIKE LINE OF lt_objects,
lt_nodes TYPE tt_nodes,
lt_nodes TYPE tt_nodes,
ls_node LIKE LINE OF lt_nodes,
ls_commit TYPE st_commit,
lt_result TYPE tt_objects,
@ -12727,7 +12672,7 @@ CLASS ltcl_abap_unit IMPLEMENTATION.
ls_object-sha1 = lcl_hash=>sha1( iv_type = gc_blob
iv_data = lv_data ).
ls_object-type = gc_blob.
ls_object-data = lv_data.
ls_object-data = lv_data.
APPEND ls_object TO lt_objects.
CLEAR lv_data.
@ -12782,7 +12727,7 @@ CLASS ltcl_abap_unit IMPLEMENTATION.
lv_data TYPE xstring,
lt_result TYPE tt_nodes.
CLEAR ls_node.
CLEAR ls_node.
ls_node-chmod = gc_chmod-file.
ls_node-name = 'foobar.txt'.
ls_node-sha1 = lc_sha.