anchor.diff:          _raise 'Error from CL_ENH_FACTORY'.
       ENDTRY.
       lv_tool = li_enh_tool->get_tool( ).
  -    IF lv_tool <> cl_enh_tool_badi_impl=>tooltype.
  -      _raise 'Unsupported ENHO type'.
  -    ENDIF.
  -    lo_badi_impl ?= li_enh_tool.
  -
  -    lv_shorttext = lo_badi_impl->if_enh_object_docu~get_shorttext( ).
  -    lv_spot_name = lo_badi_impl->get_spot_name( ).
  -    lt_impl      = lo_badi_impl->get_implementations( ).
  -
  -    CREATE OBJECT lo_xml.
  -    lo_xml->element_add( lv_tool ).
  -    lo_xml->element_add( ig_element = lv_shorttext
  -                         iv_name    = 'SHORTTEXT' ).
  -    lo_xml->element_add( lv_spot_name ).
  -    lo_xml->table_add( lt_impl ).
  -    mo_files->add_xml( lo_xml ).
  +
  +    CASE lv_tool.
  +      WHEN cl_enh_tool_badi_impl=>tooltype.
  +        serialize_badi( iv_tool = lv_tool
  +                        ii_enh_tool = li_enh_tool ).
  +      WHEN cl_enh_tool_hook_impl=>tooltype.
  +        serialize_hook( iv_tool = lv_tool
  +                        ii_enh_tool = li_enh_tool ).
  +* ToDo:
  +*      WHEN cl_enh_tool_class=>tooltype.
  +*      WHEN 'ENHFUGRDATA'. "cl_enh_tool_fugr
  +*      WHEN cl_enh_tool_intf=>tooltype.
  +*      WHEN cl_wdr_cfg_enhancement=>tooltype.
  +*      WHEN 'ENHWDYN'. "cl_enh_tool_wdy
  +      WHEN OTHERS.
  +        _raise 'Unsupported ENHO type'.
  +    ENDCASE.
  +
  +
   
     ENDMETHOD.                    "serialize
   
  
positive.code: 
      DATA: ls_tadir TYPE tadir.
  
  * todo, this looks wrong
      ls_tadir = lcl_tadir=>read_single(
        iv_object   = ms_item-obj_type
        iv_obj_name = ms_item-obj_name ).
      IF ls_tadir IS INITIAL.
        rv_bool = abap_false.
      ELSE.
        rv_bool = abap_true.
      ENDIF.
  
    ENDMETHOD.
  
    METHOD lif_object~serialize.
  
negative.code:       IMPORTING io_xml     TYPE REF TO lcl_xml
                  iv_package TYPE devclass
        RAISING   lcx_exception.
      METHODS deserialize_hook
        IMPORTING io_xml     TYPE REF TO lcl_xml
                  iv_package TYPE devclass
        RAISING   lcx_exception.
  
      METHODS serialize_badi
        IMPORTING iv_tool     TYPE enhtooltype
                  ii_enh_tool TYPE REF TO if_enh_tool.
      METHODS serialize_hook
        IMPORTING iv_tool     TYPE enhtooltype
                  ii_enh_tool TYPE REF TO if_enh_tool.
  ENDCLASS.                    "lcl_object_enho DEFINITION
  
  *----------------------------------------------------------------------*
  