2021-04-19 11:21:23 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
# pragma once
2022-07-20 12:03:45 -04:00
# include "Containers/Array.h"
# include "Containers/Map.h"
# include "Containers/UnrealString.h"
2021-04-19 11:21:23 -04:00
# include "CoreMinimal.h"
# include "Engine/DeveloperSettings.h"
2022-07-20 12:03:45 -04:00
# include "UObject/ObjectMacros.h"
# include "UObject/UObjectGlobals.h"
2021-04-19 11:21:23 -04:00
2022-01-31 17:03:09 -05:00
# include "SourceControlPreferences.generated.h"
2021-04-19 11:21:23 -04:00
2022-07-20 12:03:45 -04:00
class FName ;
class UObject ;
2021-04-19 11:21:23 -04:00
/** Settings for the Source Control Integration */
2022-11-23 11:57:50 -05:00
UCLASS ( config = Editor , defaultconfig , meta = ( DisplayName = " Revision Control " , Keywords = " Source Control " ) )
2022-01-31 17:03:09 -05:00
class SOURCECONTROL_API USourceControlPreferences : public UDeveloperSettings
2021-04-19 11:21:23 -04:00
{
GENERATED_BODY ( )
public :
/** Helper to access easily Enable Validation Tag setting */
static bool IsValidationTagEnabled ( ) ;
2022-01-31 17:03:09 -05:00
/** Helper to access easily Should Delete New Files On Revert setting */
static bool ShouldDeleteNewFilesOnRevert ( ) ;
2022-09-19 21:54:38 -04:00
/** Helper to access easily Enable Uncontrolled Changelists setting */
static bool AreUncontrolledChangelistsEnabled ( ) ;
2024-08-26 14:02:18 -04:00
/** Helper to access easily Requires Revision Control To Rename Localizable Assets setting */
static bool RequiresRevisionControlToRenameLocalizableAssets ( ) ;
2021-04-19 11:21:23 -04:00
public :
/** If enabled, adds a tag in changelist descriptions when they are validated */
UPROPERTY ( config , EditAnywhere , Category = SourceControl , meta = ( ToolTip = " Adds validation tag to changelist description on submit. " ) )
bool bEnableValidationTag = true ;
2022-01-31 17:03:09 -05:00
/** If enabled, deletes new files when reverted. */
UPROPERTY ( config , EditAnywhere , Category = SourceControl , meta = ( ToolTip = " Deletes new files when reverted. " ) )
bool bShouldDeleteNewFilesOnRevert = true ;
2022-02-10 10:05:44 -05:00
2022-09-19 21:54:38 -04:00
/** Enables Uncontrolled Changelists features. */
UPROPERTY ( config , EditAnywhere , Category = SourceControl , meta = ( ToolTip = " Enables Uncontrolled Changelists features. The editor must be restarted for the change to be fully taken into account. " , ConfigRestartRequired = true ) )
bool bEnableUncontrolledChangelists = true ;
2022-02-10 10:05:44 -05:00
/** List of lines to add to any collection on checkin */
UPROPERTY ( config , EditAnywhere , Category = SourceControl )
TArray < FString > CollectionChangelistTags ;
/** Map of collection names and additional text to apply to changelist descriptions when checking them in */
UPROPERTY ( config , EditAnywhere , Category = SourceControl , meta = ( MultiLine = true ) )
TMap < FName , FString > SpecificCollectionChangelistTags ;
2024-08-26 14:02:18 -04:00
/** Revision Control is a requirement to move/rename/delete localizable assets */
UPROPERTY ( config , EditAnywhere , Category = Internationalization , meta = ( ToolTip = " If the project uses Localization and its localized content might not be on disk (but still in your Revision Control), then enabling this feature will require a Revision Control Provider to be configured to move/rename/delete files to be sure no localized variants become orphaned. (Works only with Perforce for now) " ) )
bool bRequiresRevisionControlToRenameLocalizableAssets = false ;
2021-04-19 11:21:23 -04:00
} ;