2021-01-11 15:31:58 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-11-03 14:18:47 -04:00
|
|
|
#include "Async/AsyncWork.h"
|
2021-01-11 15:31:58 -04:00
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
#include <atomic>
|
2021-01-11 15:31:58 -04:00
|
|
|
#include "ISourceControlProvider.h"
|
2022-11-01 16:30:00 -04:00
|
|
|
#include "Misc/EnumClassFlags.h"
|
2022-09-12 18:11:36 -04:00
|
|
|
#include "Misc/TextFilter.h"
|
2022-11-01 16:30:00 -04:00
|
|
|
#include "SSourceControlCommon.h"
|
|
|
|
|
#include "Stats/Stats.h"
|
|
|
|
|
#include "UObject/ObjectSaveContext.h"
|
|
|
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
|
#include "Widgets/Views/SListView.h"
|
|
|
|
|
#include "Widgets/Views/STreeView.h"
|
2021-01-11 15:31:58 -04:00
|
|
|
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
class FChangelistGroupTreeItem;
|
2023-01-31 01:26:50 -05:00
|
|
|
class SExpandableArea;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
class SExpandableChangelistArea;
|
2023-01-31 01:26:50 -05:00
|
|
|
class SWidgetSwitcher;
|
2022-09-12 18:11:36 -04:00
|
|
|
class SSearchBox;
|
2022-09-15 18:45:09 -04:00
|
|
|
class USourceControlSettings;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Displays the user source control change lists.
|
|
|
|
|
*/
|
2021-01-11 15:31:58 -04:00
|
|
|
class SSourceControlChangelistsWidget : public SCompoundWidget
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SSourceControlChangelistsWidget) {}
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
/** Constructs the widget */
|
|
|
|
|
void Construct(const FArguments& InArgs);
|
2022-11-01 16:30:00 -04:00
|
|
|
virtual ~SSourceControlChangelistsWidget();
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2022-08-29 14:51:36 -04:00
|
|
|
/** Set selected files */
|
|
|
|
|
void SetSelectedFiles(const TArray<FString>& Filenames);
|
|
|
|
|
|
2021-01-11 15:31:58 -04:00
|
|
|
private:
|
2022-11-01 16:30:00 -04:00
|
|
|
enum class ERefreshFlags
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
{
|
2022-11-01 16:30:00 -04:00
|
|
|
SourceControlChangelists = 1 << 0,
|
2023-01-31 01:26:50 -05:00
|
|
|
UnsavedAssets = 1 << 1,
|
2022-11-01 16:30:00 -04:00
|
|
|
UncontrolledChangelists = 1 << 2,
|
2023-01-31 01:26:50 -05:00
|
|
|
All = SourceControlChangelists | UnsavedAssets | UncontrolledChangelists,
|
2022-11-01 16:30:00 -04:00
|
|
|
};
|
|
|
|
|
FRIEND_ENUM_CLASS_FLAGS(ERefreshFlags)
|
|
|
|
|
|
|
|
|
|
/** Queries files timestamp asynchronously. */
|
|
|
|
|
class FAsyncTimestampUpdater
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
void DoWork();
|
|
|
|
|
bool CanAbandon() { return true; }
|
|
|
|
|
void Abandon() { bAbandon = true; }
|
|
|
|
|
TStatId GetStatId() const { return TStatId(); }
|
|
|
|
|
static const TCHAR* Name() { return TEXT("SourceControlChangelistsTimestampUpdater"); }
|
|
|
|
|
public:
|
|
|
|
|
std::atomic<bool> bAbandon;
|
|
|
|
|
TSet<FString> RequestedFileTimestamps;
|
|
|
|
|
TMap<FString, FDateTime> QueriedFileTimestamps;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
2022-10-27 11:59:24 -04:00
|
|
|
TSharedRef<SWidget> MakeToolBar();
|
2022-11-01 16:30:00 -04:00
|
|
|
TSharedRef<STreeView<FChangelistTreeItemPtr>> CreateChangelistTreeView(TArray<TSharedPtr<IChangelistTreeItem>>& ItemSources);
|
|
|
|
|
TSharedRef<SListView<FChangelistTreeItemPtr>> CreateChangelistFilesView();
|
2023-01-31 01:26:50 -05:00
|
|
|
TSharedRef<SListView<FChangelistTreeItemPtr>> CreateUnsavedAssetsFilesView();
|
2021-01-11 15:31:58 -04:00
|
|
|
|
|
|
|
|
TSharedRef<ITableRow> OnGenerateRow(FChangelistTreeItemPtr InTreeItem, const TSharedRef<STableViewBase>& OwnerTable);
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
void OnGetChangelistChildren(FChangelistTreeItemPtr InParent, TArray<FChangelistTreeItemPtr>& OutChildren);
|
2022-09-15 18:45:09 -04:00
|
|
|
void OnFileViewHiddenColumnsListChanged();
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2022-09-06 15:43:24 -04:00
|
|
|
EColumnSortPriority::Type GetColumnSortPriority(const FName ColumnId) const;
|
|
|
|
|
EColumnSortMode::Type GetColumnSortMode(const FName ColumnId) const;
|
|
|
|
|
void OnColumnSortModeChanged(const EColumnSortPriority::Type SortPriority, const FName& ColumnId, const EColumnSortMode::Type InSortMode);
|
2022-11-01 16:30:00 -04:00
|
|
|
bool IsFileViewSortedByFileStatusIcon() const;
|
|
|
|
|
bool IsFileViewSortedByLastModifiedTimestamp() const;
|
2022-09-06 15:43:24 -04:00
|
|
|
void SortFileView();
|
|
|
|
|
|
2022-09-12 18:11:36 -04:00
|
|
|
void OnChangelistSearchTextChanged(const FText& InFilterText);
|
|
|
|
|
void OnUncontrolledChangelistSearchTextChanged(const FText& InFilterText);
|
|
|
|
|
void OnFileSearchTextChanged(const FText& InFilterText);
|
|
|
|
|
void PopulateItemSearchStrings(const IChangelistTreeItem& Item, TArray<FString>& OutStrings);
|
2023-01-31 01:26:50 -05:00
|
|
|
void OnUnsavedAssetChanged(const FString& Filepath);
|
2022-09-12 18:11:36 -04:00
|
|
|
|
2021-01-18 15:31:14 -04:00
|
|
|
FReply OnFilesDragged(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent);
|
2023-08-09 18:41:28 -04:00
|
|
|
FReply OnUnsavedAssetsDragged(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent);
|
2021-01-18 15:31:14 -04:00
|
|
|
|
2022-09-15 18:45:09 -04:00
|
|
|
void RequestChangelistsRefresh();
|
|
|
|
|
void RequestFileStatusRefresh(const IChangelistTreeItem& Changelist);
|
2022-11-02 23:06:17 -04:00
|
|
|
void RequestFileStatusRefresh(TSet<FString>&& Pathnames);
|
2022-11-01 16:30:00 -04:00
|
|
|
void OnRefreshUI(ERefreshFlags RefreshFlags);
|
2023-01-31 01:26:50 -05:00
|
|
|
void OnRefreshUnsavedAssetsWidgets(int64 CurrUpdateNum, const TFunction<void(TSharedPtr<IFileViewTreeItem>&)>& AddItemToFileView);
|
2022-11-01 16:30:00 -04:00
|
|
|
void OnRefreshSourceControlWidgets(int64 CurreUpdateNum, const TFunction<void(TSharedPtr<IFileViewTreeItem>&)>& AddItemToFileView);
|
|
|
|
|
void OnRefreshUncontrolledChangelistWidgets(int64 CurreUpdateNum, const TFunction<void(TSharedPtr<IFileViewTreeItem>&)>& AddItemToFileView);
|
2021-01-13 16:50:22 -04:00
|
|
|
void ClearChangelistsTree();
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2021-01-18 09:42:33 -04:00
|
|
|
TSharedPtr<SWidget> OnOpenContextMenu();
|
|
|
|
|
|
|
|
|
|
/** Returns the currently selected changelist state ptr or null in invalid cases */
|
|
|
|
|
FSourceControlChangelistStatePtr GetCurrentChangelistState();
|
2022-09-07 18:11:16 -04:00
|
|
|
FUncontrolledChangelistStatePtr GetCurrentUncontrolledChangelistState() const;
|
2021-01-18 09:42:33 -04:00
|
|
|
FSourceControlChangelistPtr GetCurrentChangelist();
|
2022-09-07 18:11:16 -04:00
|
|
|
TOptional<FUncontrolledChangelist> GetCurrentUncontrolledChangelist() const;
|
2021-01-26 09:19:24 -04:00
|
|
|
FSourceControlChangelistStatePtr GetChangelistStateFromSelection();
|
|
|
|
|
FSourceControlChangelistPtr GetChangelistFromSelection();
|
2021-01-18 09:42:33 -04:00
|
|
|
|
|
|
|
|
/** Returns list of currently selected files */
|
|
|
|
|
TArray<FString> GetSelectedFiles();
|
2022-10-27 11:59:24 -04:00
|
|
|
bool HasFilesSelected() const;
|
|
|
|
|
|
|
|
|
|
/** Returns list of currently selected shelved files */
|
|
|
|
|
TArray<FString> GetSelectedShelvedFiles();
|
|
|
|
|
bool HasShelvedFilesSelected() const;
|
2021-01-18 09:42:33 -04:00
|
|
|
|
2021-06-14 15:25:20 -04:00
|
|
|
/**
|
|
|
|
|
* Splits selected files between Controlled and Uncontrolled files.
|
|
|
|
|
* @param OutControlledFiles Selected source controlled files will be added to this array.
|
|
|
|
|
* @param OutUncontrolledFiles Selected uncontrolled files will be added to this array.
|
|
|
|
|
*/
|
|
|
|
|
void GetSelectedFiles(TArray<FString>& OutControlledFiles, TArray<FString>& OutUncontrolledFiles);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Splits selected files between Controlled and Uncontrolled files.
|
|
|
|
|
* @param OutControlledFileStates Selected source controlled file states will be added to this array.
|
|
|
|
|
* @param OutUncontrolledFileStates Selected uncontrolled file states will be added to this array.
|
|
|
|
|
*/
|
|
|
|
|
void GetSelectedFileStates(TArray<FSourceControlStateRef>& OutControlledFileStates, TArray<FSourceControlStateRef>& OutUncontrolledFileStates);
|
|
|
|
|
|
2022-08-30 17:17:25 -04:00
|
|
|
/** Intercept Enter and Delete key presses to Submit or Delete the selected changelist (if conditions are met) */
|
|
|
|
|
virtual FReply OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override;
|
|
|
|
|
|
2021-01-19 14:50:23 -04:00
|
|
|
/** Changelist operations */
|
2021-01-18 09:42:33 -04:00
|
|
|
void OnNewChangelist();
|
|
|
|
|
void OnDeleteChangelist();
|
|
|
|
|
bool CanDeleteChangelist();
|
2022-08-30 17:17:25 -04:00
|
|
|
bool CanDeleteChangelist(FText* OutFailureMessage);
|
2021-01-18 09:42:33 -04:00
|
|
|
void OnEditChangelist();
|
|
|
|
|
void OnSubmitChangelist();
|
|
|
|
|
bool CanSubmitChangelist();
|
2022-08-30 17:17:25 -04:00
|
|
|
bool CanSubmitChangelist(FText* OutFailureMessage);
|
2021-08-11 15:40:41 -04:00
|
|
|
void OnValidateChangelist();
|
|
|
|
|
bool CanValidateChangelist();
|
2021-01-18 09:42:33 -04:00
|
|
|
|
2022-09-08 09:19:01 -04:00
|
|
|
/** Uncontrolled Changelist operations */
|
|
|
|
|
void OnNewUncontrolledChangelist();
|
|
|
|
|
void OnEditUncontrolledChangelist();
|
|
|
|
|
bool CanEditUncontrolledChangelist();
|
|
|
|
|
void OnDeleteUncontrolledChangelist();
|
|
|
|
|
bool CanDeleteUncontrolledChangelist();
|
|
|
|
|
|
2021-01-19 14:50:23 -04:00
|
|
|
/** Changelist & File operations */
|
|
|
|
|
void OnRevertUnchanged();
|
2021-01-27 16:11:25 -04:00
|
|
|
bool CanRevertUnchanged();
|
2021-01-19 14:50:23 -04:00
|
|
|
void OnRevert();
|
2021-01-27 16:11:25 -04:00
|
|
|
bool CanRevert();
|
2021-01-26 09:19:24 -04:00
|
|
|
void OnShelve();
|
|
|
|
|
|
|
|
|
|
/** Changelist & shelved files operations */
|
|
|
|
|
void OnUnshelve();
|
|
|
|
|
void OnDeleteShelvedFiles();
|
2021-01-19 14:50:23 -04:00
|
|
|
|
|
|
|
|
/** Files operations */
|
2023-04-25 19:16:30 -04:00
|
|
|
TValueOrError<void, void> TryMoveFiles();
|
2021-01-19 14:50:23 -04:00
|
|
|
void OnShowHistory();
|
|
|
|
|
void OnDiffAgainstDepot();
|
|
|
|
|
bool CanDiffAgainstDepot();
|
|
|
|
|
|
2021-01-26 09:19:24 -04:00
|
|
|
/** Shelved files operations */
|
|
|
|
|
void OnDiffAgainstWorkspace();
|
|
|
|
|
bool CanDiffAgainstWorkspace();
|
|
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
/** Uncontrolled changelist module callback. */
|
|
|
|
|
void OnUncontrolledChangelistStateChanged();
|
|
|
|
|
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
/** Source control callbacks */
|
2021-01-13 11:07:12 -04:00
|
|
|
void OnSourceControlProviderChanged(ISourceControlProvider& OldProvider, ISourceControlProvider& NewProvider);
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
void OnSourceControlStateChanged();
|
2022-08-26 11:04:20 -04:00
|
|
|
void OnItemDoubleClicked(TSharedPtr<IChangelistTreeItem> Item);
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
void OnChangelistSelectionChanged(TSharedPtr<IChangelistTreeItem> SelectedItem, ESelectInfo::Type SelectionType);
|
|
|
|
|
void OnChangelistsStatusUpdated(const TSharedRef<ISourceControlOperation>& InOperation, ECommandResult::Type InType);
|
|
|
|
|
|
|
|
|
|
void OnStartSourceControlOperation(TSharedRef<ISourceControlOperation> Operation, const FText& Message);
|
|
|
|
|
void OnEndSourceControlOperation(const TSharedRef<ISourceControlOperation>& Operation, ECommandResult::Type InType);
|
|
|
|
|
|
|
|
|
|
// Wrapper functions on top of the source control ones to display slow tasks for synchronous operations or toast notifications for async ones.
|
|
|
|
|
void Execute(const FText& Message, const TSharedRef<ISourceControlOperation>& InOperation, TSharedPtr<ISourceControlChangelist> InChangelist, const TArray<FString>& InFiles, EConcurrency::Type InConcurrency, const FSourceControlOperationComplete& InOperationCompleteDelegate);
|
|
|
|
|
void Execute(const FText& Message, const TSharedRef<ISourceControlOperation>& InOperation, TSharedPtr<ISourceControlChangelist> InChangelist, const EConcurrency::Type InConcurrency, const FSourceControlOperationComplete& InOperationCompleteDelegate);
|
|
|
|
|
void Execute(const FText& Message, const TSharedRef<ISourceControlOperation>& InOperation, const EConcurrency::Type InConcurrency, const FSourceControlOperationComplete& InOperationCompleteDelegate);
|
|
|
|
|
void Execute(const FText& Message, const TSharedRef<ISourceControlOperation>& InOperation, const TArray<FString>& InFiles, EConcurrency::Type InConcurrency, const FSourceControlOperationComplete& InOperationCompleteDelegate);
|
|
|
|
|
void ExecuteUncontrolledChangelistOperation(const FText& Message, const TFunction<void()>& UncontrolledChangelistTask);
|
2021-01-13 16:50:22 -04:00
|
|
|
|
|
|
|
|
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
|
2021-01-13 11:07:12 -04:00
|
|
|
|
2021-04-19 11:21:23 -04:00
|
|
|
/** Executes an operation to updates the changelist description of the provided changelist with a new description. */
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
void EditChangelistDescription(const FText& InNewChangelistDescription, const FSourceControlChangelistStatePtr& InChangelistState);
|
2021-04-19 11:21:23 -04:00
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
/** Invoked when a package is saved, to refresh the last saved timestamp. */
|
|
|
|
|
void OnPackageSaved(const FString& PackageFilename, UPackage* Package, FObjectPostSaveContext ObjectSaveContext);
|
|
|
|
|
|
2021-01-27 15:28:56 -04:00
|
|
|
private:
|
2023-01-31 01:26:50 -05:00
|
|
|
TSharedPtr<SExpandableChangelistArea> UnsavedAssetsExpandableArea;
|
|
|
|
|
TSharedPtr<STreeView<FChangelistTreeItemPtr>> UnsavedAssetsTreeView;
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> UnsavedAssetsTreeNode;
|
|
|
|
|
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
TSharedPtr<SExpandableChangelistArea> ChangelistExpandableArea;
|
2022-11-01 16:30:00 -04:00
|
|
|
TSharedPtr<STreeView<FChangelistTreeItemPtr>> ChangelistTreeView;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> ChangelistTreeNodes;
|
2022-11-01 16:30:00 -04:00
|
|
|
|
|
|
|
|
TSharedPtr<SExpandableChangelistArea> UncontrolledChangelistExpandableArea;
|
|
|
|
|
TSharedPtr<STreeView<FChangelistTreeItemPtr>> UncontrolledChangelistTreeView;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> UncontrolledChangelistTreeNodes;
|
2023-01-31 01:26:50 -05:00
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
TSharedPtr<SListView<FChangelistTreeItemPtr>> FileListView;
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> FileListNodes;
|
2022-09-15 18:45:09 -04:00
|
|
|
TArray<FName> FileViewHiddenColumnsList;
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2023-01-31 01:26:50 -05:00
|
|
|
TSharedPtr<SListView<FChangelistTreeItemPtr>> UnsavedAssetsFileListView;
|
|
|
|
|
TSharedPtr<SWidgetSwitcher> FileListViewSwitcher;
|
|
|
|
|
|
|
|
|
|
SListView<FChangelistTreeItemPtr>& GetActiveFileListView() const;
|
|
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
TMap<TSharedPtr<void>, TSharedPtr<IChangelistTreeItem>> SourceControlItemCache;
|
|
|
|
|
TMap<TSharedPtr<void>, TSharedPtr<IChangelistTreeItem>> UncontrolledChangelistItemCache;
|
|
|
|
|
TMap<FString, TSharedPtr<IFileViewTreeItem>> OfflineFileItemCache;
|
|
|
|
|
|
|
|
|
|
TUniquePtr<FAsyncTask<FAsyncTimestampUpdater>> TimestampUpdateTask;
|
|
|
|
|
TSet<FString> OutdatedTimestampFiles;
|
|
|
|
|
|
2021-01-13 11:07:12 -04:00
|
|
|
/** Source control state changed delegate handle */
|
|
|
|
|
FDelegateHandle SourceControlStateChangedDelegateHandle;
|
2021-01-13 16:50:22 -04:00
|
|
|
|
2022-11-01 16:30:00 -04:00
|
|
|
int64 UpdateRequestNum = 0;
|
|
|
|
|
bool bInitialRefreshDone = false;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
bool bShouldRefresh = false;
|
|
|
|
|
bool bSourceControlAvailable = false;
|
2022-11-01 16:30:00 -04:00
|
|
|
bool bUpdateMonitoredFileStatusList = false;
|
2021-03-24 08:29:57 -04:00
|
|
|
|
2022-08-29 14:51:36 -04:00
|
|
|
/** Files to select after refresh */
|
|
|
|
|
TArray<FString> FilesToSelect;
|
|
|
|
|
|
2022-09-06 15:43:24 -04:00
|
|
|
FName PrimarySortedColumn;
|
|
|
|
|
FName SecondarySortedColumn;
|
|
|
|
|
EColumnSortMode::Type PrimarySortMode = EColumnSortMode::Ascending;
|
|
|
|
|
EColumnSortMode::Type SecondarySortMode = EColumnSortMode::None;
|
|
|
|
|
|
2022-09-12 18:11:36 -04:00
|
|
|
TSharedPtr<TTextFilter<const IChangelistTreeItem&>> ChangelistTextFilter;
|
|
|
|
|
TSharedPtr<TTextFilter<const IChangelistTreeItem&>> UncontrolledChangelistTextFilter;
|
|
|
|
|
TSharedPtr<TTextFilter<const IChangelistTreeItem&>> FileTextFilter;
|
|
|
|
|
TSharedPtr<SSearchBox> FileSearchBox;
|
|
|
|
|
|
2021-03-24 08:29:57 -04:00
|
|
|
void StartRefreshStatus();
|
|
|
|
|
void TickRefreshStatus(double InDeltaTime);
|
|
|
|
|
void EndRefreshStatus();
|
|
|
|
|
|
|
|
|
|
FText RefreshStatus;
|
Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.
Along with the user interface changes, notable bug fixes were included
- If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
- Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.
Other changes:
- P4 changelists are now always returned sorted by changelist number, ascending.
- Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).
This submit addresses the following Jiras:
#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open
#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b
[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
|
|
|
bool bIsRefreshing = false;
|
|
|
|
|
double RefreshStatusStartSecs;
|
2022-09-12 18:11:36 -04:00
|
|
|
|
|
|
|
|
float ChangelistAreaSize = 0.3; // [0.0f, 1.0f]
|
|
|
|
|
float FileAreaSize = 0.7;
|
2021-01-11 15:31:58 -04:00
|
|
|
};
|