2021-01-11 15:31:58 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
|
|
|
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
|
#include "Widgets/Views/STreeView.h"
|
|
|
|
|
|
|
|
|
|
#include "ISourceControlProvider.h"
|
2021-02-04 17:41:41 -04:00
|
|
|
#include "SSourceControlCommon.h"
|
2022-09-12 18:11:36 -04:00
|
|
|
#include "Misc/TextFilter.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;
|
|
|
|
|
class SExpandableChangelistArea;
|
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
|
|
|
|
2021-01-13 20:52:07 -04:00
|
|
|
class SChangelistTree : public STreeView<FChangelistTreeItemPtr>
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
virtual void Private_SetItemSelection(FChangelistTreeItemPtr TheItem, bool bShouldBeSelected, bool bWasUserDirected = false) override;
|
|
|
|
|
};
|
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
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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-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:
|
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
|
|
|
// Holds the list/state of selected and expanded items in the changelist views and file views.
|
|
|
|
|
struct FExpandedAndSelectionStates
|
|
|
|
|
{
|
|
|
|
|
TSharedPtr<IChangelistTreeItem> SelectedChangelistNode;
|
|
|
|
|
TSharedPtr<IChangelistTreeItem> SelectedUncontrolledChangelistNode;
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> SelectedFileNodes;
|
|
|
|
|
TSet<TSharedPtr<IChangelistTreeItem>> ExpandedTreeNodes;
|
|
|
|
|
bool bShelvedFilesNodeSelected = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TSharedRef<SChangelistTree> CreateChangelistTreeView(TArray<TSharedPtr<IChangelistTreeItem>>& ItemSources);
|
|
|
|
|
TSharedRef<STreeView<FChangelistTreeItemPtr>> CreateChangelistFilesView();
|
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 OnGetFileChildren(FChangelistTreeItemPtr InParent, TArray<FChangelistTreeItemPtr>& OutChildren);
|
|
|
|
|
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);
|
|
|
|
|
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);
|
|
|
|
|
|
2021-01-18 15:31:14 -04:00
|
|
|
FReply OnFilesDragged(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent);
|
|
|
|
|
|
2022-09-15 18:45:09 -04:00
|
|
|
void RequestChangelistsRefresh();
|
|
|
|
|
void RequestFileStatusRefresh(const IChangelistTreeItem& Changelist);
|
|
|
|
|
void RequestFileStatusRefresh(const TArray<FString>& Pathnames);
|
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 OnRefresh();
|
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();
|
|
|
|
|
|
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);
|
|
|
|
|
|
2021-01-26 09:19:24 -04:00
|
|
|
/** Returns list of currently selected shelved files */
|
|
|
|
|
TArray<FString> GetSelectedShelvedFiles();
|
|
|
|
|
|
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 */
|
2021-03-24 08:29:57 -04:00
|
|
|
void OnMoveFiles();
|
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();
|
|
|
|
|
|
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
|
|
|
|
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 SaveExpandedAndSelectionStates(FExpandedAndSelectionStates& OutStates);
|
|
|
|
|
void RestoreExpandedAndSelectionStates(const FExpandedAndSelectionStates& InStates);
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2021-01-27 15:28:56 -04:00
|
|
|
TSharedRef<SWidget> MakeToolBar();
|
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
|
|
|
|
2021-01-27 15:28:56 -04:00
|
|
|
private:
|
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;
|
|
|
|
|
TSharedPtr<SExpandableChangelistArea> UncontrolledChangelistExpandableArea;
|
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
|
|
|
/** Hold the nodes displayed by the changelist tree. */
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> ChangelistTreeNodes;
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> UncontrolledChangelistTreeNodes;
|
|
|
|
|
|
|
|
|
|
/** Hold the nodes displayed by the file tree. */
|
|
|
|
|
TArray<TSharedPtr<IChangelistTreeItem>> FileTreeNodes;
|
|
|
|
|
|
|
|
|
|
/** Display the changelists, uncontrolled changelists and shelved nodes. */
|
|
|
|
|
TSharedPtr<SChangelistTree> ChangelistTreeView;
|
|
|
|
|
TSharedPtr<SChangelistTree> UncontrolledChangelistTreeView;
|
|
|
|
|
|
|
|
|
|
/** Display the list of files associated to the selected changelist, uncontrolled changelist or shelved node. */
|
|
|
|
|
TSharedPtr<STreeView<FChangelistTreeItemPtr>> FileTreeView;
|
2022-09-15 18:45:09 -04:00
|
|
|
TArray<FName> FileViewHiddenColumnsList;
|
2021-01-11 15:31:58 -04:00
|
|
|
|
2021-01-13 11:07:12 -04:00
|
|
|
/** Source control state changed delegate handle */
|
|
|
|
|
FDelegateHandle SourceControlStateChangedDelegateHandle;
|
2021-01-13 16:50:22 -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
|
|
|
bool bShouldRefresh = false;
|
|
|
|
|
bool bSourceControlAvailable = 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
|
|
|
};
|