Naming of class constants - Part 2 (#4983)

Ref #4945

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2021-10-01 02:04:36 -04:00 committed by GitHub
parent 4b324effdf
commit cfb185b87c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -400,19 +400,19 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
lv_longtext = ix_error->if_message~get_longtext( abap_true ). lv_longtext = ix_error->if_message~get_longtext( abap_true ).
REPLACE FIRST OCCURRENCE OF REGEX REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>gc_section_text-cause }{ cl_abap_char_utilities=>newline })| |({ zcx_abapgit_exception=>c_section_text-cause }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|. IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>gc_section_text-system_response }{ cl_abap_char_utilities=>newline })| |({ zcx_abapgit_exception=>c_section_text-system_response }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|. IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>gc_section_text-what_to_do }{ cl_abap_char_utilities=>newline })| |({ zcx_abapgit_exception=>c_section_text-what_to_do }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|. IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>gc_section_text-sys_admin }{ cl_abap_char_utilities=>newline })| |({ zcx_abapgit_exception=>c_section_text-sys_admin }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|. IN lv_longtext WITH |<h3>$1</h3>|.
ri_html->add( |<div id="message" class="message-panel">| ). ri_html->add( |<div id="message" class="message-panel">| ).

View File

@ -9,19 +9,19 @@ CLASS zcx_abapgit_exception DEFINITION
INTERFACES if_t100_message . INTERFACES if_t100_message .
CONSTANTS: CONSTANTS:
BEGIN OF gc_section_text, BEGIN OF c_section_text,
cause TYPE string VALUE `Cause`, cause TYPE string VALUE `Cause`,
system_response TYPE string VALUE `System response`, system_response TYPE string VALUE `System response`,
what_to_do TYPE string VALUE `Procedure`, what_to_do TYPE string VALUE `Procedure`,
sys_admin TYPE string VALUE `System administration`, sys_admin TYPE string VALUE `System administration`,
END OF gc_section_text . END OF c_section_text .
CONSTANTS: CONSTANTS:
BEGIN OF gc_section_token, BEGIN OF c_section_token,
cause TYPE string VALUE `&CAUSE&`, cause TYPE string VALUE `&CAUSE&`,
system_response TYPE string VALUE `&SYSTEM_RESPONSE&`, system_response TYPE string VALUE `&SYSTEM_RESPONSE&`,
what_to_do TYPE string VALUE `&WHAT_TO_DO&`, what_to_do TYPE string VALUE `&WHAT_TO_DO&`,
sys_admin TYPE string VALUE `&SYS_ADMIN&`, sys_admin TYPE string VALUE `&SYS_ADMIN&`,
END OF gc_section_token . END OF c_section_token .
DATA msgv1 TYPE symsgv READ-ONLY . DATA msgv1 TYPE symsgv READ-ONLY .
DATA msgv2 TYPE symsgv READ-ONLY . DATA msgv2 TYPE symsgv READ-ONLY .
DATA msgv3 TYPE symsgv READ-ONLY . DATA msgv3 TYPE symsgv READ-ONLY .
@ -356,14 +356,14 @@ CLASS zcx_abapgit_exception IMPLEMENTATION.
METHOD replace_section_head_with_text. METHOD replace_section_head_with_text.
CASE cs_itf-tdline. CASE cs_itf-tdline.
WHEN gc_section_token-cause. WHEN c_section_token-cause.
cs_itf-tdline = gc_section_text-cause. cs_itf-tdline = c_section_text-cause.
WHEN gc_section_token-system_response. WHEN c_section_token-system_response.
cs_itf-tdline = gc_section_text-system_response. cs_itf-tdline = c_section_text-system_response.
WHEN gc_section_token-what_to_do. WHEN c_section_token-what_to_do.
cs_itf-tdline = gc_section_text-what_to_do. cs_itf-tdline = c_section_text-what_to_do.
WHEN gc_section_token-sys_admin. WHEN c_section_token-sys_admin.
cs_itf-tdline = gc_section_text-sys_admin. cs_itf-tdline = c_section_text-sys_admin.
ENDCASE. ENDCASE.
ENDMETHOD. ENDMETHOD.