From c276c719d81bba75cab5f9e621afbad493b4c956 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:59:05 -0400 Subject: [PATCH] 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 --- src/objects/zcl_abapgit_object_xslt.clas.abap | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/objects/zcl_abapgit_object_xslt.clas.abap b/src/objects/zcl_abapgit_object_xslt.clas.abap index 8366682f2..576317532 100644 --- a/src/objects/zcl_abapgit_object_xslt.clas.abap +++ b/src/objects/zcl_abapgit_object_xslt.clas.abap @@ -101,6 +101,12 @@ CLASS zcl_abapgit_object_xslt IMPLEMENTATION. lv_len TYPE i, 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. zif_abapgit_object~delete( iv_package ). @@ -186,6 +192,7 @@ CLASS zcl_abapgit_object_xslt IMPLEMENTATION. 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-late TO rt_steps. ENDMETHOD.