Skip to content

Commit 19067a6

Browse files
authored
refactoring (#501)
* refactoring * update * update * fixes abaplint * Update abaplint.jsonc
1 parent dd3e645 commit 19067a6

File tree

241 files changed

+1440
-1619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+1440
-1619
lines changed

src/00/z2ui5_cl_demo_app_326.clas.abap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CLASS z2ui5_cl_demo_app_326 DEFINITION PUBLIC CREATE PUBLIC.
55

66
DATA unit TYPE meins.
77
DATA numc TYPE z2ui5_numc12.
8-
DATA check_initialized TYPE abap_bool.
8+
99

1010
PROTECTED SECTION.
1111
DATA client TYPE REF TO z2ui5_if_client.
@@ -30,8 +30,7 @@ CLASS z2ui5_cl_demo_app_326 IMPLEMENTATION.
3030

3131
me->client = client.
3232

33-
IF check_initialized = abap_false.
34-
check_initialized = abap_true.
33+
IF client->check_on_init( ).
3534
display_view( client ).
3635
z2ui5_set_data( ).
3736
ENDIF.

src/01/z2ui5_cl_demo_app_lp_01.clas.abap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CLASS z2ui5_cl_demo_app_lp_01 DEFINITION PUBLIC.
33
PUBLIC SECTION.
44
INTERFACES z2ui5_if_app.
55

6-
DATA check_initialized TYPE abap_bool.
6+
77

88
PROTECTED SECTION.
99
PRIVATE SECTION.
@@ -12,16 +12,16 @@ ENDCLASS.
1212

1313
CLASS z2ui5_cl_demo_app_lp_01 IMPLEMENTATION.
1414
METHOD z2ui5_if_app~main.
15-
IF check_initialized = abap_false.
16-
check_initialized = abap_true.
15+
IF client->check_on_init( ).
1716

1817
IF client->get( )-check_launchpad_active = abap_false.
1918
client->message_box_display( `No Launchpad Active, Sample not working!` ).
2019
ENDIF.
2120

2221
DATA(view) = z2ui5_cl_xml_view=>factory( ).
2322
DATA(page) = view->shell( )->page( showheader = abap_false ).
24-
client->view_display( page->simple_form( title = 'Laucnhpad I - Read Startup Parameters' editable = abap_true
23+
client->view_display( page->simple_form( title = 'Laucnhpad I - Read Startup Parameters'
24+
editable = abap_true
2525
)->content( 'form'
2626
)->label( ``
2727
)->button( text = 'Read Parameters'

src/01/z2ui5_cl_demo_app_lp_02.clas.abap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_lp_02 DEFINITION PUBLIC.
44
INTERFACES z2ui5_if_app.
55

66
DATA mv_title TYPE string VALUE `my title`.
7-
DATA check_initialized TYPE abap_bool.
7+
88

99
PROTECTED SECTION.
1010

@@ -17,22 +17,22 @@ CLASS Z2UI5_CL_DEMO_APP_LP_02 IMPLEMENTATION.
1717

1818

1919
METHOD z2ui5_if_app~main.
20-
IF check_initialized = abap_false.
21-
check_initialized = abap_true.
20+
IF client->check_on_init( ).
2221

2322
IF client->get( )-check_launchpad_active = abap_false.
2423
client->message_box_display( `No Launchpad Active, Sample not working!` ).
2524
ENDIF.
2625

2726
DATA(shell) = z2ui5_cl_xml_view=>factory( )->shell( ).
2827
IF client->get( )-check_launchpad_active = abap_true.
29-
DATA(page) = shell->page( showheader = abap_false ).
30-
page->_z2ui5( )->lp_title( client->_bind_edit( mv_title ) ).
28+
DATA(page) = shell->page( showheader = abap_false ).
29+
page->_z2ui5( )->lp_title( client->_bind_edit( mv_title ) ).
3130
ELSE.
32-
page = shell->page( title = client->_bind_edit( mv_title ) ).
31+
page = shell->page( title = client->_bind_edit( mv_title ) ).
3332
ENDIF.
3433

35-
client->view_display( page->simple_form( title = 'Set Launchpad Title Dynamically' editable = abap_true
34+
client->view_display( page->simple_form( title = 'Set Launchpad Title Dynamically'
35+
editable = abap_true
3636
)->content( 'form'
3737
)->label( ``
3838
)->input( client->_bind_edit( mv_title )
@@ -42,7 +42,7 @@ CLASS Z2UI5_CL_DEMO_APP_LP_02 IMPLEMENTATION.
4242

4343
ENDIF.
4444

45-
CASE client->get( )-event.
45+
CASE client->get( )-event.
4646

4747
WHEN 'READ_PARAMS'.
4848
DATA(lv_text) = `Start Parameter: `.

src/01/z2ui5_cl_demo_app_lp_03.clas.abap

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CLASS z2ui5_cl_demo_app_lp_03 DEFINITION PUBLIC.
66

77
* DATA product TYPE string.
88
* DATA quantity TYPE string.
9-
DATA check_initialized TYPE abap_bool.
9+
1010

1111
DATA:
1212
BEGIN OF nav_params,
@@ -27,8 +27,7 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION.
2727

2828
DATA(lt_startup_params) = client->get( )-s_config-t_startup_params.
2929

30-
IF check_initialized = abap_false.
31-
check_initialized = abap_true.
30+
IF client->check_on_init( ).
3231

3332
nav_params-product = '102343333'.
3433

@@ -39,26 +38,28 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION.
3938
DATA(view) = z2ui5_cl_xml_view=>factory( ).
4039
client->view_display( view->shell(
4140
)->page(
42-
showheader = xsdbool( abap_false = client->get( )-check_launchpad_active )
41+
showheader = xsdbool( abap_false = client->get( )-check_launchpad_active )
4342
title = 'abap2UI5 - Cross App Navigation App 127 - This App only works when started via Launchpad'
4443
navbuttonpress = client->_event( val = 'BACK' )
45-
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
44+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
4645
)->header_content(
4746
)->link(
48-
text = 'Source_Code'
47+
text = 'Source_Code'
4948

5049
target = '_blank'
5150
)->get_parent(
52-
)->simple_form( title = 'App 127' editable = abap_true
51+
)->simple_form( title = 'App 127'
52+
editable = abap_true
5353
)->content( 'form'
5454
)->label( `Product`
5555
)->input( client->_bind_edit( nav_params-product )
56-
)->button( text = 'BACK' press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
56+
)->button( text = 'BACK'
57+
press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
5758
)->button(
5859
text = 'go to app 128'
5960
press = client->_event_client(
60-
val = client->cs_event-cross_app_nav_to_ext
61-
t_arg = VALUE #(
61+
val = client->cs_event-cross_app_nav_to_ext
62+
t_arg = VALUE #(
6263
( `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_04", action: "display" }` )
6364
* ( `{ "Product" : "102343333" }` )
6465
( `$` && client->_bind_edit( nav_params ) )
@@ -75,7 +76,7 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION.
7576
* client->message_toast_display( |{ product } { quantity } - send to the server| ).
7677

7778
WHEN 'BACK'.
78-
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
79+
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
7980

8081
ENDCASE.
8182

src/01/z2ui5_cl_demo_app_lp_04.clas.abap

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CLASS z2ui5_cl_demo_app_lp_04 DEFINITION PUBLIC.
77
DATA product TYPE string.
88
DATA product_url TYPE string.
99
DATA quantity TYPE string.
10-
DATA check_initialized TYPE abap_bool.
10+
1111
DATA check_launchpad_active TYPE abap_bool.
1212

1313
PROTECTED SECTION.
@@ -23,46 +23,47 @@ CLASS z2ui5_cl_demo_app_lp_04 IMPLEMENTATION.
2323

2424
DATA(view) = z2ui5_cl_xml_view=>factory( ).
2525
product_url = z2ui5_cl_util=>url_param_get(
26-
val = `product`
26+
val = `product`
2727
url = client->get( )-s_config-search ).
2828
check_launchpad_active = client->get( )-check_launchpad_active.
2929

30-
data(lt_params) = client->get( )-t_comp_params.
31-
try.
32-
product = lt_params[ n = `PRODUCT` ]-v.
33-
catch cx_root.
34-
endtry.
35-
IF check_initialized = abap_false.
36-
check_initialized = abap_true.
30+
DATA(lt_params) = client->get( )-t_comp_params.
31+
TRY.
32+
product = lt_params[ n = `PRODUCT` ]-v.
33+
CATCH cx_root.
34+
ENDTRY.
35+
IF client->check_on_init( ).
3736

3837
quantity = '500'.
3938

4039
client->view_display( view->shell(
4140
)->page(
42-
showheader = xsdbool( abap_false = client->get( )-check_launchpad_active )
41+
showheader = xsdbool( abap_false = client->get( )-check_launchpad_active )
4342
title = 'abap2UI5 - Cross App Navigation App 128'
4443
navbuttonpress = client->_event( val = 'BACK' )
45-
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
44+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
4645
)->header_content(
4746
)->link(
48-
text = 'Source_Code'
47+
text = 'Source_Code'
4948

5049
target = '_blank'
5150
)->get_parent(
52-
)->simple_form( title = 'App 128' editable = abap_true
51+
)->simple_form( title = 'App 128'
52+
editable = abap_true
5353
)->content( 'form'
5454
)->title( 'Input'
5555
)->label( 'product nav param'
5656
)->input( client->_bind_edit( product )
5757
)->label( `CHECK_LAUNCHPAD_ACTIVE`
5858
)->input( check_launchpad_active
59-
)->button( press = client->_event( )
60-
)->button( text = 'BACK' press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
59+
)->button( press = client->_event( )
60+
)->button( text = 'BACK'
61+
press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
6162
)->button(
6263
text = 'go to app 127'
6364
press = client->_event_client(
64-
val = client->cs_event-cross_app_nav_to_ext
65-
t_arg = VALUE #( ( `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_03", action: "display" }` ) ( `{ ProductID : "123234" }`) )
65+
val = client->cs_event-cross_app_nav_to_ext
66+
t_arg = VALUE #( ( `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_03", action: "display" }` ) ( `{ ProductID : "123234" }`) )
6667
)
6768
)->stringify( ) ).
6869

@@ -77,7 +78,7 @@ CLASS z2ui5_cl_demo_app_lp_04 IMPLEMENTATION.
7778
* client->message_toast_display( |{ product } { quantity } - send to the server| ).
7879

7980
WHEN 'BACK'.
80-
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
81+
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
8182

8283
ENDCASE.
8384

0 commit comments

Comments
 (0)