mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Add ABAP Language Version to New Online/Offline (#6603)
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
ea85a8d78f
commit
1a525bf0ac
|
@ -536,8 +536,10 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
zcx_abapgit_exception=>raise( 'Missing display name for repo' ).
|
||||
ENDIF.
|
||||
|
||||
" Repo Settings
|
||||
lo_dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( ).
|
||||
lo_dot_abapgit->set_folder_logic( iv_folder_logic ).
|
||||
lo_dot_abapgit->set_abap_language_version( iv_abap_lang_vers ).
|
||||
|
||||
lv_key = zcl_abapgit_persist_factory=>get_repo( )->add(
|
||||
iv_url = iv_url
|
||||
|
@ -554,6 +556,7 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
|
||||
lo_repo ?= instantiate_and_add( ls_repo ).
|
||||
|
||||
" Local Settings
|
||||
IF ls_repo-local_settings-ignore_subpackages <> iv_ign_subpkg.
|
||||
ls_repo-local_settings-ignore_subpackages = iv_ign_subpkg.
|
||||
ENDIF.
|
||||
|
@ -573,7 +576,7 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
lo_repo TYPE REF TO zcl_abapgit_repo_online,
|
||||
lv_branch_name LIKE iv_branch_name,
|
||||
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
|
||||
ls_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit,
|
||||
lo_dot_abapgit TYPE REF TO zcl_abapgit_dot_abapgit,
|
||||
lv_url TYPE string.
|
||||
|
||||
|
||||
|
@ -596,8 +599,10 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
iv_name = iv_branch_name
|
||||
iv_url = lv_url ).
|
||||
|
||||
ls_dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( )->get_data( ).
|
||||
ls_dot_abapgit-folder_logic = iv_folder_logic.
|
||||
" Repo Settings
|
||||
lo_dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( ).
|
||||
lo_dot_abapgit->set_folder_logic( iv_folder_logic ).
|
||||
lo_dot_abapgit->set_abap_language_version( iv_abap_lang_vers ).
|
||||
|
||||
lv_key = zcl_abapgit_persist_factory=>get_repo( )->add(
|
||||
iv_url = lv_url
|
||||
|
@ -605,7 +610,7 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
iv_display_name = iv_display_name
|
||||
iv_package = iv_package
|
||||
iv_offline = abap_false
|
||||
is_dot_abapgit = ls_dot_abapgit ).
|
||||
is_dot_abapgit = lo_dot_abapgit->get_data( ) ).
|
||||
|
||||
TRY.
|
||||
ls_repo = zcl_abapgit_persist_factory=>get_repo( )->read( lv_key ).
|
||||
|
@ -615,6 +620,7 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
|||
|
||||
lo_repo ?= instantiate_and_add( ls_repo ).
|
||||
|
||||
" Local Settings
|
||||
IF ls_repo-local_settings-ignore_subpackages <> iv_ign_subpkg.
|
||||
ls_repo-local_settings-ignore_subpackages = iv_ign_subpkg.
|
||||
ENDIF.
|
||||
|
|
|
@ -54,6 +54,7 @@ INTERFACE zif_abapgit_repo_srv
|
|||
!iv_labels TYPE string OPTIONAL
|
||||
!iv_ign_subpkg TYPE abap_bool DEFAULT abap_false
|
||||
!iv_main_lang_only TYPE abap_bool DEFAULT abap_false
|
||||
!iv_abap_lang_vers TYPE string OPTIONAL
|
||||
RETURNING
|
||||
VALUE(ri_repo) TYPE REF TO zif_abapgit_repo
|
||||
RAISING
|
||||
|
@ -68,6 +69,7 @@ INTERFACE zif_abapgit_repo_srv
|
|||
!iv_labels TYPE string OPTIONAL
|
||||
!iv_ign_subpkg TYPE abap_bool DEFAULT abap_false
|
||||
!iv_main_lang_only TYPE abap_bool DEFAULT abap_false
|
||||
!iv_abap_lang_vers TYPE string OPTIONAL
|
||||
RETURNING
|
||||
VALUE(ri_repo) TYPE REF TO zif_abapgit_repo
|
||||
RAISING
|
||||
|
|
|
@ -30,6 +30,7 @@ CLASS zcl_abapgit_gui_page_addofflin DEFINITION
|
|||
labels TYPE string VALUE 'labels',
|
||||
ignore_subpackages TYPE string VALUE 'ignore_subpackages',
|
||||
main_lang_only TYPE string VALUE 'main_lang_only',
|
||||
abap_lang_vers TYPE string VALUE 'abap_lang_vers',
|
||||
END OF c_id .
|
||||
|
||||
CONSTANTS:
|
||||
|
@ -153,8 +154,29 @@ CLASS zcl_abapgit_gui_page_addofflin IMPLEMENTATION.
|
|||
)->checkbox(
|
||||
iv_name = c_id-main_lang_only
|
||||
iv_label = 'Serialize Main Language Only'
|
||||
iv_hint = 'Ignore translations, serialize just main language'
|
||||
)->command(
|
||||
iv_hint = 'Ignore translations, serialize just main language' ).
|
||||
|
||||
IF zcl_abapgit_feature=>is_enabled( zcl_abapgit_abap_language_vers=>c_feature_flag ) = abap_true.
|
||||
ro_form->radio(
|
||||
iv_name = c_id-abap_lang_vers
|
||||
iv_default_value = ''
|
||||
iv_label = 'ABAP Language Version'
|
||||
iv_hint = 'Define the ABAP language version for objects in the repository'
|
||||
)->option(
|
||||
iv_label = 'Any'
|
||||
iv_value = ''
|
||||
)->option(
|
||||
iv_label = 'Standard'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-standard
|
||||
)->option(
|
||||
iv_label = 'For Key Users'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-key_user
|
||||
)->option(
|
||||
iv_label = 'For Cloud Development'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-cloud_development ).
|
||||
ENDIF.
|
||||
|
||||
ro_form->command(
|
||||
iv_label = 'Create Offline Repo'
|
||||
iv_cmd_type = zif_abapgit_html_form=>c_cmd_type-input_main
|
||||
iv_action = c_event-add_offline_repo
|
||||
|
|
|
@ -32,6 +32,7 @@ CLASS zcl_abapgit_gui_page_addonline DEFINITION
|
|||
folder_logic TYPE string VALUE 'folder_logic',
|
||||
ignore_subpackages TYPE string VALUE 'ignore_subpackages',
|
||||
main_lang_only TYPE string VALUE 'main_lang_only',
|
||||
abap_lang_vers TYPE string VALUE 'abap_lang_vers',
|
||||
END OF c_id.
|
||||
|
||||
CONSTANTS:
|
||||
|
@ -168,8 +169,29 @@ CLASS zcl_abapgit_gui_page_addonline IMPLEMENTATION.
|
|||
)->checkbox(
|
||||
iv_name = c_id-main_lang_only
|
||||
iv_label = 'Serialize Main Language Only'
|
||||
iv_hint = 'Ignore translations, serialize just main language'
|
||||
)->command(
|
||||
iv_hint = 'Ignore translations, serialize just main language' ).
|
||||
|
||||
IF zcl_abapgit_feature=>is_enabled( zcl_abapgit_abap_language_vers=>c_feature_flag ) = abap_true.
|
||||
ro_form->radio(
|
||||
iv_name = c_id-abap_lang_vers
|
||||
iv_default_value = ''
|
||||
iv_label = 'ABAP Language Version'
|
||||
iv_hint = 'Define the ABAP language version for objects in the repository'
|
||||
)->option(
|
||||
iv_label = 'Any'
|
||||
iv_value = ''
|
||||
)->option(
|
||||
iv_label = 'Standard'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-standard
|
||||
)->option(
|
||||
iv_label = 'For Key Users'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-key_user
|
||||
)->option(
|
||||
iv_label = 'For Cloud Development'
|
||||
iv_value = zif_abapgit_dot_abapgit=>c_abap_language_version-cloud_development ).
|
||||
ENDIF.
|
||||
|
||||
ro_form->command(
|
||||
iv_label = 'Create Online Repo'
|
||||
iv_cmd_type = zif_abapgit_html_form=>c_cmd_type-input_main
|
||||
iv_action = c_event-add_online_repo
|
||||
|
|
|
@ -378,7 +378,8 @@ CLASS zcl_abapgit_services_repo IMPLEMENTATION.
|
|||
iv_folder_logic = is_repo_params-folder_logic
|
||||
iv_labels = is_repo_params-labels
|
||||
iv_ign_subpkg = is_repo_params-ignore_subpackages
|
||||
iv_main_lang_only = is_repo_params-main_lang_only ).
|
||||
iv_main_lang_only = is_repo_params-main_lang_only
|
||||
iv_abap_lang_vers = is_repo_params-abap_lang_vers ).
|
||||
|
||||
check_and_create_package(
|
||||
iv_package = is_repo_params-package
|
||||
|
@ -410,7 +411,8 @@ CLASS zcl_abapgit_services_repo IMPLEMENTATION.
|
|||
iv_folder_logic = is_repo_params-folder_logic
|
||||
iv_labels = is_repo_params-labels
|
||||
iv_ign_subpkg = is_repo_params-ignore_subpackages
|
||||
iv_main_lang_only = is_repo_params-main_lang_only ).
|
||||
iv_main_lang_only = is_repo_params-main_lang_only
|
||||
iv_abap_lang_vers = is_repo_params-abap_lang_vers ).
|
||||
|
||||
check_and_create_package(
|
||||
iv_package = is_repo_params-package
|
||||
|
|
|
@ -11,6 +11,7 @@ INTERFACE zif_abapgit_services_repo
|
|||
labels TYPE string,
|
||||
ignore_subpackages TYPE abap_bool,
|
||||
main_lang_only TYPE abap_bool,
|
||||
abap_lang_vers TYPE string,
|
||||
END OF ty_repo_params .
|
||||
|
||||
ENDINTERFACE.
|
||||
|
|
Loading…
Reference in New Issue
Block a user