mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 04:36:49 +08:00
Merge pull request #439 from sbcgua/master
supported obj types at debugpage
This commit is contained in:
commit
1096bb25a4
|
@ -8,6 +8,10 @@ Legend
|
||||||
+ : added
|
+ : added
|
||||||
- : removed
|
- : removed
|
||||||
|
|
||||||
|
2016-11-??
|
||||||
|
------------------
|
||||||
|
+ supported object list @debugpage
|
||||||
|
|
||||||
2016-11-12
|
2016-11-12
|
||||||
------------------
|
------------------
|
||||||
+ brand new style for file diff display - local and remote statuses are independent and based on local/remote hash and saved state
|
+ brand new style for file diff display - local and remote statuses are independent and based on local/remote hash and saved state
|
||||||
|
|
|
@ -1596,6 +1596,7 @@ CLASS lcl_objects DEFINITION FINAL.
|
||||||
|
|
||||||
CLASS-METHODS is_supported
|
CLASS-METHODS is_supported
|
||||||
IMPORTING is_item TYPE ty_item
|
IMPORTING is_item TYPE ty_item
|
||||||
|
iv_native_only TYPE abap_bool DEFAULT abap_false
|
||||||
RETURNING VALUE(rv_bool) TYPE abap_bool.
|
RETURNING VALUE(rv_bool) TYPE abap_bool.
|
||||||
|
|
||||||
CLASS-METHODS exists
|
CLASS-METHODS exists
|
||||||
|
@ -1621,6 +1622,7 @@ CLASS lcl_objects DEFINITION FINAL.
|
||||||
IMPORTING is_item TYPE ty_item
|
IMPORTING is_item TYPE ty_item
|
||||||
iv_language TYPE spras
|
iv_language TYPE spras
|
||||||
is_metadata TYPE ty_metadata OPTIONAL
|
is_metadata TYPE ty_metadata OPTIONAL
|
||||||
|
iv_native_only TYPE abap_bool DEFAULT abap_false
|
||||||
RETURNING VALUE(ri_obj) TYPE REF TO lif_object
|
RETURNING VALUE(ri_obj) TYPE REF TO lif_object
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
|
|
|
@ -137,17 +137,18 @@ CLASS lcl_objects IMPLEMENTATION.
|
||||||
is_item = is_item
|
is_item = is_item
|
||||||
iv_language = iv_language.
|
iv_language = iv_language.
|
||||||
CATCH cx_sy_create_object_error.
|
CATCH cx_sy_create_object_error.
|
||||||
TRY.
|
lv_message = |Object type { is_item-obj_type } not supported, serialize|. "#EC NOTEXT
|
||||||
* 2nd step, try looking for plugins
|
IF iv_native_only = abap_false.
|
||||||
|
TRY. " 2nd step, try looking for plugins
|
||||||
CREATE OBJECT ri_obj TYPE lcl_objects_bridge
|
CREATE OBJECT ri_obj TYPE lcl_objects_bridge
|
||||||
EXPORTING
|
EXPORTING
|
||||||
is_item = is_item.
|
is_item = is_item.
|
||||||
CATCH cx_sy_create_object_error.
|
CATCH cx_sy_create_object_error.
|
||||||
CONCATENATE 'Object type' is_item-obj_type 'not supported, serialize'
|
|
||||||
INTO lv_message
|
|
||||||
SEPARATED BY space. "#EC NOTEXT
|
|
||||||
lcx_exception=>raise( lv_message ).
|
lcx_exception=>raise( lv_message ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
ELSE. " No native support? -> fail
|
||||||
|
lcx_exception=>raise( lv_message ).
|
||||||
|
ENDIF.
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
ENDMETHOD. "create_object
|
ENDMETHOD. "create_object
|
||||||
|
@ -169,7 +170,8 @@ CLASS lcl_objects IMPLEMENTATION.
|
||||||
|
|
||||||
TRY.
|
TRY.
|
||||||
create_object( is_item = is_item
|
create_object( is_item = is_item
|
||||||
iv_language = gc_english ).
|
iv_language = gc_english
|
||||||
|
iv_native_only = iv_native_only ).
|
||||||
rv_bool = abap_true.
|
rv_bool = abap_true.
|
||||||
CATCH lcx_exception.
|
CATCH lcx_exception.
|
||||||
rv_bool = abap_false.
|
rv_bool = abap_false.
|
||||||
|
|
|
@ -277,11 +277,8 @@ CLASS lcl_gui_page_super IMPLEMENTATION.
|
||||||
|
|
||||||
_add 'function debugOutput(text, dstID) {'. "#EC NOTEXT
|
_add 'function debugOutput(text, dstID) {'. "#EC NOTEXT
|
||||||
_add ' var stdout = document.getElementById(dstID || "stdout");'. "#EC NOTEXT
|
_add ' var stdout = document.getElementById(dstID || "stdout");'. "#EC NOTEXT
|
||||||
_add ' if (stdout.innerHTML == "") {'. "#EC NOTEXT
|
_add ' var wrapped = "<p>" + text + "</p>";'. "#EC NOTEXT
|
||||||
_add ' stdout.innerHTML = text;'. "#EC NOTEXT
|
_add ' stdout.innerHTML = stdout.innerHTML + wrapped;'. "#EC NOTEXT
|
||||||
_add ' } else {'. "#EC NOTEXT
|
|
||||||
_add ' stdout.innerHTML = stdout.innerHTML + "<br>" + text;'. "#EC NOTEXT
|
|
||||||
_add ' }'. "#EC NOTEXT
|
|
||||||
_add '}'. "#EC NOTEXT
|
_add '}'. "#EC NOTEXT
|
||||||
|
|
||||||
_add 'function submitForm(params, action) {'. "#EC NOTEXT
|
_add 'function submitForm(params, action) {'. "#EC NOTEXT
|
||||||
|
|
|
@ -14,6 +14,8 @@ CLASS lcl_gui_page_debuginfo DEFINITION FINAL INHERITING FROM lcl_gui_page_super
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
METHODS render_debug_info
|
METHODS render_debug_info
|
||||||
RETURNING VALUE(ro_html) TYPE REF TO lcl_html_helper.
|
RETURNING VALUE(ro_html) TYPE REF TO lcl_html_helper.
|
||||||
|
METHODS render_supported_object_types
|
||||||
|
RETURNING VALUE(rv_html) TYPE string.
|
||||||
|
|
||||||
ENDCLASS. "lcl_gui_page_debuginfo
|
ENDCLASS. "lcl_gui_page_debuginfo
|
||||||
|
|
||||||
|
@ -25,7 +27,12 @@ CLASS lcl_gui_page_debuginfo IMPLEMENTATION.
|
||||||
|
|
||||||
ro_html->add( header( io_include_style = styles( ) ) ).
|
ro_html->add( header( io_include_style = styles( ) ) ).
|
||||||
ro_html->add( title( 'DEBUG INFO' ) ).
|
ro_html->add( title( 'DEBUG INFO' ) ).
|
||||||
|
|
||||||
|
ro_html->add( '<div id="debug_info" class="debug_container">' ).
|
||||||
ro_html->add( render_debug_info( ) ).
|
ro_html->add( render_debug_info( ) ).
|
||||||
|
ro_html->add( render_supported_object_types( ) ).
|
||||||
|
ro_html->add( '</div>' ).
|
||||||
|
|
||||||
ro_html->add( footer( io_include_script = scripts( ) ) ).
|
ro_html->add( footer( io_include_script = scripts( ) ) ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
@ -47,14 +54,41 @@ CLASS lcl_gui_page_debuginfo IMPLEMENTATION.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ro_html.
|
||||||
|
|
||||||
ro_html->add( '<div id="debug_info" class="debug_container">' ).
|
ro_html->add( |<p>abapGit version: { gc_abap_version }</p>| ).
|
||||||
ro_html->add( |abapGit version: { gc_abap_version }<br>| ).
|
ro_html->add( |<p>XML version: { gc_xml_version }</p>| ).
|
||||||
ro_html->add( |XML version: { gc_xml_version }<br>| ).
|
ro_html->add( |<p>GUI version: { lv_gui_version }</p>| ).
|
||||||
ro_html->add( |GUI version: { lv_gui_version }| ).
|
|
||||||
ro_html->add( '</div>' ).
|
|
||||||
|
|
||||||
ENDMETHOD. "render_debug_info
|
ENDMETHOD. "render_debug_info
|
||||||
|
|
||||||
|
METHOD render_supported_object_types.
|
||||||
|
|
||||||
|
DATA: lt_objects TYPE STANDARD TABLE OF ko100,
|
||||||
|
lv_list TYPE string,
|
||||||
|
ls_item TYPE ty_item.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS <object> LIKE LINE OF lt_objects.
|
||||||
|
|
||||||
|
CALL FUNCTION 'TR_OBJECT_TABLE'
|
||||||
|
TABLES
|
||||||
|
wt_object_text = lt_objects
|
||||||
|
EXCEPTIONS
|
||||||
|
OTHERS = 1.
|
||||||
|
|
||||||
|
LOOP AT lt_objects ASSIGNING <object> WHERE pgmid = 'R3TR'.
|
||||||
|
ls_item-obj_type = <object>-object.
|
||||||
|
IF lcl_objects=>is_supported( is_item = ls_item iv_native_only = abap_true ) = abap_true.
|
||||||
|
IF lv_list IS INITIAL.
|
||||||
|
lv_list = ls_item-obj_type.
|
||||||
|
ELSE.
|
||||||
|
lv_list = lv_list && `, ` && ls_item-obj_type.
|
||||||
|
ENDIF.
|
||||||
|
ENDIF.
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
|
rv_html = |</p>Supported objects: { lv_list }</p>|.
|
||||||
|
|
||||||
|
ENDMETHOD. " render_supported_object_types
|
||||||
|
|
||||||
METHOD styles.
|
METHOD styles.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ro_html.
|
||||||
|
@ -66,6 +100,9 @@ CLASS lcl_gui_page_debuginfo IMPLEMENTATION.
|
||||||
_add ' color: #444;'.
|
_add ' color: #444;'.
|
||||||
_add ' font-family: Consolas, Courier, monospace;'.
|
_add ' font-family: Consolas, Courier, monospace;'.
|
||||||
_add '}'.
|
_add '}'.
|
||||||
|
_add 'div.debug_container p {'.
|
||||||
|
_add ' margin: 0px;'.
|
||||||
|
_add '}'.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user