Giter VIP home page Giter VIP logo

local-to-global's People

Contributors

dependabot[bot] avatar larshp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

local-to-global's Issues

CROSS testing

REPORT zwbcrossgt.

START-OF-SELECTION.
  PERFORM run.

FORM run.

  DATA: lt_cross TYPE wbcrossgtt.

  SELECT * FROM wbcrossgt INTO TABLE lt_cross
    WHERE include LIKE 'ZCL_ABAPGIT_%'
    AND name LIKE 'Z%'.
  SELECT * FROM tadir INTO TABLE @DATA(lt_tadir)
    WHERE devclass = '$AGLOBAL'.

  LOOP AT lt_tadir INTO DATA(ls_tadir) WHERE object = 'CLAS'.
    DATA(lt_includes) = cl_oo_classname_service=>get_all_class_includes(
      CONV #( ls_tadir-obj_name ) ).

    LOOP AT lt_includes INTO DATA(lv_include).
      LOOP AT lt_cross ASSIGNING FIELD-SYMBOL(<ls_cross>) WHERE include = lv_include.
        <ls_cross>-include = ls_tadir-obj_name.
      ENDLOOP.
    ENDLOOP.
  ENDLOOP.

  LOOP AT lt_cross ASSIGNING <ls_cross>.
    DATA(lv_index) = sy-tabix.

    IF <ls_cross>-name CA '\'.
      SPLIT <ls_cross>-name AT '\' INTO <ls_cross>-name DATA(lv_foo).
    ENDIF.
    IF <ls_cross>-name = <ls_cross>-include.
      DELETE lt_cross INDEX lv_index.
    ENDIF.
  ENDLOOP.

  SORT lt_cross BY name ASCENDING include ASCENDING.
  DELETE ADJACENT DUPLICATES FROM lt_cross COMPARING name include.

  WRITE: / lines( lt_cross ).

  PERFORM result USING lt_cross.

ENDFORM.

FORM result USING pt_cross TYPE wbcrossgtt.

  DATA: lt_result TYPE STANDARD TABLE OF text200 WITH DEFAULT KEY,
        lv_rc     LIKE sy-subrc.


  LOOP AT pt_cross INTO DATA(ls_cross).
    APPEND |{ ls_cross-include } -> { ls_cross-name }| TO lt_result.
  ENDLOOP.

  cl_gui_frontend_services=>clipboard_export(
    IMPORTING
      data                 = lt_result
    CHANGING
      rc                   = lv_rc
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      no_authority         = 4
      OTHERS               = 5 ).
  IF sy-subrc <> 0.
    WRITE: / 'error', sy-subrc.
  ENDIF.
  WRITE: / lv_rc.

ENDFORM.

approach

  • ignore FOR TESTING classes
  • exception classes are difficult?

1: extract classes definition + implementation
2: rename class
3: add "PUBLIC"
4: rename usages, heuristic?
5: comments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.