XSLT: Add late activation (#5003)

* XSLT: Add late activation 

In case a transformation depends on other objects like a class, the transformation will not activate if it's deserialized before the dependent objects. 

This change adds the transformation to the late activation step.

* lint

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2021-10-04 10:59:05 -04:00 committed by GitHub
parent a223df0292
commit c276c719d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,12 @@ CLASS zcl_abapgit_object_xslt IMPLEMENTATION.
lv_len TYPE i, lv_len TYPE i,
ls_attributes TYPE o2xsltattr. ls_attributes TYPE o2xsltattr.
" Transformation might depend on other objects like a class
" We attempt to activate it in late step
IF iv_step = zif_abapgit_object=>gc_step_id-late.
zcl_abapgit_objects_activation=>add_item( ms_item ).
RETURN.
ENDIF.
IF zif_abapgit_object~exists( ) = abap_true. IF zif_abapgit_object~exists( ) = abap_true.
zif_abapgit_object~delete( iv_package ). zif_abapgit_object~delete( iv_package ).
@ -186,6 +192,7 @@ CLASS zcl_abapgit_object_xslt IMPLEMENTATION.
METHOD zif_abapgit_object~get_deserialize_steps. METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps. APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ENDMETHOD. ENDMETHOD.