diff --git a/.claude/skills/view-chain-layout/SKILL.md b/.claude/skills/view-chain-layout/SKILL.md index 15a07ff..60f342e 100644 --- a/.claude/skills/view-chain-layout/SKILL.md +++ b/.claude/skills/view-chain-layout/SKILL.md @@ -15,7 +15,7 @@ tree a line sits, so it has to be true. after a survey found the two sample corpora following opposite conventions for the same builder. -## The six rules +## The seven rules 1. **One call per line.** Every `ele( )`, `tag( )`, `a( )` and `end( )` opens its own line with `)->`. A control never shares its line with its own @@ -32,6 +32,18 @@ the same builder. attribute block. 6. **`stringify( )` is a standalone final statement** — `client->view_display( view->stringify( ) ).`, never nested in the chain. +7. **A wrapped `t_arg` list hangs under its FIRST element.** When a + `_event( )` / `follow_up_action( )` argument table runs over several lines, + every continuation line starts in the column of the first `( … )` — not + under the `#` of `VALUE #(`, which is three columns to its left and the + drift this rule exists to stop: + + ```abap + )->a( n = `close` v = client->follow_up_action( val = client->cs_event-control_by_id + t_arg = VALUE #( ( `notificationList` ) + ( `removeItem` ) + ( `$event.oSource.getId()` ) ) ) + ``` ```abap METHOD view_display. @@ -115,7 +127,7 @@ and carries fixes, so `--fix` reformats a drifted chain. The rewrite only ever touches whitespace *between* chain segments and the indent of a continuation line that is not itself content, and it verifies that collapsing every run of code-whitespace leaves the source identical — **a layout fix can never change -what the view builds.** Rules 5-6 and the blank lines stay reviewer-enforced. +what the view builds.** Rules 5-7 and the blank lines stay reviewer-enforced. It is the linter's one **opt-in** rule (`OPT_IN` in its `findings.mjs`): it is not emitted at all until a config asks for it, because it encodes one house diff --git a/src/00/00/z2ui5_cl_smps_context.clas.abap b/src/00/00/z2ui5_cl_smps_context.clas.abap index 229792d..fc81505 100644 --- a/src/00/00/z2ui5_cl_smps_context.clas.abap +++ b/src/00/00/z2ui5_cl_smps_context.clas.abap @@ -302,9 +302,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. text = `The operation failed, no further details available`. ENDIF. - client->message_box_display( - text = text - type = cs_ui5_msg_type-e ). + client->message_box_display( text = text type = cs_ui5_msg_type-e ). ENDMETHOD. @@ -344,8 +342,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. DATA(lt_param) = url_param_get_tab( search ). DELETE lt_param WHERE n = `app_start`. - INSERT VALUE #( n = `app_start` - v = to_lower( classname ) ) INTO TABLE lt_param. + INSERT VALUE #( n = `app_start` v = to_lower( classname ) ) INTO TABLE lt_param. " keep only the launchpad shell part of the hash: the app-owned part " (leading `/` standalone, or everything after `&/` inside the FLP) @@ -356,16 +353,14 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. IF lv_hash IS NOT INITIAL. DATA(lv_content) = lv_hash. IF lv_content(1) = `#`. - lv_content = substring( val = lv_content - off = 1 ). + lv_content = substring( val = lv_content off = 1 ). ENDIF. IF lv_content IS INITIAL OR lv_content(1) = `/`. " pure app hash (route or app-state) - drop it entirely lv_hash = ``. ELSE. " inside the FLP keep the shell part, cut the app part after `&/` - DATA(lv_off) = find( val = lv_content - sub = `&/` ). + DATA(lv_off) = find( val = lv_content sub = `&/` ). IF lv_off = 0. lv_hash = ``. ELSEIF lv_off > 0. @@ -383,10 +378,8 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. METHOD c_trim. result = shift_left( shift_right( CONV string( val ) ) ). - result = shift_right( val = result - sub = cv_char_util_horizontal_tab ). - result = shift_left( val = result - sub = cv_char_util_horizontal_tab ). + result = shift_right( val = result sub = cv_char_util_horizontal_tab ). + result = shift_left( val = result sub = cv_char_util_horizontal_tab ). result = shift_left( shift_right( result ) ). ENDMETHOD. @@ -442,8 +435,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. DATA(lx) = CAST cx_root( val ). DATA(ls_result) = VALUE ty_s_msg( type = `E` text = lx->get_text( ) ). DATA(lt_attri_o) = rtti_get_t_attri_by_oref( val ). - LOOP AT lt_attri_o REFERENCE INTO DATA(ls_attri_o) - WHERE visibility = `U`. + LOOP AT lt_attri_o REFERENCE INTO DATA(ls_attri_o) WHERE visibility = `U`. DATA(lv_name) = ls_attri_o->name. ASSIGN val->(lv_name) TO . IF sy-subrc <> 0. @@ -600,8 +592,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. ENDTRY. ENDIF. ELSE. - INSERT LINES OF msg_get_rap( val = - entity_name = ls_attri->name ) INTO TABLE result. + INSERT LINES OF msg_get_rap( val = entity_name = ls_attri->name ) INTO TABLE result. ENDIF. ENDLOOP. ENDLOOP. @@ -788,9 +779,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. IF entity_name IS NOT INITIAL. lv_text = |{ entity_name }: { lv_text }|. ENDIF. - INSERT VALUE #( type = `E` - text = lv_text - t_meta = lt_meta ) INTO TABLE messages. + INSERT VALUE #( type = `E` text = lv_text t_meta = lt_meta ) INTO TABLE messages. ENDIF. ENDIF. @@ -893,8 +882,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. " descriptor instances are singletons per type, so the identity check " guards against absolute names reused by other (local/anonymous) types DATA(lv_absolute_name) = CONV string( lo_struct->absolute_name ). - READ TABLE mt_attri_cache REFERENCE INTO DATA(lr_cache) - WITH TABLE KEY absolute_name = lv_absolute_name. + READ TABLE mt_attri_cache REFERENCE INTO DATA(lr_cache) WITH TABLE KEY absolute_name = lv_absolute_name. IF sy-subrc = 0 AND lr_cache->o_struct = lo_struct. result = lr_cache->t_attri. RETURN. @@ -982,8 +970,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. LOOP AT t_params INTO DATA(ls_param). result = |{ result }{ ls_param-n }={ ls_param-v }&|. ENDLOOP. - result = shift_right( val = result - sub = `&` ). + result = shift_right( val = result sub = `&` ). ENDMETHOD. @@ -1006,17 +993,14 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. with = `&` occ = 0 ). - lv_search = shift_left( val = lv_search - sub = `?` ). + lv_search = shift_left( val = lv_search sub = `?` ). " prepend & before searching so sap-startup-params is also unwrapped " when it is the first/only query parameter (typical FLP target mapping) - DATA(lv_search2) = substring_after( val = |&{ lv_search }| - sub = `&sap-startup-params=` ). + DATA(lv_search2) = substring_after( val = |&{ lv_search }| sub = `&sap-startup-params=` ). lv_search = COND #( WHEN lv_search2 IS NOT INITIAL THEN lv_search2 ELSE lv_search ). - lv_search2 = substring_after( val = lv_search - sub = `?` ). + lv_search2 = substring_after( val = lv_search sub = `?` ). IF lv_search2 IS NOT INITIAL. lv_search = lv_search2. ENDIF. @@ -1034,8 +1018,7 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. " normalize the name so lookups are case-insensitive on every input " shape (with or without a leading path/question mark) - the value " keeps its original case - INSERT VALUE #( n = c_trim_lower( lv_name ) - v = lv_value ) INTO TABLE rt_params. + INSERT VALUE #( n = c_trim_lower( lv_name ) v = lv_value ) INTO TABLE rt_params. ENDLOOP. ENDMETHOD. diff --git a/src/02/z2ui5_cl_smps_app_313.clas.abap b/src/02/z2ui5_cl_smps_app_313.clas.abap index dd784a7..ea96796 100644 --- a/src/02/z2ui5_cl_smps_app_313.clas.abap +++ b/src/02/z2ui5_cl_smps_app_313.clas.abap @@ -67,8 +67,7 @@ CLASS z2ui5_cl_smps_app_313 IMPLEMENTATION. )->a( n = `enableExport` b = abap_false )->a( n = `enableAutoBinding` b = abap_false ). - client->view_display( val = view->stringify( ) - switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST/` ). + client->view_display( val = view->stringify( ) switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST/` ). ENDIF. diff --git a/src/02/z2ui5_cl_smps_app_314.clas.abap b/src/02/z2ui5_cl_smps_app_314.clas.abap index fe885de..0a786c8 100644 --- a/src/02/z2ui5_cl_smps_app_314.clas.abap +++ b/src/02/z2ui5_cl_smps_app_314.clas.abap @@ -151,8 +151,7 @@ CLASS z2ui5_cl_smps_app_314 IMPLEMENTATION. * )->tag( `Text` )->a( n = `text` v = `{Price}` * )->tag( `Text` )->a( n = `text` v = `{CurrencyCode}` ). - client->view_display( val = view->stringify( ) - switch_default_model_path = `/sap/opu/odata/iwbep/gwsample_basic/` ). + client->view_display( val = view->stringify( ) switch_default_model_path = `/sap/opu/odata/iwbep/gwsample_basic/` ). * switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ). ENDMETHOD. diff --git a/src/02/z2ui5_cl_smps_app_475.clas.abap b/src/02/z2ui5_cl_smps_app_475.clas.abap index d2f17e9..96885ee 100644 --- a/src/02/z2ui5_cl_smps_app_475.clas.abap +++ b/src/02/z2ui5_cl_smps_app_475.clas.abap @@ -63,8 +63,7 @@ CLASS z2ui5_cl_smps_app_475 IMPLEMENTATION. )->a( n = `value` v = `{Price}` )->a( n = `id` v = `idPrice` ). - client->view_display( val = view->stringify( ) - switch_default_model_path = c_odata_service ). + client->view_display( val = view->stringify( ) switch_default_model_path = c_odata_service ). ENDIF. diff --git a/src/02/z2ui5_cl_smps_app_476.clas.abap b/src/02/z2ui5_cl_smps_app_476.clas.abap index 6d3e714..e5aeba8 100644 --- a/src/02/z2ui5_cl_smps_app_476.clas.abap +++ b/src/02/z2ui5_cl_smps_app_476.clas.abap @@ -83,8 +83,7 @@ CLASS z2ui5_cl_smps_app_476 IMPLEMENTATION. )->ele( n = `SmartField` ns = `smartField` )->a( n = `value` v = `{SupplierName}` ). - client->view_display( val = view->stringify( ) - switch_default_model_path = c_odata_service ). + client->view_display( val = view->stringify( ) switch_default_model_path = c_odata_service ). ENDIF. diff --git a/src/02/z2ui5_cl_smps_app_477.clas.abap b/src/02/z2ui5_cl_smps_app_477.clas.abap index 2b27c74..dbf0061 100644 --- a/src/02/z2ui5_cl_smps_app_477.clas.abap +++ b/src/02/z2ui5_cl_smps_app_477.clas.abap @@ -70,8 +70,7 @@ CLASS z2ui5_cl_smps_app_477 IMPLEMENTATION. )->a( n = `enableExport` v = `false` )->a( n = `enableAutoBinding` v = `true` ). - client->view_display( val = view->stringify( ) - switch_default_model_path = c_odata_service ). + client->view_display( val = view->stringify( ) switch_default_model_path = c_odata_service ). ENDIF. diff --git a/src/02/z2ui5_cl_smps_app_478.clas.abap b/src/02/z2ui5_cl_smps_app_478.clas.abap index 1533c69..05159db 100644 --- a/src/02/z2ui5_cl_smps_app_478.clas.abap +++ b/src/02/z2ui5_cl_smps_app_478.clas.abap @@ -89,8 +89,7 @@ CLASS z2ui5_cl_smps_app_478 IMPLEMENTATION. )->a( n = `persistencyKey` v = `SmartTablePKey` )->a( n = `smartVariant` v = `pageVariantId` ). - client->view_display( val = view->stringify( ) - switch_default_model_path = c_odata_service ). + client->view_display( val = view->stringify( ) switch_default_model_path = c_odata_service ). " The handshake a controller would do: without initialise( ) the page variant " never gets a personalizable control, so saving a view dies in sap.ui.fl and diff --git a/src/02/z2ui5_cl_smps_app_479.clas.abap b/src/02/z2ui5_cl_smps_app_479.clas.abap index 17134f4..5836567 100644 --- a/src/02/z2ui5_cl_smps_app_479.clas.abap +++ b/src/02/z2ui5_cl_smps_app_479.clas.abap @@ -59,8 +59,7 @@ CLASS z2ui5_cl_smps_app_479 IMPLEMENTATION. )->a( n = `navigate` v = client->_event( val = `NAVIGATE` t_arg = VALUE #( ( `${$parameters>/text}` ) ) ) ). - client->view_display( val = view->stringify( ) - switch_default_model_path = c_odata_service ). + client->view_display( val = view->stringify( ) switch_default_model_path = c_odata_service ). ELSEIF client->check_on_event( `NAV_TARGETS_OBTAINED` ). " The tutorial answers this event by composing the navigation popover diff --git a/src/03/z2ui5_cl_smps_app_001.clas.abap b/src/03/z2ui5_cl_smps_app_001.clas.abap index 5e53ee8..4ec4f48 100644 --- a/src/03/z2ui5_cl_smps_app_001.clas.abap +++ b/src/03/z2ui5_cl_smps_app_001.clas.abap @@ -66,11 +66,9 @@ CLASS z2ui5_cl_smps_app_001 IMPLEMENTATION. " table, and after a few creates and deletes the lowest key is a " different one. SELECT SINGLE FROM z2ui5_r_smps_trv - FIELDS MIN( TravelId ) - INTO @DATA(first_id). + FIELDS MIN( TravelId ) INTO @DATA(first_id). - travel_id = COND #( WHEN first_id IS NOT INITIAL - THEN |{ first_id ALPHA = OUT }| ). + travel_id = COND #( WHEN first_id IS NOT INITIAL THEN |{ first_id ALPHA = OUT }| ). ENDMETHOD. @@ -86,9 +84,7 @@ CLASS z2ui5_cl_smps_app_001 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. s_travel = VALUE #( ). - client->message_box_display( - text = |Travel { travel_id } does not exist| - type = `error` ). + client->message_box_display( text = |Travel { travel_id } does not exist| type = `error` ). ELSE. diff --git a/src/03/z2ui5_cl_smps_app_003.clas.abap b/src/03/z2ui5_cl_smps_app_003.clas.abap index 2fd586e..0b58e76 100644 --- a/src/03/z2ui5_cl_smps_app_003.clas.abap +++ b/src/03/z2ui5_cl_smps_app_003.clas.abap @@ -65,8 +65,7 @@ CLASS z2ui5_cl_smps_app_003 IMPLEMENTATION. CustomerId, Description ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. t_travels = VALUE #( FOR s_result IN t_result ( travel_id = |{ s_result-travelid ALPHA = OUT }| diff --git a/src/03/z2ui5_cl_smps_app_004.clas.abap b/src/03/z2ui5_cl_smps_app_004.clas.abap index 526ebfc..901fd7b 100644 --- a/src/03/z2ui5_cl_smps_app_004.clas.abap +++ b/src/03/z2ui5_cl_smps_app_004.clas.abap @@ -60,8 +60,7 @@ CLASS z2ui5_cl_smps_app_004 IMPLEMENTATION. CustomerId, Description ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. t_travels = VALUE #( FOR s_result IN t_result ( travel_id = |{ s_result-travelid ALPHA = OUT }| diff --git a/src/03/z2ui5_cl_smps_app_005.clas.abap b/src/03/z2ui5_cl_smps_app_005.clas.abap index 261084f..55848b0 100644 --- a/src/03/z2ui5_cl_smps_app_005.clas.abap +++ b/src/03/z2ui5_cl_smps_app_005.clas.abap @@ -305,8 +305,7 @@ CLASS z2ui5_cl_smps_app_005 IMPLEMENTATION. OverallStatus, Description ORDER BY TravelId DESCENDING - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. t_travels = VALUE #( FOR s_result IN t_result ( travel_id = |{ s_result-travelid ALPHA = OUT }| diff --git a/src/04/z2ui5_cl_smps_app_006.clas.abap b/src/04/z2ui5_cl_smps_app_006.clas.abap index 8a831eb..c7b94a2 100644 --- a/src/04/z2ui5_cl_smps_app_006.clas.abap +++ b/src/04/z2ui5_cl_smps_app_006.clas.abap @@ -75,8 +75,7 @@ CLASS z2ui5_cl_smps_app_006 IMPLEMENTATION. Description, OverallStatus ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. " A draft shares the key of its active instance - only %is_draft tells " the two apart. So reading the keys with %is_draft = on answers the diff --git a/src/04/z2ui5_cl_smps_app_007.clas.abap b/src/04/z2ui5_cl_smps_app_007.clas.abap index cf955ba..a53904e 100644 --- a/src/04/z2ui5_cl_smps_app_007.clas.abap +++ b/src/04/z2ui5_cl_smps_app_007.clas.abap @@ -141,8 +141,7 @@ CLASS z2ui5_cl_smps_app_007 IMPLEMENTATION. TravelId, Description ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. " see z2ui5_cl_smps_app_006 for what this read does - the description is " read along so the table can show the draft next to the active instance diff --git a/src/04/z2ui5_cl_smps_app_008.clas.abap b/src/04/z2ui5_cl_smps_app_008.clas.abap index 274eeca..4951916 100644 --- a/src/04/z2ui5_cl_smps_app_008.clas.abap +++ b/src/04/z2ui5_cl_smps_app_008.clas.abap @@ -108,8 +108,7 @@ CLASS z2ui5_cl_smps_app_008 IMPLEMENTATION. SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. " read the DRAFT instances, not the active ones - so the form below " shows what is currently in the draft, which is what gets changed diff --git a/src/04/z2ui5_cl_smps_app_009.clas.abap b/src/04/z2ui5_cl_smps_app_009.clas.abap index 7abac1b..c027c4d 100644 --- a/src/04/z2ui5_cl_smps_app_009.clas.abap +++ b/src/04/z2ui5_cl_smps_app_009.clas.abap @@ -149,8 +149,7 @@ CLASS z2ui5_cl_smps_app_009 IMPLEMENTATION. SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid ORDER BY TravelId - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel diff --git a/src/04/z2ui5_cl_smps_app_010.clas.abap b/src/04/z2ui5_cl_smps_app_010.clas.abap index 1e336c6..ea4ef58 100644 --- a/src/04/z2ui5_cl_smps_app_010.clas.abap +++ b/src/04/z2ui5_cl_smps_app_010.clas.abap @@ -296,8 +296,7 @@ CLASS z2ui5_cl_smps_app_010 IMPLEMENTATION. overallstatus, description ORDER BY travelid DESCENDING - INTO TABLE @DATA(t_result) - UP TO 20 ROWS. + INTO TABLE @DATA(t_result) UP TO 20 ROWS. " a draft instance shares the key of its active instance - reading " the keys with %is_draft = on reveals which travels have a draft diff --git a/src/06/z2ui5_cl_smps_app_485.clas.abap b/src/06/z2ui5_cl_smps_app_485.clas.abap index ac97716..a4684c3 100644 --- a/src/06/z2ui5_cl_smps_app_485.clas.abap +++ b/src/06/z2ui5_cl_smps_app_485.clas.abap @@ -39,8 +39,7 @@ CLASS z2ui5_cl_smps_app_485 IMPLEMENTATION. METHOD initialize_view. - set_session_stateful( client = client - stateful = abap_true ). + set_session_stateful( client = client stateful = abap_true ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` @@ -111,18 +110,15 @@ CLASS z2ui5_cl_smps_app_485 IMPLEMENTATION. CASE client->get_event( ). WHEN `BACK`. - set_session_stateful( client = client - stateful = abap_false ). + set_session_stateful( client = client stateful = abap_false ). client->nav_app_leave( ). WHEN `LOCK`. lcl_locking=>acquire_lock( ). client->message_toast_display( `Lock acquired. Press 'Refresh lock counter'` ). WHEN `END_SESSION`. - set_session_stateful( client = client - stateful = abap_false ). + set_session_stateful( client = client stateful = abap_false ). WHEN `START_SESSION`. - set_session_stateful( client = client - stateful = abap_true ). + set_session_stateful( client = client stateful = abap_true ). WHEN `REFRESH`. update_lock_counter( ). WHEN `ROLLBACK`. diff --git a/src/06/z2ui5_cl_smps_app_486.clas.abap b/src/06/z2ui5_cl_smps_app_486.clas.abap index fc82ff0..a6ef63e 100644 --- a/src/06/z2ui5_cl_smps_app_486.clas.abap +++ b/src/06/z2ui5_cl_smps_app_486.clas.abap @@ -50,8 +50,7 @@ CLASS z2ui5_cl_smps_app_486 IMPLEMENTATION. METHOD initialize_view. - set_session_stateful( client = client - stateful = abap_true ). + set_session_stateful( client = client stateful = abap_true ). DATA(view) = z2ui5_cl_ui5_view_builder=>factory( )->ele( n = `View` ns = `mvc` @@ -100,17 +99,14 @@ CLASS z2ui5_cl_smps_app_486 IMPLEMENTATION. CASE client->get_event( ). WHEN `BACK`. - set_session_stateful( client = client - stateful = abap_false ). + set_session_stateful( client = client stateful = abap_false ). client->nav_app_leave( ). WHEN `INCREMENT`. instance_counter = lcl_static_container=>increment( ). WHEN `END_SESSION`. - set_session_stateful( client = client - stateful = abap_false ). + set_session_stateful( client = client stateful = abap_false ). WHEN `START_SESSION`. - set_session_stateful( client = client - stateful = abap_true ). + set_session_stateful( client = client stateful = abap_true ). ENDCASE. ENDMETHOD. diff --git a/src/07/z2ui5_cl_smps_app_489.clas.abap b/src/07/z2ui5_cl_smps_app_489.clas.abap index cbd33cd..4afa482 100644 --- a/src/07/z2ui5_cl_smps_app_489.clas.abap +++ b/src/07/z2ui5_cl_smps_app_489.clas.abap @@ -312,9 +312,7 @@ CLASS z2ui5_cl_smps_app_489 IMPLEMENTATION. )->a( n = `header` v = `Sample information` )->a( n = `pageId` v = `sampleInformationId` ). - client->popover_display( - xml = view->stringify( ) - by_id = `button_hint_id` ). + client->popover_display( xml = view->stringify( ) by_id = `button_hint_id` ). ENDMETHOD. diff --git a/src/07/z2ui5_cl_smps_app_489_ws.clas.abap b/src/07/z2ui5_cl_smps_app_489_ws.clas.abap index 0857fb4..ee1b34f 100644 --- a/src/07/z2ui5_cl_smps_app_489_ws.clas.abap +++ b/src/07/z2ui5_cl_smps_app_489_ws.clas.abap @@ -26,9 +26,7 @@ CLASS z2ui5_cl_smps_app_489_ws DEFINITION PUBLIC CLASS-METHODS get_producer RETURNING - VALUE(producer) TYPE REF TO if_amc_message_producer_text - RAISING - cx_amc_error. + VALUE(producer) TYPE REF TO if_amc_message_producer_text RAISING cx_amc_error. PROTECTED SECTION. PRIVATE SECTION. @@ -89,9 +87,7 @@ CLASS z2ui5_cl_smps_app_489_ws IMPLEMENTATION. SELECT FROM amc_receiver2 - FIELDS COUNT( * ) - WHERE channel_id = @( to_lower( |{ c_amc_application_id }{ c_channel_id }| ) ) - INTO @result. + FIELDS COUNT( * ) WHERE channel_id = @( to_lower( |{ c_amc_application_id }{ c_channel_id }| ) ) INTO @result. ENDMETHOD. diff --git a/src/08/z2ui5_cl_smps_app_487.clas.abap b/src/08/z2ui5_cl_smps_app_487.clas.abap index 7668222..2ad738d 100644 --- a/src/08/z2ui5_cl_smps_app_487.clas.abap +++ b/src/08/z2ui5_cl_smps_app_487.clas.abap @@ -27,9 +27,7 @@ CLASS z2ui5_cl_smps_app_487 IMPLEMENTATION. me->client = client. - IF client->check_on_init( ). - view_display( ). - ELSEIF client->check_on_navigated( ). + IF client->check_on_navigated( ). view_display( ). ENDIF. diff --git a/src/z2ui5_cl_smps_app_000.clas.abap b/src/z2ui5_cl_smps_app_000.clas.abap index 4af5d8c..9c34602 100644 --- a/src/z2ui5_cl_smps_app_000.clas.abap +++ b/src/z2ui5_cl_smps_app_000.clas.abap @@ -332,8 +332,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. " can give, and it is what the silent catch here used to produce. " Only the running system knows why the overview app of the other " repository did not start, so let it say so. - client->message_box_display( text = |{ classname }: { error->get_text( ) }| - type = `error` ). + client->message_box_display( text = |{ classname }: { error->get_text( ) }| type = `error` ). ENDTRY. ENDCASE. @@ -357,8 +356,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. " title and back button come with the custom header (render_header), not " with the page - a Page renders either its own header or a custom one - render_header( page = page - title = `abap2UI5 - samples-stack - 00 Overview` ). + render_header( page = page title = `abap2UI5 - samples-stack - 00 Overview` ). page->tag( `MessageStrip` )->a( n = `text` v = `Every sample of this repository, one package per section - Open starts it ` && @@ -530,8 +528,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. )->a( n = `target` v = `_blank` )->a( n = `class` v = `sapUiSmallMarginTop` ). - client->popover_display( xml = info->stringify( ) - by_id = anchor ). + client->popover_display( xml = info->stringify( ) by_id = anchor ). ENDMETHOD. @@ -959,8 +956,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. DATA(lt_param) = url_param_get_tab( search ). DELETE lt_param WHERE n = `app_start`. - INSERT VALUE #( n = `app_start` - v = to_lower( classname ) ) INTO TABLE lt_param. + INSERT VALUE #( n = `app_start` v = to_lower( classname ) ) INTO TABLE lt_param. " keep only the launchpad shell part of the hash: the app-owned part " (leading `/` standalone, or everything after `&/` inside the FLP) @@ -971,16 +967,14 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. IF lv_hash IS NOT INITIAL. DATA(lv_content) = lv_hash. IF lv_content(1) = `#`. - lv_content = substring( val = lv_content - off = 1 ). + lv_content = substring( val = lv_content off = 1 ). ENDIF. IF lv_content IS INITIAL OR lv_content(1) = `/`. " pure app hash (route or app-state) - drop it entirely lv_hash = ``. ELSE. " inside the FLP keep the shell part, cut the app part after `&/` - DATA(lv_off) = find( val = lv_content - sub = `&/` ). + DATA(lv_off) = find( val = lv_content sub = `&/` ). IF lv_off = 0. lv_hash = ``. ELSEIF lv_off > 0. @@ -1015,17 +1009,14 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. with = `&` occ = 0 ). - lv_search = shift_left( val = lv_search - sub = `?` ). + lv_search = shift_left( val = lv_search sub = `?` ). " prepend & before searching so sap-startup-params is also unwrapped " when it is the first/only query parameter (typical FLP target mapping) - DATA(lv_search2) = substring_after( val = |&{ lv_search }| - sub = `&sap-startup-params=` ). + DATA(lv_search2) = substring_after( val = |&{ lv_search }| sub = `&sap-startup-params=` ). lv_search = COND #( WHEN lv_search2 IS NOT INITIAL THEN lv_search2 ELSE lv_search ). - lv_search2 = substring_after( val = lv_search - sub = `?` ). + lv_search2 = substring_after( val = lv_search sub = `?` ). IF lv_search2 IS NOT INITIAL. lv_search = lv_search2. ENDIF. @@ -1042,8 +1033,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. ENDIF. " normalize the name so the app_start lookup is case-insensitive on " every input shape - the value keeps its original case - INSERT VALUE #( n = to_lower( condense( lv_name ) ) - v = lv_value ) INTO TABLE rt_params. + INSERT VALUE #( n = to_lower( condense( lv_name ) ) v = lv_value ) INTO TABLE rt_params. ENDLOOP. ENDMETHOD. @@ -1054,8 +1044,7 @@ CLASS z2ui5_cl_smps_app_000 IMPLEMENTATION. LOOP AT t_params INTO DATA(ls_param). result = |{ result }{ ls_param-n }={ ls_param-v }&|. ENDLOOP. - result = shift_right( val = result - sub = `&` ). + result = shift_right( val = result sub = `&` ). ENDMETHOD.