2021-01-11 15:31:58 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
# include "SSourceControlChangelists.h"
2022-08-31 16:14:08 -04:00
# include "Editor.h"
2022-05-09 13:12:28 -04:00
# include "Styling/AppStyle.h"
2021-01-18 15:31:14 -04:00
# include "Algo/Transform.h"
2021-04-06 14:20:24 -04:00
# include "Logging/MessageLog.h"
2021-01-11 15:31:58 -04:00
# include "Widgets/DeclarativeSyntaxSupport.h"
# include "Widgets/Images/SImage.h"
# include "Widgets/Layout/SScrollBorder.h"
2021-01-27 15:28:56 -04:00
# include "Widgets/Input/SButton.h"
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
# include "Widgets/Input/SSearchBox.h"
2021-01-27 15:28:56 -04:00
# include "Widgets/Layout/SBorder.h"
# include "Widgets/Layout/SBox.h"
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
# include "Widgets/Layout/SSplitter.h"
# include "Widgets/Layout/SExpandableArea.h"
2021-01-11 15:31:58 -04:00
# include "ISourceControlProvider.h"
# include "ISourceControlModule.h"
2022-08-26 11:04:20 -04:00
# include "ISourceControlWindowsModule.h"
2021-05-06 14:40:16 -04:00
# include "UncontrolledChangelistsModule.h"
2021-01-11 15:31:58 -04:00
# include "SourceControlOperations.h"
2022-09-07 17:15:39 -04:00
# include "SSourceControlChangelistRows.h"
2021-01-18 09:42:33 -04:00
# include "SSourceControlDescription.h"
2021-01-19 14:50:23 -04:00
# include "SourceControlWindows.h"
2021-02-04 11:50:49 -04:00
# include "SourceControlHelpers.h"
2022-01-31 17:03:09 -05:00
# include "SourceControlPreferences.h"
2022-08-26 11:04:20 -04:00
# include "SourceControlMenuContext.h"
2021-01-19 14:50:23 -04:00
# include "AssetToolsModule.h"
2021-01-20 09:51:23 -04:00
# include "Misc/MessageDialog.h"
2021-03-24 08:29:57 -04:00
# include "Misc/ScopedSlowTask.h"
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
# include "HAL/PlatformTime.h"
2022-09-07 17:15:39 -04:00
# include "ToolMenus.h"
2021-02-04 11:50:49 -04:00
# include "SSourceControlSubmit.h"
# include "Framework/Application/SlateApplication.h"
2021-04-06 14:20:24 -04:00
# include "Framework/Notifications/NotificationManager.h"
2022-08-22 21:20:45 -04:00
# include "Framework/Docking/TabManager.h"
2021-01-11 15:31:58 -04:00
# define LOCTEXT_NAMESPACE "SourceControlChangelist"
2022-08-23 13:05:52 -04:00
namespace
{
2021-04-19 11:21:23 -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
/** Returns true if a source control provider is enable and support changeslists. */
bool AreControlledChangelistsEnabled ( )
{
return ISourceControlModule : : Get ( ) . IsEnabled ( ) & & ISourceControlModule : : Get ( ) . GetProvider ( ) . UsesChangelists ( ) ;
} ;
/** Returns true if Uncontrolled changelists are enabled. */
bool AreUncontrolledChangelistsEnabled ( )
{
return FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) ;
} ;
2022-08-23 13:05:52 -04:00
/** Returns true if there are changelists to display. */
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 AreChangelistsEnabled ( )
{
return AreControlledChangelistsEnabled ( ) | | AreUncontrolledChangelistsEnabled ( ) ;
} ;
2022-08-23 13:05:52 -04:00
/**
* Returns a new changelist description if needed , appending validation tag .
*
* @ param bInValidationResult The result of the validation step
* @ param InOriginalChangelistDescription Description of the changelist before modification
*
* @ return The new changelist description
*/
FText UpdateChangelistDescriptionToSubmitIfNeeded ( const bool bInValidationResult , const FText & InChangelistDescription )
{
auto GetChangelistValidationTag = [ ]
{
return LOCTEXT ( " ValidationTag " , " #changelist validated " ) ;
} ;
auto ContainsValidationFlag = [ & GetChangelistValidationTag ] ( const FText & InChangelistDescription )
{
FString DescriptionString = InChangelistDescription . ToString ( ) ;
FString ValidationString = GetChangelistValidationTag ( ) . ToString ( ) ;
return DescriptionString . Find ( ValidationString ) ! = INDEX_NONE ;
} ;
if ( bInValidationResult & & USourceControlPreferences : : IsValidationTagEnabled ( ) & & ! ContainsValidationFlag ( InChangelistDescription ) )
{
FStringOutputDevice Str ;
Str . SetAutoEmitLineTerminator ( true ) ;
Str . Log ( InChangelistDescription ) ;
Str . Log ( GetChangelistValidationTag ( ) ) ;
return FText : : FromString ( Str ) ;
}
return InChangelistDescription ;
}
} // Anonymous namespace
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
DECLARE_DELEGATE ( FOnSearchBoxExpanded )
/** A button that expands a search box below itself when clicked. */
class SExpandableSearchButton : public SCompoundWidget
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
public :
SLATE_BEGIN_ARGS ( SExpandableSearchButton )
: _Style ( & FAppStyle : : Get ( ) . GetWidgetStyle < FSearchBoxStyle > ( " SearchBox " ) )
{ }
/** Search box style (used to match the glass icon) */
SLATE_STYLE_ARGUMENT ( FSearchBoxStyle , Style )
/** Event fired when the associated search box is made visible */
SLATE_EVENT ( FOnSearchBoxExpanded , OnSearchBoxExpanded )
SLATE_END_ARGS ( )
void Construct ( const FArguments & InArgs , TSharedRef < SSearchBox > SearchBox )
{
OnSearchBoxExpanded = InArgs . _OnSearchBoxExpanded ;
SearchStyle = InArgs . _Style ;
SearchBox - > SetVisibility ( TAttribute < EVisibility > : : CreateSP ( this , & SExpandableSearchButton : : GetSearchBoxVisibility ) ) ;
SearchBoxPtr = SearchBox ;
ChildSlot
[
SNew ( SCheckBox )
. IsChecked ( this , & SExpandableSearchButton : : GetToggleButtonState )
. OnCheckStateChanged ( this , & SExpandableSearchButton : : OnToggleButtonStateChanged )
. Style ( FAppStyle : : Get ( ) , " ToggleButtonCheckbox " )
. Padding ( 4.0f )
. ToolTipText ( NSLOCTEXT ( " ExpandableSearchArea " , " ExpandCollapseSearchButton " , " Expands or collapses the search text box " ) )
[
SNew ( SImage )
. Image ( & SearchStyle - > GlassImage )
. ColorAndOpacity ( FSlateColor : : UseForeground ( ) )
]
] ;
}
private :
/** Sets whether or not the search area is expanded to expose the search box */
void OnToggleButtonStateChanged ( ECheckBoxState CheckBoxState )
{
bIsExpanded = CheckBoxState = = ECheckBoxState : : Checked ;
if ( TSharedPtr < SSearchBox > SearchBox = SearchBoxPtr . Pin ( ) )
{
if ( bIsExpanded )
{
OnSearchBoxExpanded . ExecuteIfBound ( ) ;
// Focus the search box when it's shown
FSlateApplication : : Get ( ) . SetUserFocus ( FSlateApplication : : Get ( ) . GetUserIndexForKeyboard ( ) , SearchBox , EFocusCause : : SetDirectly ) ;
}
else
{
// Clear the search box when it's hidden
SearchBox - > SetText ( FText : : GetEmpty ( ) ) ;
}
}
}
ECheckBoxState GetToggleButtonState ( ) const { return bIsExpanded ? ECheckBoxState : : Checked : ECheckBoxState : : Unchecked ; }
EVisibility GetSearchBoxVisibility ( ) const { return bIsExpanded ? EVisibility : : Visible : EVisibility : : Collapsed ; }
private :
const FSearchBoxStyle * SearchStyle ;
FOnSearchBoxExpanded OnSearchBoxExpanded ;
TWeakPtr < SSearchBox > SearchBoxPtr ;
bool bIsExpanded = false ;
} ;
/** An expanded area to contain the changelists tree view or then uncontrolled changelists tree view. */
class SExpandableChangelistArea : public SCompoundWidget
{
public :
SLATE_BEGIN_ARGS ( SExpandableChangelistArea )
: _Style ( & FAppStyle : : Get ( ) . GetWidgetStyle < FSearchBoxStyle > ( " SearchBox " ) )
, _HeaderText ( )
, _ChangelistView ( )
, _OnSearchBoxExpanded ( )
, _OnNewChangelist ( )
, _OnNewChangelistTooltip ( )
, _NewButtonVisibility ( EVisibility : : Visible )
, _SearchButtonVisibility ( EVisibility : : Visible )
{ }
/** Search box style (used to match the glass icon) */
SLATE_STYLE_ARGUMENT ( FSearchBoxStyle , Style )
/** Text displayed on the expandable area */
SLATE_ATTRIBUTE ( FText , HeaderText )
/** The tree element displayed as body. */
SLATE_ARGUMENT ( TSharedPtr < SChangelistTree > , ChangelistView )
/** Event fired when the associated search box is made visible */
SLATE_EVENT ( FOnSearchBoxExpanded , OnSearchBoxExpanded )
/** Event fired when the 'plus' button is clicked. */
SLATE_EVENT ( FOnClicked , OnNewChangelist )
/** Tooltip displayed over the 'plus' button. */
SLATE_ATTRIBUTE ( FText , OnNewChangelistTooltip )
/** Make the 'plus' button visible or not. */
SLATE_ARGUMENT ( EVisibility , NewButtonVisibility )
/** Make the 'search' button visible or not. */
SLATE_ARGUMENT ( EVisibility , SearchButtonVisibility )
SLATE_END_ARGS ( )
void Construct ( const FArguments & InArgs )
{
SearchBox = SNew ( SSearchBox ) ;
ChildSlot
[
SAssignNew ( ExpandableArea , SExpandableArea )
. BorderImage ( FAppStyle : : Get ( ) . GetBrush ( " Brushes.Header " ) )
. BodyBorderImage ( FAppStyle : : Get ( ) . GetBrush ( " Brushes.Recessed " ) )
. HeaderPadding ( FMargin ( 4.0f , 3.0f ) )
. AllowAnimatedTransition ( false )
. HeaderContent ( )
[
SNew ( SHorizontalBox )
+ SHorizontalBox : : Slot ( )
. VAlign ( VAlign_Center )
[
SNew ( STextBlock )
. Text ( InArgs . _HeaderText )
. TextStyle ( FAppStyle : : Get ( ) , " ButtonText " )
. Font ( FAppStyle : : Get ( ) . GetFontStyle ( " NormalFontBold " ) )
]
+ SHorizontalBox : : Slot ( )
. VAlign ( VAlign_Center )
. HAlign ( HAlign_Right )
. AutoWidth ( )
. Padding ( 4.0f , 0.0f , 0.0f , 0.0f )
[
SNew ( SButton )
. ButtonStyle ( FAppStyle : : Get ( ) , " SimpleButton " )
. ToolTipText ( InArgs . _OnNewChangelistTooltip )
. OnClicked ( InArgs . _OnNewChangelist )
. ContentPadding ( FMargin ( 1 , 0 ) )
. Visibility ( InArgs . _NewButtonVisibility )
[
SNew ( SImage )
. Image ( FAppStyle : : Get ( ) . GetBrush ( " Icons.PlusCircle " ) )
. ColorAndOpacity ( FSlateColor : : UseForeground ( ) )
]
]
+ SHorizontalBox : : Slot ( )
. VAlign ( VAlign_Center )
. HAlign ( HAlign_Right )
. AutoWidth ( )
. Padding ( 4.0f , 0.0f )
[
SNew ( SBox )
. Visibility ( InArgs . _SearchButtonVisibility )
[
SNew ( SExpandableSearchButton , SearchBox . ToSharedRef ( ) )
]
]
]
. BodyContent ( )
[
SNew ( SVerticalBox )
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
// Should blend in visually with the header but technically acts like part of the body
SNew ( SBorder )
. BorderImage ( FAppStyle : : Get ( ) . GetBrush ( " Brushes.Header " ) )
. Padding ( FMargin ( 4.0f , 2.0f ) )
[
SearchBox . ToSharedRef ( )
]
]
+ SVerticalBox : : Slot ( )
[
SNew ( SBorder )
. BorderImage ( FAppStyle : : Get ( ) . GetBrush ( " Brushes.Recessed " ) )
[
InArgs . _ChangelistView . ToSharedRef ( )
]
]
]
] ;
}
bool IsExpanded ( ) const { return ExpandableArea - > IsExpanded ( ) ; }
private :
TSharedPtr < SExpandableArea > ExpandableArea ;
TSharedPtr < SSearchBox > SearchBox ;
} ;
2021-01-11 15:31:58 -04:00
void SSourceControlChangelistsWidget : : Construct ( const FArguments & InArgs )
{
2021-01-13 11:07:12 -04:00
// Register delegates
ISourceControlModule & SCCModule = ISourceControlModule : : Get ( ) ;
2021-05-26 18:15:46 -04:00
FUncontrolledChangelistsModule & UncontrolledChangelistModule = FUncontrolledChangelistsModule : : Get ( ) ;
2021-01-13 11:07:12 -04:00
SCCModule . RegisterProviderChanged ( FSourceControlProviderChanged : : FDelegate : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnSourceControlProviderChanged ) ) ;
SourceControlStateChangedDelegateHandle = SCCModule . GetProvider ( ) . RegisterSourceControlStateChanged_Handle ( FSourceControlStateChanged : : FDelegate : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnSourceControlStateChanged ) ) ;
2021-05-26 18:15:46 -04:00
UncontrolledChangelistModule . OnUncontrolledChangelistModuleChanged . AddSP ( this , & SSourceControlChangelistsWidget : : OnSourceControlStateChanged ) ;
2021-01-13 11:07:12 -04:00
2022-09-07 17:15:39 -04:00
PrimarySortedColumn = SourceControlFileViewColumnId : : Name ;
2022-09-06 15:43:24 -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
ChangelistTreeView = CreateChangelistTreeView ( ChangelistTreeNodes ) ;
UncontrolledChangelistTreeView = CreateChangelistTreeView ( UncontrolledChangelistTreeNodes ) ;
FileTreeView = CreateChangelistFilesView ( ) ;
ChangelistExpandableArea = SNew ( SExpandableChangelistArea )
. HeaderText_Lambda ( [ this ] ( ) { return FText : : Format ( LOCTEXT ( " SourceControl_ChangeLists " , " Changelists ({0}) " ) , ChangelistTreeNodes . Num ( ) ) ; } )
. ChangelistView ( ChangelistTreeView . ToSharedRef ( ) )
. OnNewChangelist_Lambda ( [ this ] ( ) { OnNewChangelist ( ) ; return FReply : : Handled ( ) ; } )
. OnNewChangelistTooltip ( LOCTEXT ( " Create_New_Changelist " , " Create a new changelist. " ) )
. SearchButtonVisibility ( EVisibility : : Collapsed ) ; // Functionality is planned but not fully implemented yet.
UncontrolledChangelistExpandableArea = SNew ( SExpandableChangelistArea )
. HeaderText_Lambda ( [ this ] ( ) { return FText : : Format ( LOCTEXT ( " SourceControl_UncontrolledChangeLists " , " Uncontrolled Changelists ({0}) " ) , UncontrolledChangelistTreeNodes . Num ( ) ) ; } )
. ChangelistView ( UncontrolledChangelistTreeView . ToSharedRef ( ) )
2022-09-08 09:19:01 -04:00
. OnNewChangelist_Lambda ( [ this ] ( ) { OnNewUncontrolledChangelist ( ) ; return FReply : : Handled ( ) ; } )
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
. OnNewChangelistTooltip ( LOCTEXT ( " Create_New_Uncontrolled_Changelist " , " Create a new uncontrolled changelist. " ) )
. SearchButtonVisibility ( EVisibility : : Collapsed ) ; // Functionality is planned but not fully implemented yet.
2021-01-11 15:31:58 -04:00
ChildSlot
2021-01-13 16:50:22 -04:00
[
2021-01-27 15:28:56 -04:00
SNew ( SVerticalBox )
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
+ SVerticalBox : : Slot ( ) // For the toolbar (Refresh button)
2021-01-27 15:28:56 -04:00
. AutoHeight ( )
2021-01-11 15:31:58 -04:00
[
2021-01-27 15:28:56 -04:00
SNew ( SBorder )
2022-05-09 13:12:28 -04:00
. BorderImage ( FAppStyle : : GetBrush ( " ToolPanel.GroupBorder " ) )
2021-01-27 15:28:56 -04:00
. Padding ( 4 )
[
SNew ( SHorizontalBox )
+ SHorizontalBox : : Slot ( )
. HAlign ( HAlign_Left )
. VAlign ( VAlign_Center )
. AutoWidth ( )
[
MakeToolBar ( )
]
]
]
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
+ SVerticalBox : : Slot ( ) // Everything below the tools bar: changelist expandable areas + files views + status bar at the bottom
2021-01-27 15:28:56 -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
SNew ( SOverlay )
+ SOverlay : : Slot ( )
2021-01-27 15:28:56 -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
SNew ( SBox )
. Visibility_Lambda ( [ ] ( ) { return ! AreChangelistsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
. HAlign ( HAlign_Center )
. VAlign ( VAlign_Center )
[
SNew ( STextBlock )
. Text ( LOCTEXT ( " SourceControl_Disabled " , " The source control is disabled or it doesn't support changelists. " ) )
]
]
+ SOverlay : : Slot ( )
[
SNew ( SSplitter )
. Orientation ( EOrientation : : Orient_Horizontal )
. ResizeMode ( ESplitterResizeMode : : FixedPosition )
. Visibility_Lambda ( [ ] ( ) { return AreChangelistsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
// Left slot: Changelists and uncontrolled changelists areas
+ SSplitter : : Slot ( )
. Resizable ( true )
. Value ( 0.30 )
[
SNew ( SOverlay ) // Visible when both Controlled and Uncontrolled changelists are enabled (Need to add a splitter)
+ SOverlay : : Slot ( )
[
SNew ( SSplitter )
. Orientation ( EOrientation : : Orient_Vertical )
. Visibility_Lambda ( [ ] ( ) { return AreControlledChangelistsEnabled ( ) & & AreUncontrolledChangelistsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
// Top slot: Changelists
+ SSplitter : : Slot ( )
. SizeRule_Lambda ( [ this ] ( ) { return ChangelistExpandableArea - > IsExpanded ( ) ? SSplitter : : ESizeRule : : FractionOfParent : SSplitter : : ESizeRule : : SizeToContent ; } )
. Value ( 0.7 )
[
ChangelistExpandableArea . ToSharedRef ( )
]
// Bottom slot: Uncontrolled Changelists
+ SSplitter : : Slot ( )
. SizeRule_Lambda ( [ this ] ( ) { return UncontrolledChangelistExpandableArea - > IsExpanded ( ) ? SSplitter : : ESizeRule : : FractionOfParent : SSplitter : : ESizeRule : : SizeToContent ; } )
. Value ( 0.3 )
[
UncontrolledChangelistExpandableArea . ToSharedRef ( )
]
]
+ SOverlay : : Slot ( ) // Visibile when controlled changelists are enabled but not the uncontrolled ones.
[
SNew ( SBox )
. Visibility_Lambda ( [ ] ( ) { return AreControlledChangelistsEnabled ( ) & & ! AreUncontrolledChangelistsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
[
ChangelistExpandableArea . ToSharedRef ( )
]
]
+ SOverlay : : Slot ( ) // Visible when uncontrolled changelist are enabled, but not the controlled ones.
[
SNew ( SBox )
. Visibility_Lambda ( [ ] ( ) { return ! AreControlledChangelistsEnabled ( ) & & AreUncontrolledChangelistsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
[
UncontrolledChangelistExpandableArea . ToSharedRef ( )
]
]
]
// Right slot: Files associated to the selected the changelist/uncontrolled changelist.
+ SSplitter : : Slot ( )
. Resizable ( true )
[
SNew ( SScrollBorder , FileTreeView . ToSharedRef ( ) )
[
FileTreeView . ToSharedRef ( )
]
]
2021-01-27 15:28:56 -04:00
]
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
+ SVerticalBox : : Slot ( ) // Status bar (Always visible if uncontrolled changelist are enabled to keep the reconcile status visible at all time)
2021-03-24 08:29:57 -04:00
. AutoHeight ( )
[
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
SNew ( SBox )
. Padding ( 0 , 3 )
. Visibility_Lambda ( [ this ] ( ) { return FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) | | ! RefreshStatus . IsEmpty ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
2021-03-24 08:29:57 -04:00
[
2021-05-26 18:15:46 -04:00
SNew ( SHorizontalBox )
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
+ SHorizontalBox : : Slot ( )
2021-05-26 18:15:46 -04:00
. HAlign ( HAlign_Left )
. VAlign ( VAlign_Center )
[
SNew ( STextBlock )
. Text_Lambda ( [ this ] ( ) { return 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
+ SHorizontalBox : : Slot ( )
2021-05-26 18:15:46 -04:00
. HAlign ( HAlign_Right )
. VAlign ( VAlign_Center )
[
SNew ( STextBlock )
. Text_Lambda ( [ ] ( ) { return FUncontrolledChangelistsModule : : Get ( ) . GetReconcileStatus ( ) ; } )
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
. Visibility_Lambda ( [ ] ( ) { return FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) ? EVisibility : : Visible : EVisibility : : Collapsed ; } )
2021-05-26 18:15:46 -04:00
]
2021-03-24 08:29:57 -04:00
]
]
2021-01-13 16:50:22 -04:00
] ;
bShouldRefresh = true ;
2021-01-11 15:31:58 -04:00
}
2021-01-27 15:28:56 -04:00
TSharedRef < SWidget > SSourceControlChangelistsWidget : : MakeToolBar ( )
{
FSlimHorizontalToolBarBuilder ToolBarBuilder ( nullptr , FMultiBoxCustomization : : None ) ;
ToolBarBuilder . AddToolBarButton (
FUIAction (
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
FExecuteAction : : CreateLambda ( [ this ] ( ) { RequestRefresh ( ) ; } ) ) ,
NAME_None ,
LOCTEXT ( " SourceControl_RefreshButton " , " Refresh " ) ,
LOCTEXT ( " SourceControl_RefreshButton_Tooltip " , " Refreshes changelists from source control provider. " ) ,
FSlateIcon ( FAppStyle : : GetAppStyleSetName ( ) , " SourceControl.Actions.Refresh " ) ) ;
2021-03-24 08:29:57 -04:00
2021-01-27 15:28:56 -04:00
return ToolBarBuilder . MakeWidget ( ) ;
}
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 SSourceControlChangelistsWidget : : EditChangelistDescription ( const FText & InNewChangelistDescription , const FSourceControlChangelistStatePtr & InChangelistState )
2021-04-19 11:21:23 -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
TSharedRef < FEditChangelist > EditChangelistOperation = ISourceControlOperation : : Create < FEditChangelist > ( ) ;
2021-04-19 11:21:23 -04:00
EditChangelistOperation - > SetDescription ( InNewChangelistDescription ) ;
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
Execute ( LOCTEXT ( " Updating_Changelist_Description " , " Updating changelist description... " ) , EditChangelistOperation , InChangelistState - > GetChangelist ( ) , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Update_Changelist_Description_Succeeded " , " Changelist description successfully updated. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Update_Changelist_Description_Failed " , " Failed to update changelist description. " ) , SNotificationItem : : CS_Fail ) ;
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-04-19 11:21:23 -04:00
}
2021-01-13 16:50:22 -04:00
void SSourceControlChangelistsWidget : : Tick ( const FGeometry & AllottedGeometry , const double InCurrentTime , const float InDeltaTime )
{
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
// Detect transitions of the source control being available/unavailable. Ex: When the user changes the source control in UI, the provider gets selected,
// but it is not connected/available until the user accepts the settings. The source control doesn't have callback for availability and we want to refresh everything
// once it gets available.
if ( ISourceControlModule : : Get ( ) . IsEnabled ( ) & & ! bSourceControlAvailable & & ISourceControlModule : : Get ( ) . GetProvider ( ) . IsAvailable ( ) )
{
bSourceControlAvailable = true ;
bShouldRefresh = true ;
}
2021-01-13 16:50:22 -04:00
if ( bShouldRefresh )
{
2021-06-08 17:12:06 -04:00
if ( ISourceControlModule : : Get ( ) . IsEnabled ( ) | | FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) )
2021-01-13 16:50:22 -04:00
{
RequestRefresh ( ) ;
}
else
{
// No provider available, clear changelist tree
ClearChangelistsTree ( ) ;
}
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
bShouldRefresh = false ;
2021-01-13 16:50:22 -04:00
}
2021-03-24 08:29:57 -04:00
if ( bIsRefreshing )
{
TickRefreshStatus ( InDeltaTime ) ;
}
2021-01-13 16:50:22 -04:00
}
void SSourceControlChangelistsWidget : : RequestRefresh ( )
2021-01-11 15:31:58 -04:00
{
2021-06-08 17:12:06 -04:00
bool bAnyProviderAvailable = false ;
2021-01-13 11:07:12 -04:00
if ( ISourceControlModule : : Get ( ) . IsEnabled ( ) )
{
2021-06-08 17:12:06 -04:00
bAnyProviderAvailable = true ;
2021-03-24 08:29:57 -04:00
StartRefreshStatus ( ) ;
2021-01-13 16:50:22 -04:00
TSharedRef < FUpdatePendingChangelistsStatus , ESPMode : : ThreadSafe > UpdatePendingChangelistsOperation = ISourceControlOperation : : Create < FUpdatePendingChangelistsStatus > ( ) ;
2021-01-13 11:07:12 -04:00
UpdatePendingChangelistsOperation - > SetUpdateAllChangelists ( true ) ;
UpdatePendingChangelistsOperation - > SetUpdateFilesStates ( true ) ;
2021-01-26 09:19:24 -04:00
UpdatePendingChangelistsOperation - > SetUpdateShelvedFilesStates ( true ) ;
2021-01-11 15:31:58 -04:00
2021-01-13 11:07:12 -04:00
ISourceControlProvider & SourceControlProvider = ISourceControlModule : : Get ( ) . GetProvider ( ) ;
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
SourceControlProvider . Execute ( UpdatePendingChangelistsOperation , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnChangelistsStatusUpdated ) ) ;
OnStartSourceControlOperation ( UpdatePendingChangelistsOperation , LOCTEXT ( " SourceControl_UpdatingChangelist " , " Updating changelists... " ) ) ;
2021-06-08 17:12:06 -04:00
}
if ( FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) )
{
bAnyProviderAvailable = true ;
2021-05-06 14:40:16 -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
// This operation is synchronous and completes right away.
FUncontrolledChangelistsModule : : Get ( ) . UpdateStatus ( ) ;
2021-01-13 11:07:12 -04:00
}
2021-06-08 17:12:06 -04:00
if ( ! bAnyProviderAvailable )
2021-01-13 11:07:12 -04:00
{
// No provider available, clear changelist tree
2021-01-13 16:50:22 -04:00
ClearChangelistsTree ( ) ;
}
}
2021-03-24 08:29:57 -04:00
void SSourceControlChangelistsWidget : : StartRefreshStatus ( )
{
bIsRefreshing = true ;
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
RefreshStatusStartSecs = FPlatformTime : : Seconds ( ) ;
2021-03-24 08:29:57 -04:00
}
void SSourceControlChangelistsWidget : : TickRefreshStatus ( double InDeltaTime )
{
2022-08-23 13:05:52 -04:00
int32 RefreshStatusTimeElapsed = static_cast < int32 > ( FPlatformTime : : Seconds ( ) - RefreshStatusStartSecs ) ;
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
RefreshStatus = FText : : Format ( LOCTEXT ( " SourceControl_RefreshStatus " , " Refreshing changelists... ({0} s) " ) , FText : : AsNumber ( RefreshStatusTimeElapsed ) ) ;
2021-03-24 08:29:57 -04:00
}
void SSourceControlChangelistsWidget : : EndRefreshStatus ( )
{
bIsRefreshing = false ;
}
2021-01-13 16:50:22 -04:00
void SSourceControlChangelistsWidget : : ClearChangelistsTree ( )
{
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
if ( ! ChangelistTreeNodes . IsEmpty ( ) | | ! UncontrolledChangelistTreeNodes . IsEmpty ( ) )
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
ChangelistTreeNodes . Reset ( ) ;
UncontrolledChangelistTreeNodes . Reset ( ) ;
ChangelistTreeView - > RequestTreeRefresh ( ) ;
UncontrolledChangelistTreeView - > RequestTreeRefresh ( ) ;
}
if ( ! FileTreeNodes . IsEmpty ( ) )
{
FileTreeNodes . Reset ( ) ;
FileTreeView - > RequestTreeRefresh ( ) ;
2021-01-13 11:07:12 -04:00
}
}
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
void SSourceControlChangelistsWidget : : OnRefresh ( )
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
if ( ! AreChangelistsEnabled ( ) )
2021-01-13 11:07:12 -04:00
{
2021-01-13 16:50:22 -04:00
ClearChangelistsTree ( ) ;
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
return ;
2021-01-11 15:31:58 -04:00
}
2021-03-24 08:29:57 -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
// Views will be teared down and rebuilt from scratch, save the items that are expanded and/or selected to be able to restore those states after the rebuild.
FExpandedAndSelectionStates ExpandedAndSelectedStates ;
SaveExpandedAndSelectionStates ( ExpandedAndSelectedStates ) ;
// Query the source control
ISourceControlProvider & SourceControlProvider = ISourceControlModule : : Get ( ) . GetProvider ( ) ;
FUncontrolledChangelistsModule & UncontrolledChangelistModule = FUncontrolledChangelistsModule : : Get ( ) ;
TArray < FSourceControlChangelistRef > Changelists = SourceControlProvider . GetChangelists ( EStateCacheUsage : : Use ) ;
TArray < TSharedRef < FUncontrolledChangelistState > > UncontrolledChangelistStates = UncontrolledChangelistModule . GetChangelistStates ( ) ;
TArray < FSourceControlChangelistStateRef > ChangelistsStates ;
SourceControlProvider . GetState ( Changelists , ChangelistsStates , EStateCacheUsage : : Use ) ;
// Count number of steps for slow task...
int32 ElementsToProcess = ChangelistsStates . Num ( ) ;
ElementsToProcess + = UncontrolledChangelistStates . Num ( ) ;
for ( const TSharedRef < ISourceControlChangelistState > & ChangelistState : ChangelistsStates )
{
ElementsToProcess + = ChangelistState - > GetFilesStates ( ) . Num ( ) ;
ElementsToProcess + = ChangelistState - > GetShelvedFilesStates ( ) . Num ( ) ;
}
for ( const TSharedRef < FUncontrolledChangelistState > & UncontrolledChangelistState : UncontrolledChangelistStates )
{
ElementsToProcess + = UncontrolledChangelistState - > GetFilesStates ( ) . Num ( ) ;
ElementsToProcess + = UncontrolledChangelistState - > GetOfflineFiles ( ) . Num ( ) ;
}
FScopedSlowTask SlowTask ( ElementsToProcess , LOCTEXT ( " SourceControl_RebuildTree " , " Refreshing Tree Items " ) ) ;
2022-08-23 13:05:52 -04:00
SlowTask . MakeDialogDelayed ( 1.5f , /*bShowCancelButton=*/ true ) ;
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
// Rebuild the tree data models
bool bBeautifyPaths = true ;
ChangelistTreeNodes . Reset ( ChangelistsStates . Num ( ) ) ;
UncontrolledChangelistTreeNodes . Reset ( UncontrolledChangelistStates . Num ( ) ) ;
FileTreeNodes . Reset ( ) ;
for ( const TSharedRef < ISourceControlChangelistState > & ChangelistState : ChangelistsStates )
{
// Add a changelist.
TSharedRef < IChangelistTreeItem > ChangelistNode = MakeShared < FChangelistTreeItem > ( ChangelistState ) ;
ChangelistTreeNodes . Add ( ChangelistNode ) ;
for ( const TSharedRef < ISourceControlState > & FileState : ChangelistState - > GetFilesStates ( ) )
{
ChangelistNode - > AddChild ( MakeShared < FFileTreeItem > ( FileState , bBeautifyPaths ) ) ;
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
if ( ChangelistState - > GetShelvedFilesStates ( ) . Num ( ) > 0 )
{
// Add a shelved files node under the changelist.
TSharedRef < IChangelistTreeItem > ShelvedFilesNode = MakeShared < FShelvedChangelistTreeItem > ( ) ;
ChangelistNode - > AddChild ( ShelvedFilesNode ) ;
for ( const TSharedRef < ISourceControlState > & ShelvedFileState : ChangelistState - > GetShelvedFilesStates ( ) )
{
ShelvedFilesNode - > AddChild ( MakeShared < FShelvedFileTreeItem > ( ShelvedFileState , bBeautifyPaths ) ) ;
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
}
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
for ( const TSharedRef < FUncontrolledChangelistState > & UncontrolledChangelistState : UncontrolledChangelistStates )
{
// Add an uncontrolled changelist.
TSharedRef < IChangelistTreeItem > UncontrolledChangelistNode = MakeShared < FUncontrolledChangelistTreeItem > ( UncontrolledChangelistState ) ;
UncontrolledChangelistTreeNodes . Add ( UncontrolledChangelistNode ) ;
for ( const TSharedRef < ISourceControlState > & FileState : UncontrolledChangelistState - > GetFilesStates ( ) )
{
UncontrolledChangelistNode - > AddChild ( MakeShared < FFileTreeItem > ( FileState , bBeautifyPaths ) ) ;
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
for ( const FString & Filename : UncontrolledChangelistState - > GetOfflineFiles ( ) )
{
UncontrolledChangelistNode - > AddChild ( MakeShared < FOfflineFileTreeItem > ( Filename ) ) ;
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
SlowTask . EnterProgressFrame ( ) ;
bBeautifyPaths & = ! SlowTask . ShouldCancel ( ) ;
}
// Views were rebuilt from scratch, try expanding and selecting the nodes that were in that state before the update.
RestoreExpandedAndSelectionStates ( ExpandedAndSelectedStates ) ;
2022-08-29 14:51:36 -04:00
if ( FilesToSelect . Num ( ) > 0 )
{
TArray < FString > LocalFilesToSelect ( MoveTemp ( FilesToSelect ) ) ;
SetSelectedFiles ( LocalFilesToSelect ) ;
}
2022-09-06 15:43:24 -04:00
// Restore the sort order.
SortFileView ( ) ;
ChangelistTreeView - > RequestTreeRefresh ( ) ;
UncontrolledChangelistTreeView - > RequestTreeRefresh ( ) ;
FileTreeView - > RequestTreeRefresh ( ) ;
2021-01-11 15:31:58 -04:00
}
2021-01-13 16:50:22 -04:00
void SSourceControlChangelistsWidget : : OnSourceControlProviderChanged ( ISourceControlProvider & OldProvider , ISourceControlProvider & NewProvider )
2021-01-11 15:31:58 -04:00
{
2021-01-13 16:50:22 -04:00
OldProvider . UnregisterSourceControlStateChanged_Handle ( SourceControlStateChangedDelegateHandle ) ;
SourceControlStateChangedDelegateHandle = NewProvider . RegisterSourceControlStateChanged_Handle ( FSourceControlStateChanged : : FDelegate : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnSourceControlStateChanged ) ) ;
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
bSourceControlAvailable = NewProvider . IsAvailable ( ) ; // Check if it is connected.
2021-01-13 16:50:22 -04:00
bShouldRefresh = true ;
}
2021-01-11 15:31:58 -04:00
2021-01-13 16:50:22 -04:00
void SSourceControlChangelistsWidget : : OnSourceControlStateChanged ( )
{
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
// NOTE: No need to call RequestRefresh() to force the SCC to update internal states. We are being invoked because it was update, we just
// need to update the UI to reflect those state changes.
OnRefresh ( ) ;
2021-01-13 16:50:22 -04:00
}
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
void SSourceControlChangelistsWidget : : OnChangelistsStatusUpdated ( const TSharedRef < ISourceControlOperation > & InOperation , ECommandResult : : Type InType )
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
// NOTE: This is invoked when the 'FUpdatePendingChangelistsStatus' completes. No need to refresh the tree views because OnSourceControlStateChanged() is also called.
OnEndSourceControlOperation ( InOperation , InType ) ;
EndRefreshStatus ( ) ; // TODO PL: Need to uniformize all operations status update. The 'Status Update' is different as it displays the time it takes.
2021-01-11 15:31:58 -04:00
}
2021-01-13 20:52:07 -04:00
void SChangelistTree : : Private_SetItemSelection ( FChangelistTreeItemPtr TheItem , bool bShouldBeSelected , bool bWasUserDirected )
{
bool bAllowSelectionChange = true ;
if ( bShouldBeSelected & & ! SelectedItems . IsEmpty ( ) )
{
// Prevent selecting changelists and files at the same time.
FChangelistTreeItemPtr CurrentlySelectedItem = ( * SelectedItems . begin ( ) ) ;
if ( TheItem - > GetTreeItemType ( ) ! = CurrentlySelectedItem - > GetTreeItemType ( ) )
{
bAllowSelectionChange = false ;
}
// Prevent selecting items that don't share the same root
else if ( TheItem - > GetParent ( ) ! = CurrentlySelectedItem - > GetParent ( ) )
{
bAllowSelectionChange = false ;
}
}
if ( bAllowSelectionChange )
{
STreeView : : Private_SetItemSelection ( TheItem , bShouldBeSelected , bWasUserDirected ) ;
}
}
2021-01-18 09:42:33 -04:00
FSourceControlChangelistStatePtr SSourceControlChangelistsWidget : : GetCurrentChangelistState ( )
{
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
if ( ! ChangelistTreeView )
2021-01-18 09:42:33 -04:00
{
return nullptr ;
}
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 > > SelectedItems = ChangelistTreeView - > GetSelectedItems ( ) ;
2021-01-18 09:42:33 -04:00
if ( SelectedItems . Num ( ) ! = 1 | | SelectedItems [ 0 ] - > GetTreeItemType ( ) ! = IChangelistTreeItem : : Changelist )
{
return nullptr ;
}
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
return StaticCastSharedPtr < FChangelistTreeItem > ( SelectedItems [ 0 ] ) - > ChangelistState ;
2021-01-18 09:42:33 -04:00
}
2022-09-07 18:11:16 -04:00
FUncontrolledChangelistStatePtr SSourceControlChangelistsWidget : : GetCurrentUncontrolledChangelistState ( ) const
2021-06-14 15:25:20 -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
if ( ! UncontrolledChangelistTreeView )
2021-06-14 15:25:20 -04:00
{
return nullptr ;
}
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 > > SelectedItems = UncontrolledChangelistTreeView - > GetSelectedItems ( ) ;
2021-06-14 15:25:20 -04:00
if ( SelectedItems . Num ( ) ! = 1 | | SelectedItems [ 0 ] - > GetTreeItemType ( ) ! = IChangelistTreeItem : : UncontrolledChangelist )
{
return nullptr ;
}
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
return StaticCastSharedPtr < FUncontrolledChangelistTreeItem > ( SelectedItems [ 0 ] ) - > UncontrolledChangelistState ;
2021-06-14 15:25:20 -04:00
}
2021-01-18 09:42:33 -04:00
FSourceControlChangelistPtr SSourceControlChangelistsWidget : : GetCurrentChangelist ( )
{
FSourceControlChangelistStatePtr ChangelistState = GetCurrentChangelistState ( ) ;
return ChangelistState ? ( FSourceControlChangelistPtr ) ( ChangelistState - > GetChangelist ( ) ) : nullptr ;
}
2022-09-07 18:11:16 -04:00
TOptional < FUncontrolledChangelist > SSourceControlChangelistsWidget : : GetCurrentUncontrolledChangelist ( ) const
{
FUncontrolledChangelistStatePtr UncontrolledChangelistState = GetCurrentUncontrolledChangelistState ( ) ;
return UncontrolledChangelistState ? UncontrolledChangelistState - > Changelist : TOptional < FUncontrolledChangelist > ( ) ;
}
2021-01-26 09:19:24 -04:00
FSourceControlChangelistStatePtr SSourceControlChangelistsWidget : : GetChangelistStateFromSelection ( )
2021-01-18 09:42:33 -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
TArray < FChangelistTreeItemPtr > SelectedItems = ChangelistTreeView - > GetSelectedItems ( ) ;
if ( SelectedItems . Num ( ) = = 0 )
2021-01-18 09:42:33 -04:00
{
return nullptr ;
}
2021-01-26 09:19:24 -04:00
FChangelistTreeItemPtr Item = SelectedItems [ 0 ] ;
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
while ( Item )
2021-01-18 09:42:33 -04:00
{
2021-01-26 09:19:24 -04:00
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
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-26 09:19:24 -04:00
return StaticCastSharedPtr < FChangelistTreeItem > ( Item ) - > ChangelistState ;
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
}
Item = Item - > GetParent ( ) ;
2021-01-18 09:42:33 -04:00
}
2021-01-26 09:19:24 -04:00
return nullptr ;
2021-01-18 09:42:33 -04:00
}
2021-01-26 09:19:24 -04:00
FSourceControlChangelistPtr SSourceControlChangelistsWidget : : GetChangelistFromSelection ( )
2021-01-18 09:42:33 -04:00
{
2021-01-26 09:19:24 -04:00
FSourceControlChangelistStatePtr ChangelistState = GetChangelistStateFromSelection ( ) ;
2021-01-18 09:42:33 -04:00
return ChangelistState ? ( FSourceControlChangelistPtr ) ( ChangelistState - > GetChangelist ( ) ) : nullptr ;
}
2022-08-29 14:51:36 -04:00
void SSourceControlChangelistsWidget : : SetSelectedFiles ( const TArray < FString > & Filenames )
{
if ( bShouldRefresh | | bIsRefreshing )
{
FilesToSelect = Filenames ;
return ;
}
check ( Filenames . Num ( ) > 0 ) ;
2022-09-06 15:43:24 -04:00
2022-08-29 14:51:36 -04:00
// Finds the Changelist tree item containing this Filename if it exists.
auto FindChangelist = [ this ] ( const FString & Filename ) - > TSharedPtr < IChangelistTreeItem >
{
for ( const TSharedPtr < IChangelistTreeItem > & Item : ChangelistTreeNodes )
{
for ( const TSharedPtr < IChangelistTreeItem > & ChildItem : Item - > GetChildren ( ) )
{
if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
const FString & ChildFilename = StaticCastSharedPtr < FFileTreeItem > ( ChildItem ) - > FileState - > GetFilename ( ) ;
if ( ChildFilename . Compare ( Filename , ESearchCase : : IgnoreCase ) = = 0 )
{
return Item ;
}
}
}
}
for ( const TSharedPtr < IChangelistTreeItem > & Item : UncontrolledChangelistTreeNodes )
{
for ( const TSharedPtr < IChangelistTreeItem > & ChildItem : Item - > GetChildren ( ) )
{
if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
const FString & ChildFilename = StaticCastSharedPtr < FFileTreeItem > ( ChildItem ) - > FileState - > GetFilename ( ) ;
if ( ChildFilename . Compare ( Filename , ESearchCase : : IgnoreCase ) = = 0 )
{
return Item ;
}
}
else if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : OfflineFile )
{
const FString & ChildFilename = StaticCastSharedPtr < FOfflineFileTreeItem > ( ChildItem ) - > GetFilename ( ) ;
if ( ChildFilename . Compare ( Filename , ESearchCase : : IgnoreCase ) = = 0 )
{
return Item ;
}
}
}
}
return nullptr ;
} ;
2022-09-06 15:43:24 -04:00
2022-08-29 14:51:36 -04:00
TSharedPtr < IChangelistTreeItem > FoundChangelistTreeItem = nullptr ;
// Find filename in Changelist, since filenames might not be in same Changelist, start from the last Filename as it might be the last selected one and give it priority
for ( int32 Index = Filenames . Num ( ) - 1 ; Index > = 0 ; - - Index )
{
if ( TSharedPtr < IChangelistTreeItem > ChangelistTreeItem = FindChangelist ( Filenames [ Index ] ) )
{
FoundChangelistTreeItem = ChangelistTreeItem ;
break ;
}
}
// If we found a Changelist, select files
if ( FoundChangelistTreeItem )
{
// Save current Selection/Expansion state
FExpandedAndSelectionStates State ;
SaveExpandedAndSelectionStates ( State ) ;
State . SelectedChangelistNode = nullptr ;
State . SelectedUncontrolledChangelistNode = nullptr ;
State . SelectedFileNodes . Empty ( ) ;
// To make search faster store all filenames lower case
TSet < FString > FilenamesLowerCase ;
Algo : : Transform ( Filenames , FilenamesLowerCase , [ ] ( const FString & Filename ) { return Filename . ToLower ( ) ; } ) ;
if ( FoundChangelistTreeItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
State . SelectedChangelistNode = StaticCastSharedPtr < FChangelistTreeItem > ( FoundChangelistTreeItem ) ;
for ( const TSharedPtr < IChangelistTreeItem > & ChildItem : FoundChangelistTreeItem - > GetChildren ( ) )
{
if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
const FString & ChildFilename = StaticCastSharedPtr < FFileTreeItem > ( ChildItem ) - > FileState - > GetFilename ( ) . ToLower ( ) ;
if ( FilenamesLowerCase . Contains ( ChildFilename ) )
{
State . SelectedFileNodes . Add ( ChildItem ) ;
}
}
}
}
else if ( FoundChangelistTreeItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
State . SelectedUncontrolledChangelistNode = StaticCastSharedPtr < FUncontrolledChangelistTreeItem > ( FoundChangelistTreeItem ) ;
for ( const TSharedPtr < IChangelistTreeItem > & ChildItem : FoundChangelistTreeItem - > GetChildren ( ) )
{
if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
const FString & ChildFilename = StaticCastSharedPtr < FFileTreeItem > ( ChildItem ) - > FileState - > GetFilename ( ) . ToLower ( ) ;
if ( FilenamesLowerCase . Contains ( ChildFilename ) )
{
State . SelectedFileNodes . Add ( ChildItem ) ;
}
}
else if ( ChildItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : OfflineFile )
{
const FString & ChildFilename = StaticCastSharedPtr < FOfflineFileTreeItem > ( ChildItem ) - > GetFilename ( ) . ToLower ( ) ;
if ( FilenamesLowerCase . Contains ( ChildFilename ) )
{
State . SelectedFileNodes . Add ( ChildItem ) ;
}
}
}
}
RestoreExpandedAndSelectionStates ( State ) ;
2022-09-06 15:43:24 -04:00
// Restore the sort order.
SortFileView ( ) ;
2022-08-29 14:51:36 -04:00
}
}
2021-01-18 09:42:33 -04:00
TArray < FString > SSourceControlChangelistsWidget : : GetSelectedFiles ( )
{
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 < FChangelistTreeItemPtr > SelectedItems = FileTreeView - > GetSelectedItems ( ) ;
TArray < FString > Files ;
2021-01-18 09:42:33 -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
for ( const TSharedPtr < IChangelistTreeItem > & Item : SelectedItems )
2021-01-18 09:42:33 -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
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
2021-01-18 09:42:33 -04:00
{
Files . Add ( StaticCastSharedPtr < FFileTreeItem > ( Item ) - > FileState - > GetFilename ( ) ) ;
}
}
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
return Files ;
2021-01-18 09:42:33 -04:00
}
2021-06-14 15:25:20 -04:00
void SSourceControlChangelistsWidget : : GetSelectedFiles ( TArray < FString > & OutControlledFiles , TArray < FString > & OutUncontrolledFiles )
{
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 < FChangelistTreeItemPtr > SelectedItems = FileTreeView - > GetSelectedItems ( ) ;
2021-06-14 15:25:20 -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
for ( const TSharedPtr < IChangelistTreeItem > & Item : SelectedItems )
2021-06-14 15:25:20 -04:00
{
2022-08-26 11:04:20 -04:00
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
2021-06-14 15:25:20 -04:00
{
2022-08-26 11:04:20 -04:00
if ( TSharedPtr < IChangelistTreeItem > Parent = Item - > GetParent ( ) )
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-08-26 11:04:20 -04:00
const FString & Filename = StaticCastSharedPtr < FFileTreeItem > ( Item ) - > FileState - > GetFilename ( ) ;
if ( Parent - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
OutControlledFiles . Add ( Filename ) ;
}
else if ( Parent - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
OutUncontrolledFiles . Add ( Filename ) ;
}
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-08-26 11:04:20 -04:00
}
else if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : OfflineFile )
{
if ( TSharedPtr < IChangelistTreeItem > Parent = Item - > GetParent ( ) )
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-08-26 11:04:20 -04:00
if ( Parent - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
const FString & Filename = StaticCastSharedPtr < FOfflineFileTreeItem > ( Item ) - > GetFilename ( ) ;
OutUncontrolledFiles . Add ( Filename ) ;
}
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-06-14 15:25:20 -04:00
}
}
}
void SSourceControlChangelistsWidget : : GetSelectedFileStates ( TArray < FSourceControlStateRef > & OutControlledFileStates , TArray < FSourceControlStateRef > & OutUncontrolledFileStates )
{
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 > > SelectedItems = FileTreeView - > GetSelectedItems ( ) ;
2021-06-14 15:25:20 -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
for ( const TSharedPtr < IChangelistTreeItem > & Item : SelectedItems )
2021-06-14 15:25:20 -04:00
{
if ( Item - > GetTreeItemType ( ) ! = IChangelistTreeItem : : File )
{
continue ;
}
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
if ( const TSharedPtr < IChangelistTreeItem > & Parent = Item - > GetParent ( ) )
2021-06-14 15:25:20 -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
if ( Parent - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
OutControlledFileStates . Add ( StaticCastSharedPtr < FFileTreeItem > ( Item ) - > FileState ) ;
}
else if ( Parent - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
OutUncontrolledFileStates . Add ( StaticCastSharedPtr < FFileTreeItem > ( Item ) - > FileState ) ;
}
2021-06-14 15:25:20 -04:00
}
}
}
2021-01-26 09:19:24 -04:00
TArray < FString > SSourceControlChangelistsWidget : : GetSelectedShelvedFiles ( )
{
TArray < FString > ShelvedFiles ;
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
for ( const TSharedPtr < IChangelistTreeItem > & Item : FileTreeView - > GetSelectedItems ( ) )
2021-01-26 09:19:24 -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
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedFile )
2021-01-26 09:19:24 -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
ShelvedFiles . Add ( StaticCastSharedPtr < FShelvedFileTreeItem > ( Item ) - > FileState - > GetFilename ( ) ) ;
2021-01-26 09:19:24 -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
}
// No individual 'shelved file' selected?
if ( ShelvedFiles . IsEmpty ( ) )
{
// Check if the user selected the 'Shelved Files' changelist.
for ( const TSharedPtr < IChangelistTreeItem > & Item : ChangelistTreeView - > GetSelectedItems ( ) )
2021-01-26 09:19:24 -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
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedChangelist )
2021-01-26 09:19:24 -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
// Add all items of the 'Shelved Files' changelist.
for ( const TSharedPtr < IChangelistTreeItem > & Children : Item - > GetChildren ( ) )
{
if ( Children - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedFile )
{
ShelvedFiles . Add ( StaticCastSharedPtr < FShelvedFileTreeItem > ( Children ) - > FileState - > GetFilename ( ) ) ;
}
}
break ; // UI only allows to select one changelist at the time.
2021-01-26 09:19:24 -04:00
}
}
}
return ShelvedFiles ;
}
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 SSourceControlChangelistsWidget : : Execute ( const FText & Message , const TSharedRef < ISourceControlOperation > & InOperation , const EConcurrency : : Type InConcurrency , const FSourceControlOperationComplete & InOperationCompleteDelegate )
2021-06-14 15:25:20 -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
return Execute ( Message , InOperation , nullptr , TArray < FString > ( ) , InConcurrency , InOperationCompleteDelegate ) ;
}
void SSourceControlChangelistsWidget : : Execute ( const FText & Message , const TSharedRef < ISourceControlOperation > & InOperation , TSharedPtr < ISourceControlChangelist > InChangelist , const EConcurrency : : Type InConcurrency , const FSourceControlOperationComplete & InOperationCompleteDelegate )
{
return Execute ( Message , InOperation , MoveTemp ( InChangelist ) , TArray < FString > ( ) , InConcurrency , InOperationCompleteDelegate ) ;
}
void SSourceControlChangelistsWidget : : Execute ( const FText & Message , const TSharedRef < ISourceControlOperation > & InOperation , const TArray < FString > & InFiles , EConcurrency : : Type InConcurrency , const FSourceControlOperationComplete & InOperationCompleteDelegate )
{
return Execute ( Message , InOperation , nullptr , InFiles , InConcurrency , InOperationCompleteDelegate ) ;
}
void SSourceControlChangelistsWidget : : Execute ( const FText & Message , const TSharedRef < ISourceControlOperation > & InOperation , TSharedPtr < ISourceControlChangelist > InChangelist , const TArray < FString > & InFiles , EConcurrency : : Type InConcurrency , const FSourceControlOperationComplete & InOperationCompleteDelegate )
{
ISourceControlProvider & SourceControlProvider = ISourceControlModule : : Get ( ) . GetProvider ( ) ;
// Start the operation.
OnStartSourceControlOperation ( InOperation , Message ) ;
if ( InConcurrency = = EConcurrency : : Asynchronous )
2021-06-14 15:25:20 -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
// Pass a weak ptr to the lambda to protect in case the 'this' widget is closed/destroyed before the source control operation completes.
TWeakPtr < SSourceControlChangelistsWidget > ThisWeak ( StaticCastSharedRef < SSourceControlChangelistsWidget > ( AsShared ( ) ) ) ;
2021-06-14 15:25:20 -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
SourceControlProvider . Execute ( InOperation , MoveTemp ( InChangelist ) , InFiles , InConcurrency , FSourceControlOperationComplete : : CreateLambda (
[ ThisWeak , InOperationCompleteDelegate ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
2021-06-14 15:25:20 -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
if ( TSharedPtr < SSourceControlChangelistsWidget > ThisPtr = ThisWeak . Pin ( ) )
{
InOperationCompleteDelegate . ExecuteIfBound ( Operation , InResult ) ;
ThisPtr - > OnEndSourceControlOperation ( Operation , InResult ) ;
}
} ) ) ;
}
else
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : ExecuteChangelistOperationWithSlowTaskWrapper ( Message , [ & ] ( )
2022-08-30 17:19:01 -04:00
{
ECommandResult : : Type Result = SourceControlProvider . Execute ( InOperation , InChangelist , InFiles , InConcurrency , InOperationCompleteDelegate ) ;
OnEndSourceControlOperation ( InOperation , Result ) ;
} ) ;
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-06-14 15:25:20 -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 SSourceControlChangelistsWidget : : ExecuteUncontrolledChangelistOperation ( const FText & Message , const TFunction < void ( ) > & UncontrolledOperation )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : ExecuteUncontrolledChangelistOperationWithSlowTaskWrapper ( Message , UncontrolledOperation ) ;
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 SSourceControlChangelistsWidget : : OnStartSourceControlOperation ( TSharedRef < ISourceControlOperation > Operation , const FText & Message )
{
RefreshStatus = Message ; // TODO: Should have a queue to stack async operations going on to correctly display concurrent async operations.
}
void SSourceControlChangelistsWidget : : OnEndSourceControlOperation ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InType )
{
RefreshStatus = FText : : GetEmpty ( ) ; // TODO: Should have a queue to stack async operations going on to correctly display concurrent async operations.
2021-06-14 15:25:20 -04:00
}
2022-08-30 17:17:25 -04:00
FReply SSourceControlChangelistsWidget : : OnKeyDown ( const FGeometry & MyGeometry , const FKeyEvent & InKeyEvent )
{
FText FailureMessage ;
if ( InKeyEvent . GetKey ( ) = = EKeys : : Enter )
{
// Submit the currently selected changelist (if any, and if conditions are met)
if ( CanSubmitChangelist ( & FailureMessage ) )
{
OnSubmitChangelist ( ) ;
}
else
{
FText Title ( LOCTEXT ( " Cannot_Submit_Changelist_From_Key_Title " , " Cannot Submit Changelist " ) ) ;
FMessageDialog : : Open ( EAppMsgType : : Ok , EAppReturnType : : Ok , FailureMessage , & Title ) ;
}
return FReply : : Handled ( ) ;
}
else if ( InKeyEvent . GetKey ( ) = = EKeys : : Delete )
{
// Delete the currently selected changelist (if any, and if conditions are met)
if ( CanDeleteChangelist ( & FailureMessage ) )
{
OnDeleteChangelist ( ) ;
}
else
{
FText Title ( LOCTEXT ( " Cannot_Delete_Changelist_From_Key_Title " , " Cannot Delete Changelist " ) ) ;
FMessageDialog : : Open ( EAppMsgType : : Ok , EAppReturnType : : Ok , FailureMessage , & Title ) ;
}
return FReply : : Handled ( ) ;
}
return FReply : : Unhandled ( ) ;
}
2021-01-18 09:42:33 -04:00
void SSourceControlChangelistsWidget : : OnNewChangelist ( )
{
FText ChangelistDescription ;
bool bOk = GetChangelistDescription (
nullptr ,
LOCTEXT ( " SourceControl.Changelist.New.Title " , " New Changelist... " ) ,
LOCTEXT ( " SourceControl.Changelist.New.Label " , " Enter a description for the changelist: " ) ,
ChangelistDescription ) ;
if ( ! bOk )
{
return ;
}
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
TSharedRef < FNewChangelist > NewChangelistOperation = ISourceControlOperation : : Create < FNewChangelist > ( ) ;
2021-01-18 09:42:33 -04:00
NewChangelistOperation - > SetDescription ( ChangelistDescription ) ;
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
Execute ( LOCTEXT ( " Creating_Changelist " , " Creating changelist... " ) , NewChangelistOperation , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Create_Changelist_Succeeded " , " Changelist successfully created. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Create_Changelist_Failed " , " Failed to create the changelist. " ) , SNotificationItem : : CS_Fail ) ;
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-18 09:42:33 -04:00
}
void SSourceControlChangelistsWidget : : OnDeleteChangelist ( )
{
if ( GetCurrentChangelist ( ) = = nullptr )
{
return ;
}
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
TSharedRef < FDeleteChangelist > DeleteChangelistOperation = ISourceControlOperation : : Create < FDeleteChangelist > ( ) ;
Execute ( LOCTEXT ( " Deleting_Changelist " , " Deleting changelist... " ) , DeleteChangelistOperation , GetCurrentChangelist ( ) , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Delete_Changelist_Succeeded " , " Changelist successfully deleted. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Delete_Changelist_Failed " , " Failed to delete the selected changelist. " ) , SNotificationItem : : CS_Fail ) ;
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-18 09:42:33 -04:00
}
bool SSourceControlChangelistsWidget : : CanDeleteChangelist ( )
{
2022-08-30 17:17:25 -04:00
return CanDeleteChangelist ( /*OutFailureMessage*/ nullptr ) ;
}
bool SSourceControlChangelistsWidget : : CanDeleteChangelist ( FText * OutFailureMessage )
{
FSourceControlChangelistStatePtr ChangelistState = GetCurrentChangelistState ( ) ;
if ( ChangelistState = = nullptr )
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Delete_No_Changelist " , " No changelist selected. " ) ;
}
return false ;
}
else if ( ! ChangelistState - > GetChangelist ( ) - > CanDelete ( ) ) // Check if this changelist is deletable (ex. P4 default one is not deletable).
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Delete_Changelist_Not_Deletable " , " The selected changelist cannot be deleted. " ) ;
}
return false ;
}
else if ( ChangelistState - > GetFilesStates ( ) . Num ( ) > 0 | | ChangelistState - > GetShelvedFilesStates ( ) . Num ( ) > 0 )
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Delete_Changelist_Not_Empty " , " The changelist is not empty. " ) ;
}
return false ;
}
return true ;
2021-01-18 09:42:33 -04:00
}
void SSourceControlChangelistsWidget : : OnEditChangelist ( )
{
FSourceControlChangelistStatePtr ChangelistState = GetCurrentChangelistState ( ) ;
if ( ChangelistState = = nullptr )
{
return ;
}
FText NewChangelistDescription = ChangelistState - > GetDescriptionText ( ) ;
bool bOk = GetChangelistDescription (
nullptr ,
2022-03-04 16:10:23 -05:00
LOCTEXT ( " SourceControl.Changelist.New.Title2 " , " Edit Changelist... " ) ,
LOCTEXT ( " SourceControl.Changelist.New.Label2 " , " Enter a new description for the changelist: " ) ,
2021-01-18 09:42:33 -04:00
NewChangelistDescription ) ;
if ( ! bOk )
{
return ;
}
2021-04-19 11:21:23 -04:00
EditChangelistDescription ( NewChangelistDescription , ChangelistState ) ;
2021-01-18 09:42:33 -04:00
}
void SSourceControlChangelistsWidget : : OnRevertUnchanged ( )
{
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
TSharedRef < FRevertUnchanged > RevertUnchangedOperation = ISourceControlOperation : : Create < FRevertUnchanged > ( ) ;
Execute ( LOCTEXT ( " Reverting_Unchanged_Files " , " Reverting unchanged file(s)... " ) , RevertUnchangedOperation , GetChangelistFromSelection ( ) , GetSelectedFiles ( ) , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InType )
{
// NOTE: This operation message should tell how many files were reverted and how many weren't.
if ( Operation - > GetResultInfo ( ) . ErrorMessages . Num ( ) = = 0 )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Revert_Unchanged_Files_Succeeded " , " Unchanged files were reverted. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InType = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Revert_Unchanged_Files_Failed " , " Failed to revert unchanged files. " ) , SNotificationItem : : CS_Fail ) ;
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-18 09:42:33 -04:00
}
2021-01-27 16:11:25 -04:00
bool SSourceControlChangelistsWidget : : CanRevertUnchanged ( )
{
return GetSelectedFiles ( ) . Num ( ) > 0 | | ( GetCurrentChangelistState ( ) & & GetCurrentChangelistState ( ) - > GetFilesStates ( ) . Num ( ) > 0 ) ;
}
2021-01-19 14:50:23 -04:00
void SSourceControlChangelistsWidget : : OnRevert ( )
{
2021-01-20 09:51:23 -04:00
FText DialogText ;
FText DialogTitle ;
2021-01-19 14:50:23 -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
TArray < FString > SelectedControlledFiles ;
TArray < FString > SelectedUncontrolledFiles ;
GetSelectedFiles ( SelectedControlledFiles , SelectedUncontrolledFiles ) ;
// Apply to the entire changelist only of there are no files selected.
const bool bApplyOnChangelist = ( SelectedControlledFiles . Num ( ) = = 0 & & SelectedUncontrolledFiles . Num ( ) = = 0 ) ;
2021-01-20 09:51:23 -04:00
if ( bApplyOnChangelist )
{
DialogText = LOCTEXT ( " SourceControl_ConfirmRevertChangelist " , " Are you sure you want to revert this changelist? " ) ;
DialogTitle = LOCTEXT ( " SourceControl_ConfirmRevertChangelist_Title " , " Confirm changelist revert " ) ;
}
else
{
DialogText = LOCTEXT ( " SourceControl_ConfirmRevertFiles " , " Are you sure you want to revert the selected files? " ) ;
DialogTitle = LOCTEXT ( " SourceControl_ConfirmReverFiles_Title " , " Confirm files revert " ) ;
}
EAppReturnType : : Type UserConfirmation = FMessageDialog : : Open ( EAppMsgType : : OkCancel , EAppReturnType : : Ok , DialogText , & DialogTitle ) ;
if ( UserConfirmation ! = EAppReturnType : : Ok )
{
return ;
}
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
// Can only have one changelist selected at the time in the left split view (either a 'Changelist' or a 'Uncontrolled Changelist')
if ( TSharedPtr < ISourceControlChangelist > SelectedChangelist = GetChangelistFromSelection ( ) )
2021-06-14 15:25:20 -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
// No specific files selected, pick all the files in the selected the changelist.
if ( SelectedControlledFiles . IsEmpty ( ) )
2022-02-10 17:08:14 -05: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
// Find all the files in that changelist.
if ( FSourceControlChangelistStatePtr ChangelistState = ISourceControlModule : : Get ( ) . GetProvider ( ) . GetState ( SelectedChangelist . ToSharedRef ( ) , EStateCacheUsage : : Use ) )
2022-02-10 17:08:14 -05: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
Algo : : Transform ( ChangelistState - > GetFilesStates ( ) , SelectedControlledFiles , [ ] ( const FSourceControlStateRef & FileState )
{
return FileState - > GetFilename ( ) ;
} ) ;
}
2022-08-18 13:03:11 -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
if ( ! SelectedControlledFiles . IsEmpty ( ) )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : ExecuteChangelistOperationWithSlowTaskWrapper ( LOCTEXT ( " Reverting_Files " , " Reverting file(s)... " ) , [ & SelectedControlledFiles ] ( )
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
{
if ( SourceControlHelpers : : RevertAndReloadPackages ( SelectedControlledFiles ) )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Revert_Files_Succeeded " , " The selected file(s) were reverted. " ) , SNotificationItem : : CS_Success ) ;
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
}
else
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Revert_Files_Failed " , " Failed to revert the selected file(s). " ) , SNotificationItem : : CS_Fail ) ;
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-08-18 13:03:11 -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
else if ( TSharedPtr < FUncontrolledChangelistState > SelectedUncontrolledChangelist = GetCurrentUncontrolledChangelistState ( ) )
2022-08-18 13:03:11 -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
// No individual uncontrolled files were selected, revert all the files from the selected uncontrolled changelist.
if ( SelectedUncontrolledFiles . IsEmpty ( ) )
{
Algo : : Transform ( SelectedUncontrolledChangelist - > GetFilesStates ( ) , SelectedUncontrolledFiles , [ ] ( const FSourceControlStateRef & State ) { return State - > GetFilename ( ) ; } ) ;
}
2021-06-14 15:25:20 -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
// Revert uncontrolled files (if any).
if ( ! SelectedUncontrolledFiles . IsEmpty ( ) )
{
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Reverting_Uncontrolled_Files " , " Reverting uncontrolled files... " ) , [ & SelectedUncontrolledFiles ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . OnRevert ( SelectedUncontrolledFiles ) ;
} ) ;
}
2021-06-14 15:25:20 -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
// No changelist selected (and consequently, no files displayed that could be selected).
2021-01-26 09:19:24 -04:00
}
2021-01-19 14:50:23 -04:00
2021-01-27 16:11:25 -04:00
bool SSourceControlChangelistsWidget : : CanRevert ( )
{
2021-06-14 15:25:20 -04:00
FSourceControlChangelistStatePtr CurrentChangelistState = GetCurrentChangelistState ( ) ;
FUncontrolledChangelistStatePtr CurrentUncontrolledChangelistState = GetCurrentUncontrolledChangelistState ( ) ;
return GetSelectedFiles ( ) . Num ( ) > 0
| | ( CurrentChangelistState . IsValid ( ) & & CurrentChangelistState - > GetFilesStates ( ) . Num ( ) > 0 )
| | ( CurrentUncontrolledChangelistState . IsValid ( ) & & CurrentUncontrolledChangelistState - > GetFilesStates ( ) . Num ( ) > 0 ) ;
2021-01-27 16:11:25 -04:00
}
2021-01-26 09:19:24 -04:00
void SSourceControlChangelistsWidget : : OnShelve ( )
{
2021-02-08 15:32:48 -04:00
FSourceControlChangelistStatePtr CurrentChangelist = GetChangelistStateFromSelection ( ) ;
if ( ! CurrentChangelist )
{
return ;
}
FText ChangelistDescription = CurrentChangelist - > GetDescriptionText ( ) ;
if ( ChangelistDescription . IsEmptyOrWhitespace ( ) )
{
bool bOk = GetChangelistDescription (
nullptr ,
LOCTEXT ( " SourceControl.Changelist.NewShelve " , " Shelving files... " ) ,
LOCTEXT ( " SourceControl.Changelist.NewShelve.Label " , " Enter a description for the changelist holding the shelve: " ) ,
ChangelistDescription ) ;
if ( ! bOk )
{
// User cancelled entering a changelist description; abort shelve
return ;
}
}
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
TSharedRef < FShelve > ShelveOperation = ISourceControlOperation : : Create < FShelve > ( ) ;
2021-02-08 15:32:48 -04:00
ShelveOperation - > SetDescription ( ChangelistDescription ) ;
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
Execute ( LOCTEXT ( " Shelving_Files " , " Shelving file(s)... " ) , ShelveOperation , CurrentChangelist - > GetChangelist ( ) , GetSelectedFiles ( ) , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Shelve_Files_Succeeded " , " The selected file(s) were shelved. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Shelve_Files_Failed " , " Failed to shelved the selected file(s). " ) , SNotificationItem : : CS_Fail ) ;
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-26 09:19:24 -04:00
}
2021-01-19 14:50:23 -04:00
2021-01-26 09:19:24 -04:00
void SSourceControlChangelistsWidget : : OnUnshelve ( )
{
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
TSharedRef < FUnshelve > UnshelveOperation = ISourceControlOperation : : Create < FUnshelve > ( ) ;
Execute ( LOCTEXT ( " Unshelving_Files " , " Unshelving file(s)... " ) , UnshelveOperation , GetChangelistFromSelection ( ) , GetSelectedShelvedFiles ( ) , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Unshelve_Files_Succeeded " , " The selected file(s) were unshelved. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Unshelve_Files_Failed " , " Failed to unshelved the selected file(s). " ) , SNotificationItem : : CS_Fail ) ;
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-26 09:19:24 -04:00
}
void SSourceControlChangelistsWidget : : OnDeleteShelvedFiles ( )
{
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
TSharedRef < FDeleteShelved > DeleteShelvedOperation = ISourceControlOperation : : Create < FDeleteShelved > ( ) ;
Execute ( LOCTEXT ( " Deleting_Shelved_Files " , " Deleting shelved file(s)... " ) , DeleteShelvedOperation , GetChangelistFromSelection ( ) , GetSelectedShelvedFiles ( ) , EConcurrency : : Asynchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Delete_Shelved_Files_Succeeded " , " The selected shelved file(s) were deleted. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Delete_Shelved_Files_Failed " , " Failed to delete the selected shelved file(s). " ) , SNotificationItem : : CS_Fail ) ;
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-19 14:50:23 -04:00
}
2022-08-08 09:19:30 -04:00
static bool GetChangelistValidationResult ( FSourceControlChangelistPtr InChangelist , FString & OutValidationTitleText , FString & OutValidationWarningsText , FString & OutValidationErrorsText )
2021-02-04 11:50:49 -04:00
{
FSourceControlPreSubmitDataValidationDelegate ValidationDelegate = ISourceControlModule : : Get ( ) . GetRegisteredPreSubmitDataValidation ( ) ;
EDataValidationResult ValidationResult = EDataValidationResult : : NotValidated ;
TArray < FText > ValidationErrors ;
TArray < FText > ValidationWarnings ;
2021-03-10 15:03:45 -04:00
bool bValidationResult = true ;
2021-02-04 11:50:49 -04:00
if ( ValidationDelegate . ExecuteIfBound ( InChangelist , ValidationResult , ValidationErrors , ValidationWarnings ) )
{
2021-08-11 15:40:41 -04:00
EMessageSeverity : : Type MessageSeverity = EMessageSeverity : : Info ;
2021-02-04 11:50:49 -04:00
if ( ValidationResult = = EDataValidationResult : : Invalid | | ValidationErrors . Num ( ) > 0 )
{
2022-08-08 09:19:30 -04:00
OutValidationTitleText = LOCTEXT ( " SourceControl.Submit.ChangelistValidationError " , " Changelist validation failed! " ) . ToString ( ) ;
2021-03-10 15:03:45 -04:00
bValidationResult = false ;
2021-08-11 15:40:41 -04:00
MessageSeverity = EMessageSeverity : : Error ;
2021-02-04 11:50:49 -04:00
}
else if ( ValidationResult = = EDataValidationResult : : NotValidated | | ValidationWarnings . Num ( ) > 0 )
{
2022-08-08 09:19:30 -04:00
OutValidationTitleText = LOCTEXT ( " SourceControl.Submit.ChangelistValidationWarning " , " Changelist validation has warnings! " ) . ToString ( ) ;
2021-08-11 15:40:41 -04:00
MessageSeverity = EMessageSeverity : : Warning ;
2021-02-04 11:50:49 -04:00
}
else
{
2022-08-08 09:19:30 -04:00
OutValidationTitleText = LOCTEXT ( " SourceControl.Submit.ChangelistValidationSuccess " , " Changelist validation successful! " ) . ToString ( ) ;
2021-02-04 11:50:49 -04:00
}
2021-08-11 15:40:41 -04:00
FMessageLog SourceControlLog ( " SourceControl " ) ;
2022-08-08 09:19:30 -04:00
SourceControlLog . Message ( MessageSeverity , FText : : FromString ( * OutValidationTitleText ) ) ;
2021-02-04 11:50:49 -04:00
2022-08-08 09:19:30 -04:00
auto AppendInfo = [ ] ( const TArray < FText > & Info , const FString & InfoType , FString & OutText )
2021-03-10 15:03:45 -04:00
{
2021-02-04 11:50:49 -04:00
const int32 MaxNumLinesDisplayed = 5 ;
2022-08-08 09:19:30 -04:00
int32 NumLinesDisplayed = 0 ;
2021-02-04 11:50:49 -04:00
if ( Info . Num ( ) > 0 )
{
2022-08-08 09:19:30 -04:00
OutText + = LINE_TERMINATOR ;
OutText + = FString : : Printf ( TEXT ( " Encountered %d %s: " ) , Info . Num ( ) , * InfoType ) ;
2021-02-04 11:50:49 -04:00
for ( const FText & Line : Info )
{
if ( NumLinesDisplayed > = MaxNumLinesDisplayed )
{
2022-08-08 09:19:30 -04:00
OutText + = LINE_TERMINATOR ;
OutText + = FString : : Printf ( TEXT ( " See log for complete list of %s " ) , * InfoType ) ;
2021-02-04 11:50:49 -04:00
break ;
}
2022-08-08 09:19:30 -04:00
OutText + = LINE_TERMINATOR ;
OutText + = Line . ToString ( ) ;
2021-02-04 11:50:49 -04:00
+ + NumLinesDisplayed ;
}
}
} ;
2021-08-11 15:40:41 -04:00
auto LogInfo = [ & SourceControlLog ] ( const TArray < FText > & Info , const FString & InfoType , const EMessageSeverity : : Type LogVerbosity )
2021-03-10 15:03:45 -04:00
{
if ( Info . Num ( ) > 0 )
{
2021-08-11 15:40:41 -04:00
SourceControlLog . Message ( LogVerbosity , FText : : Format ( LOCTEXT ( " SourceControl.Validation.ErrorEncountered " , " Encountered {0} {1}: " ) , FText : : AsNumber ( Info . Num ( ) ) , FText : : FromString ( * InfoType ) ) ) ;
2021-03-10 15:03:45 -04:00
for ( const FText & Line : Info )
{
2021-08-11 15:40:41 -04:00
SourceControlLog . Message ( LogVerbosity , Line ) ;
2021-03-10 15:03:45 -04:00
}
}
} ;
2022-08-08 09:19:30 -04:00
AppendInfo ( ValidationErrors , TEXT ( " errors " ) , OutValidationErrorsText ) ;
AppendInfo ( ValidationWarnings , TEXT ( " warnings " ) , OutValidationWarningsText ) ;
2021-03-10 15:03:45 -04:00
2021-08-11 15:40:41 -04:00
LogInfo ( ValidationErrors , TEXT ( " errors " ) , EMessageSeverity : : Error ) ;
LogInfo ( ValidationWarnings , TEXT ( " warnings " ) , EMessageSeverity : : Warning ) ;
2021-02-04 11:50:49 -04:00
}
2021-03-10 15:03:45 -04:00
return bValidationResult ;
2021-02-04 11:50:49 -04:00
}
2021-10-27 15:14:40 -04:00
static bool GetOnPresubmitResult ( FSourceControlChangelistStatePtr Changelist , FChangeListDescription & Description )
{
const TArray < FSourceControlStateRef > & FileStates = Changelist - > GetFilesStates ( ) ;
TArray < FString > LocalFilepathList ;
LocalFilepathList . Reserve ( FileStates . Num ( ) ) ;
for ( const FSourceControlStateRef & State : FileStates )
{
LocalFilepathList . Add ( State - > GetFilename ( ) ) ;
}
2022-07-21 08:31:47 -04:00
FText FailureMsg ;
if ( ! TryToVirtualizeFilesToSubmit ( LocalFilepathList , Description . Description , FailureMsg ) )
2021-10-27 15:14:40 -04:00
{
2022-07-21 08:31:47 -04:00
// Setup the notification for operation feedback
FNotificationInfo Info ( FailureMsg ) ;
2022-07-15 09:52:19 -04:00
2022-07-21 08:31:47 -04:00
Info . Text = LOCTEXT ( " SCC_Checkin_Failed " , " Failed to check in files! " ) ;
Info . ExpireDuration = 8.0f ;
Info . HyperlinkText = LOCTEXT ( " SCC_Checkin_ShowLog " , " Show Message Log " ) ;
Info . Hyperlink = FSimpleDelegate : : CreateLambda ( [ ] ( ) { FMessageLog ( " SourceControl " ) . Open ( EMessageSeverity : : Error , true ) ; } ) ;
2022-07-15 09:52:19 -04:00
2022-07-21 08:31:47 -04:00
TSharedPtr < SNotificationItem > Notification = FSlateNotificationManager : : Get ( ) . AddNotification ( Info ) ;
Notification - > SetCompletionState ( SNotificationItem : : CS_Fail ) ;
2021-10-27 15:14:40 -04:00
2022-07-21 08:31:47 -04:00
return false ;
2021-10-27 15:14:40 -04:00
}
return true ;
}
2021-01-18 09:42:33 -04:00
void SSourceControlChangelistsWidget : : OnSubmitChangelist ( )
{
2021-01-27 16:11:25 -04:00
FSourceControlChangelistStatePtr ChangelistState = GetCurrentChangelistState ( ) ;
2021-01-18 09:42:33 -04:00
2021-01-27 16:11:25 -04:00
if ( ! ChangelistState )
2021-01-18 09:42:33 -04:00
{
return ;
}
2022-08-08 09:19:30 -04:00
FString ChangelistValidationTitle ;
FString ChangelistValidationWarningsText ;
FString ChangelistValidationErrorsText ;
bool bValidationResult = GetChangelistValidationResult ( ChangelistState - > GetChangelist ( ) , ChangelistValidationTitle , ChangelistValidationWarningsText , ChangelistValidationErrorsText ) ;
2021-01-18 09:42:33 -04:00
2022-08-23 13:05:52 -04:00
// The description from the source control.
const FText CurrentChangelistDescription = ChangelistState - > GetDescriptionText ( ) ;
const bool bAskForChangelistDescription = ( CurrentChangelistDescription . IsEmptyOrWhitespace ( ) ) ;
// The description possibly updated with the #validated proposed to the user.
FText ChangelistDescriptionToSubmit = UpdateChangelistDescriptionToSubmitIfNeeded ( bValidationResult , CurrentChangelistDescription ) ;
// The description once edited by the user in the Submit window.
FText UserEditChangelistDescription = ChangelistDescriptionToSubmit ;
2021-01-20 09:51:23 -04:00
2021-02-04 11:50:49 -04:00
TSharedRef < SWindow > NewWindow = SNew ( SWindow )
. Title ( NSLOCTEXT ( " SourceControl.ConfirmSubmit " , " Title " , " Confirm changelist submit " ) )
. SizingRule ( ESizingRule : : UserSized )
. ClientSize ( FVector2D ( 600 , 400 ) )
. SupportsMaximize ( true )
. SupportsMinimize ( false ) ;
TSharedRef < SSourceControlSubmitWidget > SourceControlWidget =
SNew ( SSourceControlSubmitWidget )
. ParentWindow ( NewWindow )
. Items ( ChangelistState - > GetFilesStates ( ) )
2021-04-19 11:21:23 -04:00
. Description ( ChangelistDescriptionToSubmit )
2022-08-08 09:19:30 -04:00
. ChangeValidationResult ( ChangelistValidationTitle )
. ChangeValidationWarnings ( ChangelistValidationWarningsText )
. ChangeValidationErrors ( ChangelistValidationErrorsText )
2022-08-23 13:05:52 -04:00
. AllowDescriptionChange ( true )
2021-02-04 11:50:49 -04:00
. AllowUncheckFiles ( false )
2022-08-23 13:05:52 -04:00
. AllowKeepCheckedOut ( true )
. AllowSubmit ( bValidationResult )
2022-09-08 20:48:26 -04:00
. AllowSaveAndClose ( true ) ;
2021-02-04 11:50:49 -04:00
NewWindow - > SetContent (
SourceControlWidget
) ;
FSlateApplication : : Get ( ) . AddModalWindow ( NewWindow , NULL ) ;
2022-09-08 20:48:26 -04:00
bool bSaveDescriptionOnSubmitFailure = false ;
bool bCheckinSuccess = false ;
2021-02-04 11:50:49 -04:00
if ( SourceControlWidget - > GetResult ( ) = = ESubmitResults : : SUBMIT_ACCEPTED )
2021-01-20 09:51:23 -04:00
{
ISourceControlProvider & SourceControlProvider = ISourceControlModule : : Get ( ) . GetProvider ( ) ;
2021-04-26 09:23:26 -04:00
FChangeListDescription Description ;
2022-08-23 13:05:52 -04:00
TSharedRef < FCheckIn > SubmitChangelistOperation = ISourceControlOperation : : Create < FCheckIn > ( ) ;
SubmitChangelistOperation - > SetKeepCheckedOut ( SourceControlWidget - > WantToKeepCheckedOut ( ) ) ;
2021-01-20 09:51:23 -04:00
2022-08-23 13:05:52 -04:00
// Get the changelist description the user had when he hit the 'submit' button.
2021-04-26 09:23:26 -04:00
SourceControlWidget - > FillChangeListDescription ( Description ) ;
2022-08-23 13:05:52 -04:00
UserEditChangelistDescription = Description . Description ;
2021-02-04 11:50:49 -04:00
2022-08-23 13:05:52 -04:00
// Check if any of the presubmit hooks fail. (This might also update the changelist description)
if ( GetOnPresubmitResult ( ChangelistState , Description ) )
2021-10-27 15:14:40 -04:00
{
2022-08-23 13:05:52 -04:00
// If the description was modified, add it to the operation to update the changelist
if ( ! ChangelistDescriptionToSubmit . EqualTo ( Description . Description ) )
{
SubmitChangelistOperation - > SetDescription ( UpdateChangelistDescriptionToSubmitIfNeeded ( bValidationResult , Description . Description ) ) ;
}
Execute ( LOCTEXT ( " Submitting_Changelist " , " Submitting changelist... " ) , SubmitChangelistOperation , ChangelistState - > GetChangelist ( ) , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
[ & SubmitChangelistOperation , & bCheckinSuccess ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( SubmitChangelistOperation - > GetSuccessMessage ( ) , SNotificationItem : : CS_Success ) ;
2022-08-23 13:05:52 -04:00
bCheckinSuccess = true ;
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " SCC_Checkin_Failed " , " Failed to check in files! " ) , SNotificationItem : : CS_Fail ) ;
2022-08-23 13:05:52 -04:00
}
} ) ) ;
2021-10-27 15:14:40 -04:00
}
2022-08-23 13:05:52 -04:00
// If something went wrong with the submit, try to preserve the changelist edited by the user (if he edited).
2022-09-08 20:48:26 -04:00
bSaveDescriptionOnSubmitFailure = ( ! bCheckinSuccess & & ! UserEditChangelistDescription . EqualTo ( ChangelistDescriptionToSubmit ) ) ;
}
if ( SourceControlWidget - > GetResult ( ) = = ESubmitResults : : SUBMIT_SAVED | | bSaveDescriptionOnSubmitFailure )
{
FChangeListDescription Description ;
SourceControlWidget - > FillChangeListDescription ( Description ) ;
if ( ChangelistState - > SupportsPersistentDescription ( ) )
2021-04-26 09:23:26 -04:00
{
2022-08-23 13:05:52 -04:00
TSharedRef < FEditChangelist > EditChangelistOperation = ISourceControlOperation : : Create < FEditChangelist > ( ) ;
2022-09-08 20:48:26 -04:00
EditChangelistOperation - > SetDescription ( Description . Description ) ;
EditChangelistDescription ( Description . Description , ChangelistState ) ;
2021-01-27 16:11:25 -04:00
}
2022-09-08 20:48:26 -04:00
else // Move everything to a new CL. Ex: the default P4 CL description cannot be saved.
2022-08-24 10:40:15 -04:00
{
2022-09-08 20:48:26 -04:00
TArray < FString > FilesToMove ;
Algo : : Transform ( ChangelistState - > GetFilesStates ( ) , FilesToMove , [ ] ( const TSharedRef < ISourceControlState > & FileState ) { return FileState - > GetFilename ( ) ; } ) ;
TSharedRef < FNewChangelist > NewChangelistOperation = ISourceControlOperation : : Create < FNewChangelist > ( ) ;
NewChangelistOperation - > SetDescription ( Description . Description ) ;
Execute ( LOCTEXT ( " Saving_Into_New_Changelist " , " Saving to a new changelist... " ) , NewChangelistOperation , FilesToMove , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Saving_New_Changelist_Succeeded " , " New changelist saved " ) , SNotificationItem : : CS_Success ) ;
}
if ( InResult = = ECommandResult : : Failed )
{
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Saving_New_Changelist_Failed " , " Failed to save to a new changelist. " ) , SNotificationItem : : CS_Fail ) ;
}
} ) ) ;
2022-08-24 10:40:15 -04:00
}
2021-01-20 09:51:23 -04:00
}
2022-09-08 20:48:26 -04:00
if ( bCheckinSuccess )
{
// Clear the description saved by the 'submit window'. Useful when the submit window is opened from the Editor menu rather than the changelist window.
// Opening the 'submit window' from the Editor menu is intended for source controls that do not support changelists (SVN/Git), but remains available to
// all source controls at the moment.
SourceControlWidget - > ClearChangeListDescription ( ) ;
}
2021-04-19 11:21:23 -04:00
}
2021-01-18 09:42:33 -04:00
bool SSourceControlChangelistsWidget : : CanSubmitChangelist ( )
2022-08-30 17:17:25 -04:00
{
return CanSubmitChangelist ( /*OutFailureMessage*/ nullptr ) ;
}
bool SSourceControlChangelistsWidget : : CanSubmitChangelist ( FText * OutFailureMessage )
2021-01-18 09:42:33 -04:00
{
FSourceControlChangelistStatePtr Changelist = GetCurrentChangelistState ( ) ;
2022-08-30 17:17:25 -04:00
if ( Changelist = = nullptr )
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Submit_Changelist_No_Selection " , " No changelist selected. " ) ;
}
return false ;
}
else if ( Changelist - > GetFilesStates ( ) . Num ( ) < = 0 )
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Submit_Changelist_No_Files " , " The changelist doesn't contain any files to submit. " ) ;
}
return false ;
}
else if ( Changelist - > GetShelvedFilesStates ( ) . Num ( ) > 0 )
{
if ( OutFailureMessage )
{
* OutFailureMessage = LOCTEXT ( " Cannot_Submit_Changelist_Has_Shelved_Files " , " The changelist contains shelved files. " ) ;
}
return false ;
}
return true ;
2021-01-18 09:42:33 -04:00
}
2021-08-11 15:40:41 -04:00
void SSourceControlChangelistsWidget : : OnValidateChangelist ( )
{
FSourceControlChangelistStatePtr ChangelistState = GetCurrentChangelistState ( ) ;
if ( ! ChangelistState )
{
return ;
}
2022-08-08 09:19:30 -04:00
FString ChangelistValidationTitle ;
FString ChangelistValidationWarningsText ;
FString ChangelistValidationErrorsText ;
bool bValidationResult = GetChangelistValidationResult ( ChangelistState - > GetChangelist ( ) , ChangelistValidationTitle , ChangelistValidationWarningsText , ChangelistValidationErrorsText ) ;
2021-08-11 15:40:41 -04:00
// Setup the notification for operation feedback
FNotificationInfo Info ( LOCTEXT ( " SCC_Validation_Success " , " Changelist validated " ) ) ;
// Override the notification fields for failure ones
if ( ! bValidationResult )
{
Info . Text = LOCTEXT ( " SCC_Validation_Failed " , " Failed to validate the changelist " ) ;
}
Info . ExpireDuration = 8.0f ;
Info . HyperlinkText = LOCTEXT ( " SCC_Validation_ShowLog " , " Show Message Log " ) ;
Info . Hyperlink = FSimpleDelegate : : CreateLambda ( [ ] ( ) { FMessageLog ( " SourceControl " ) . Open ( EMessageSeverity : : Info , true ) ; } ) ;
TSharedPtr < SNotificationItem > Notification = FSlateNotificationManager : : Get ( ) . AddNotification ( Info ) ;
Notification - > SetCompletionState ( bValidationResult ? SNotificationItem : : CS_Success : SNotificationItem : : CS_Fail ) ;
}
bool SSourceControlChangelistsWidget : : CanValidateChangelist ( )
{
FSourceControlChangelistStatePtr Changelist = GetCurrentChangelistState ( ) ;
return Changelist ! = nullptr & & Changelist - > GetFilesStates ( ) . Num ( ) > 0 ;
}
2022-09-08 09:19:01 -04:00
void SSourceControlChangelistsWidget : : OnNewUncontrolledChangelist ( )
{
FText UncontrolledChangelistDescription ;
bool bOk = GetChangelistDescription (
nullptr ,
LOCTEXT ( " SourceControl.UncontrolledChangelist.New.Title " , " New Uncontrolled Changelist... " ) ,
LOCTEXT ( " SourceControl.UncontrolledChangelist.New.Label " , " Enter a description for the uncontrolled changelist: " ) ,
UncontrolledChangelistDescription ) ;
if ( ! bOk )
{
return ;
}
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Creating_Uncontrolled_Changelist " , " Creating uncontrolled changelist... " ) , [ & ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . CreateUncontrolledChangelist ( UncontrolledChangelistDescription ) ;
} ) ;
}
void SSourceControlChangelistsWidget : : OnEditUncontrolledChangelist ( )
{
FUncontrolledChangelistStatePtr UncontrolledChangelistState = GetCurrentUncontrolledChangelistState ( ) ;
if ( UncontrolledChangelistState = = nullptr )
{
return ;
}
FText NewUncontrolledChangelistDescription = UncontrolledChangelistState - > GetDisplayText ( ) ;
bool bOk = GetChangelistDescription (
nullptr ,
LOCTEXT ( " SourceControl.Uncontrolled.Changelist.New.Title2 " , " Edit Uncontrolled Changelist... " ) ,
LOCTEXT ( " SourceControl.Uncontrolled.Changelist.New.Label2 " , " Enter a new description for the uncontrolled changelist: " ) ,
NewUncontrolledChangelistDescription ) ;
if ( ! bOk )
{
return ;
}
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Updating_Uncontrolled_Changelist_Description " , " Updating uncontrolled changelist description... " ) , [ & NewUncontrolledChangelistDescription , & UncontrolledChangelistState ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . EditUncontrolledChangelist ( UncontrolledChangelistState - > Changelist , NewUncontrolledChangelistDescription ) ;
} ) ;
}
bool SSourceControlChangelistsWidget : : CanEditUncontrolledChangelist ( )
{
FUncontrolledChangelistStatePtr UncontrolledChangelistState = GetCurrentUncontrolledChangelistState ( ) ;
return ( UncontrolledChangelistState ! = nullptr ) & & ! UncontrolledChangelistState - > Changelist . IsDefault ( ) ;
}
void SSourceControlChangelistsWidget : : OnDeleteUncontrolledChangelist ( )
{
TOptional < FUncontrolledChangelist > UncontrolledChangelist = GetCurrentUncontrolledChangelist ( ) ;
if ( ! UncontrolledChangelist . IsSet ( ) )
{
return ;
}
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Deleting_Uncontrolled_Changelist " , " Deleting uncontrolled changelist... " ) , [ & UncontrolledChangelist ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . DeleteUncontrolledChangelist ( UncontrolledChangelist . GetValue ( ) ) ;
} ) ;
}
bool SSourceControlChangelistsWidget : : CanDeleteUncontrolledChangelist ( )
{
FUncontrolledChangelistStatePtr UncontrolledChangelistState = GetCurrentUncontrolledChangelistState ( ) ;
return ( UncontrolledChangelistState ! = nullptr ) & & ! UncontrolledChangelistState - > Changelist . IsDefault ( ) & & ! UncontrolledChangelistState - > ContainsFiles ( ) ;
}
2021-03-24 08:29:57 -04:00
void SSourceControlChangelistsWidget : : OnMoveFiles ( )
{
2021-06-14 15:25:20 -04:00
TArray < FString > SelectedControlledFiles ;
TArray < FString > SelectedUncontrolledFiles ;
GetSelectedFiles ( SelectedControlledFiles , SelectedUncontrolledFiles ) ;
2021-03-24 08:29:57 -04:00
2021-06-14 15:25:20 -04:00
if ( SelectedControlledFiles . IsEmpty ( ) & & SelectedUncontrolledFiles . IsEmpty ( ) )
2021-03-24 08:29:57 -04:00
{
return ;
}
const bool bAddNewChangelistEntry = true ;
// Build selection list for changelists
TArray < SSourceControlDescriptionItem > Items ;
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
Items . Reset ( ChangelistTreeNodes . Num ( ) + UncontrolledChangelistTreeNodes . Num ( ) + ( bAddNewChangelistEntry ? 1 : 0 ) ) ;
2021-03-24 08:29:57 -04:00
if ( bAddNewChangelistEntry )
{
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
// First item in the 'Move To' list is always 'new changelist'
2021-03-24 08:29:57 -04:00
Items . Emplace (
LOCTEXT ( " SourceControl_NewChangelistText " , " New Changelist " ) ,
LOCTEXT ( " SourceControl_NewChangelistDescription " , " <enter description here> " ) ,
/*bCanEditDescription=*/ true ) ;
}
const bool bCanEditAlreadyExistingChangelistDescription = 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
for ( TSharedPtr < IChangelistTreeItem > & Changelist : ChangelistTreeNodes )
2021-03-24 08:29:57 -04:00
{
2021-06-14 15:25:20 -04:00
if ( Changelist - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
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
const TSharedPtr < FChangelistTreeItem > & TypedChangelist = StaticCastSharedPtr < FChangelistTreeItem > ( Changelist ) ;
2021-06-14 15:25:20 -04:00
Items . Emplace ( TypedChangelist - > GetDisplayText ( ) , TypedChangelist - > GetDescriptionText ( ) , bCanEditAlreadyExistingChangelistDescription ) ;
}
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
}
for ( TSharedPtr < IChangelistTreeItem > & UncontrolledChangelist : UncontrolledChangelistTreeNodes )
{
if ( UncontrolledChangelist - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
2021-06-14 15:25:20 -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
const TSharedPtr < FUncontrolledChangelistTreeItem > & TypedChangelist = StaticCastSharedPtr < FUncontrolledChangelistTreeItem > ( UncontrolledChangelist ) ;
2022-09-07 18:11:16 -04:00
Items . Emplace ( TypedChangelist - > GetDisplayText ( ) , FText ( ) , bCanEditAlreadyExistingChangelistDescription ) ;
2021-06-14 15:25:20 -04:00
}
2021-03-24 08:29:57 -04:00
}
int32 PickedItem = 0 ;
FText ChangelistDescription ;
bool bOk = PickChangelistOrNewWithDescription (
nullptr ,
LOCTEXT ( " SourceControl.MoveFiles.Title " , " Move Files To... " ) ,
LOCTEXT ( " SourceControl.MoveFIles.Label " , " Target Changelist: " ) ,
Items ,
PickedItem ,
ChangelistDescription ) ;
if ( ! bOk )
{
return ;
}
ISourceControlProvider & SourceControlProvider = ISourceControlModule : : Get ( ) . GetProvider ( ) ;
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
// Move files to a new changelist
2021-03-24 08:29:57 -04:00
if ( bAddNewChangelistEntry & & PickedItem = = 0 )
{
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
// NOTE: To perform async move, we would need to copy the list of selected uncontrolled files and ensure the list wasn't modified when callback occurs. For now run synchronously.
TSharedRef < FNewChangelist > NewChangelistOperation = ISourceControlOperation : : Create < FNewChangelist > ( ) ;
2021-03-24 08:29:57 -04:00
NewChangelistOperation - > SetDescription ( ChangelistDescription ) ;
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
Execute ( LOCTEXT ( " Moving_Files_New_Changelist " , " Moving file(s) to a new changelist... " ) , NewChangelistOperation , SelectedControlledFiles , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
[ this , SelectedUncontrolledFiles ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
{
if ( InResult = = ECommandResult : : Succeeded )
{
// NOTE: Perform uncontrolled move only if the new changelist was created and the controlled file were move.
if ( ( ! SelectedUncontrolledFiles . IsEmpty ( ) ) & & static_cast < FNewChangelist & > ( Operation . Get ( ) ) . GetNewChangelist ( ) . IsValid ( ) )
{
2022-09-07 17:15:39 -04:00
FUncontrolledChangelistsModule : : Get ( ) . MoveFilesToControlledChangelist ( SelectedUncontrolledFiles , static_cast < FNewChangelist & > ( Operation . Get ( ) ) . GetNewChangelist ( ) , SSourceControlCommon : : OpenConflictDialog ) ;
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-06-14 15:25:20 -04:00
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Move_Files_New_Changelist_Succeeded " , " Files were successfully moved to a new changelist. " ) , SNotificationItem : : CS_Success ) ;
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
}
if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Move_Files_New_Changelist_Failed " , " Failed to move the file to the new changelist. " ) , SNotificationItem : : CS_Fail ) ;
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-03-24 08:29:57 -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
else // Move files to an existing changelist or uncontrolled changelist.
2021-03-24 08:29:57 -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
// NOTE: The combo box indices are in this order: New changelist, existing changelist(s), existing uncontrolled changelist(s)
FChangelistTreeItemPtr MoveDestination ;
2021-03-24 08:29:57 -04:00
const int32 ChangelistIndex = ( bAddNewChangelistEntry ? PickedItem - 1 : PickedItem ) ;
2021-06-14 15:25:20 -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
if ( ChangelistIndex < ChangelistTreeNodes . Num ( ) ) // Move files to a changelist
2021-06-14 15:25:20 -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
MoveDestination = ChangelistTreeNodes [ ChangelistIndex ] ;
}
else // Move files to an uncontrolled changelist. All uncontrolled CL were listed after the controlled CL in the combo box, compute the offset.
{
MoveDestination = UncontrolledChangelistTreeNodes [ ChangelistIndex - ChangelistTreeNodes . Num ( ) ] ;
}
// Move file to a changelist.
if ( MoveDestination - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
FSourceControlChangelistPtr Changelist = StaticCastSharedPtr < FChangelistTreeItem > ( MoveDestination ) - > ChangelistState - > GetChangelist ( ) ;
2021-06-14 15:25:20 -04:00
if ( ! SelectedControlledFiles . IsEmpty ( ) )
{
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
Execute ( LOCTEXT ( " Moving_File_Between_Changelists " , " Moving file(s) to the selected changelist... " ) , ISourceControlOperation : : Create < FMoveToChangelist > ( ) , Changelist , SelectedControlledFiles , EConcurrency : : Synchronous , FSourceControlOperationComplete : : CreateLambda (
2022-09-09 18:18:54 -04:00
[ ] ( const TSharedRef < ISourceControlOperation > & Operation , ECommandResult : : Type InResult )
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
{
if ( InResult = = ECommandResult : : Succeeded )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Move_Files_Between_Changelist_Succeeded " , " File(s) successfully moved to the selected changelist. " ) , SNotificationItem : : CS_Success ) ;
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
}
else if ( InResult = = ECommandResult : : Failed )
{
2022-09-07 17:15:39 -04:00
SSourceControlCommon : : DisplaySourceControlOperationNotification ( LOCTEXT ( " Move_Files_Between_Changelist_Failed " , " Failed to move the file(s) to the selected changelist. " ) , SNotificationItem : : CS_Fail ) ;
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-06-14 15:25:20 -04:00
}
2022-09-09 18:18:54 -04:00
else if ( ! SelectedUncontrolledFiles . IsEmpty ( ) )
{
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Moving_Uncontrolled_Files_To_Changelist " , " Moving uncontrolled files... " ) , [ & ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . MoveFilesToControlledChangelist ( SelectedUncontrolledFiles , Changelist , SSourceControlCommon : : OpenConflictDialog ) ;
} ) ;
}
2021-06-14 15:25:20 -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
else if ( MoveDestination - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
2021-06-14 15:25:20 -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
const FUncontrolledChangelist UncontrolledChangelist = StaticCastSharedPtr < FUncontrolledChangelistTreeItem > ( MoveDestination ) - > UncontrolledChangelistState - > Changelist ;
2021-06-14 15:25:20 -04:00
TArray < FSourceControlStateRef > SelectedControlledFileStates ;
TArray < FSourceControlStateRef > SelectedUnControlledFileStates ;
GetSelectedFileStates ( SelectedControlledFileStates , SelectedUnControlledFileStates ) ;
if ( ( ! SelectedControlledFileStates . IsEmpty ( ) ) | | ( ! SelectedUnControlledFileStates . IsEmpty ( ) ) )
{
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
ExecuteUncontrolledChangelistOperation ( LOCTEXT ( " Moving_Uncontrolled_Changelist_To " , " Moving uncontrolled files... " ) , [ & ] ( )
{
FUncontrolledChangelistsModule : : Get ( ) . MoveFilesToUncontrolledChangelist ( SelectedControlledFileStates , SelectedUnControlledFileStates , UncontrolledChangelist ) ;
} ) ;
2021-06-14 15:25:20 -04:00
}
}
2021-03-24 08:29:57 -04:00
}
}
2021-01-19 14:50:23 -04:00
void SSourceControlChangelistsWidget : : OnShowHistory ( )
{
TArray < FString > SelectedFiles = GetSelectedFiles ( ) ;
if ( SelectedFiles . Num ( ) > 0 )
{
FSourceControlWindows : : DisplayRevisionHistory ( SelectedFiles ) ;
}
}
void SSourceControlChangelistsWidget : : OnDiffAgainstDepot ( )
{
TArray < FString > SelectedFiles = GetSelectedFiles ( ) ;
if ( SelectedFiles . Num ( ) > 0 )
{
FSourceControlWindows : : DiffAgainstWorkspace ( SelectedFiles [ 0 ] ) ;
}
}
bool SSourceControlChangelistsWidget : : CanDiffAgainstDepot ( )
{
return GetSelectedFiles ( ) . Num ( ) = = 1 ;
}
2021-01-26 09:19:24 -04:00
void SSourceControlChangelistsWidget : : OnDiffAgainstWorkspace ( )
{
2021-02-08 09:36:20 -04:00
if ( GetSelectedShelvedFiles ( ) . Num ( ) > 0 )
{
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
FSourceControlStateRef FileState = StaticCastSharedPtr < FShelvedFileTreeItem > ( FileTreeView - > GetSelectedItems ( ) [ 0 ] ) - > FileState ;
2021-02-08 09:36:20 -04:00
FSourceControlWindows : : DiffAgainstShelvedFile ( FileState ) ;
}
2021-01-26 09:19:24 -04:00
}
bool SSourceControlChangelistsWidget : : CanDiffAgainstWorkspace ( )
{
return GetSelectedShelvedFiles ( ) . Num ( ) = = 1 ;
}
2021-01-18 09:42:33 -04:00
TSharedPtr < SWidget > SSourceControlChangelistsWidget : : OnOpenContextMenu ( )
{
UToolMenus * ToolMenus = UToolMenus : : Get ( ) ;
static const FName MenuName = " SourceControl.ChangelistContextMenu " ;
if ( ! ToolMenus - > IsMenuRegistered ( MenuName ) )
{
2022-08-26 11:04:20 -04:00
UToolMenu * RegisteredMenu = ToolMenus - > RegisterMenu ( MenuName ) ;
// Add section so it can be used as insert position for menu extensions
RegisteredMenu - > AddSection ( " Source Control " ) ;
2021-01-18 09:42:33 -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
TArray < TSharedPtr < IChangelistTreeItem > > SelectedChangelistNodes = ChangelistTreeView - > GetSelectedItems ( ) ;
TArray < TSharedPtr < IChangelistTreeItem > > SelectedUncontrolledChangelistNodes = UncontrolledChangelistTreeView - > GetSelectedItems ( ) ;
bool bHasSelectedChangelist = SelectedChangelistNodes . Num ( ) > 0 & & SelectedChangelistNodes [ 0 ] - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist ;
bool bHasSelectedShelvedChangelistNode = SelectedChangelistNodes . Num ( ) > 0 & & SelectedChangelistNodes [ 0 ] - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedChangelist ;
bool bHasSelectedUncontrolledChangelist = SelectedUncontrolledChangelistNodes . Num ( ) > 0 & & SelectedUncontrolledChangelistNodes [ 0 ] - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist ;
2021-01-26 09:19:24 -04:00
bool bHasSelectedFiles = ( GetSelectedFiles ( ) . Num ( ) > 0 ) ;
bool bHasSelectedShelvedFiles = ( GetSelectedShelvedFiles ( ) . Num ( ) > 0 ) ;
bool bHasEmptySelection = ( ! bHasSelectedChangelist & & ! bHasSelectedFiles & & ! bHasSelectedShelvedFiles ) ;
2021-01-18 09:42:33 -04:00
2022-08-26 11:04:20 -04:00
// Build up the menu for a selection
USourceControlMenuContext * ContextObject = NewObject < USourceControlMenuContext > ( ) ;
FToolMenuContext Context ( ContextObject ) ;
// Fill Context Object
TArray < FString > SelectedControlledFiles ;
TArray < FString > SelectedUncontrolledFiles ;
GetSelectedFiles ( SelectedControlledFiles , SelectedUncontrolledFiles ) ;
ContextObject - > SelectedFiles . Append ( SelectedControlledFiles ) ;
ContextObject - > SelectedFiles . Append ( SelectedUncontrolledFiles ) ;
UToolMenu * Menu = ToolMenus - > GenerateMenu ( MenuName , Context ) ;
FToolMenuSection & Section = * Menu - > FindSection ( " Source Control " ) ;
2021-01-18 09:42:33 -04:00
// This should appear only on change lists
if ( bHasSelectedChangelist )
{
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
Section . AddMenuEntry (
" SubmitChangelist " ,
LOCTEXT ( " SourceControl_SubmitChangelist " , " Submit Changelist... " ) ,
LOCTEXT ( " SourceControl_SubmitChangeslit_Tooltip " , " Submits a changelist " ) ,
FSlateIcon ( ) ,
2021-01-18 09:42:33 -04:00
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnSubmitChangelist ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanSubmitChangelist ) ) ) ;
2021-08-11 15:40:41 -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
Section . AddMenuEntry (
" ValidateChangelist " ,
LOCTEXT ( " SourceControl_ValidateChangelist " , " Validate Changelist " ) , LOCTEXT ( " SourceControl_ValidateChangeslit_Tooltip " , " Validates a changelist " ) ,
FSlateIcon ( ) ,
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnValidateChangelist ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanValidateChangelist ) ) ) ;
Section . AddMenuEntry (
" RevertUnchanged " ,
LOCTEXT ( " SourceControl_RevertUnchanged " , " Revert Unchanged " ) ,
LOCTEXT ( " SourceControl_Revert_Unchanged_Tooltip " , " Reverts unchanged files & changelists " ) ,
FSlateIcon ( ) ,
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnRevertUnchanged ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanRevertUnchanged ) ) ) ;
2021-01-18 09:42:33 -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
if ( bHasSelectedChangelist | | bHasSelectedUncontrolledChangelist )
2021-01-18 09:42:33 -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
Section . AddMenuEntry (
" Revert " ,
LOCTEXT ( " SourceControl_Revert " , " Revert Files " ) ,
LOCTEXT ( " SourceControl_Revert_Tooltip " , " Reverts all files in the changelist or from the selection " ) ,
FSlateIcon ( ) ,
2021-01-27 16:11:25 -04:00
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnRevert ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanRevert ) ) ) ;
2021-01-19 14:50:23 -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
if ( bHasSelectedChangelist & & ( bHasSelectedFiles | | bHasSelectedShelvedFiles | | ( bHasSelectedChangelist & & ( GetCurrentChangelistState ( ) - > GetFilesStates ( ) . Num ( ) > 0 | | GetCurrentChangelistState ( ) - > GetShelvedFilesStates ( ) . Num ( ) > 0 ) ) ) )
2021-01-26 09:19:24 -04:00
{
2021-01-27 16:11:25 -04:00
Section . AddSeparator ( " ShelveSeparator " ) ;
2021-01-26 09:19:24 -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
if ( bHasSelectedChangelist & & ( bHasSelectedFiles | | ( bHasSelectedChangelist & & GetCurrentChangelistState ( ) - > GetFilesStates ( ) . Num ( ) > 0 ) ) )
2021-01-26 09:19:24 -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
Section . AddMenuEntry ( " Shelve " ,
LOCTEXT ( " SourceControl_Shelve " , " Shelve Files " ) ,
LOCTEXT ( " SourceControl_Shelve_Tooltip " , " Shelves the changelist or the selected files " ) ,
FSlateIcon ( ) ,
2021-01-26 09:19:24 -04:00
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnShelve ) ) ) ;
}
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
if ( bHasSelectedShelvedFiles | | bHasSelectedShelvedChangelistNode )
2021-01-26 09:19:24 -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
Section . AddMenuEntry (
" Unshelve " ,
LOCTEXT ( " SourceControl_Unshelve " , " Unshelve Files " ) ,
LOCTEXT ( " SourceControl_Unshelve_Tooltip " , " Unshelve selected files or changelist " ) ,
FSlateIcon ( ) ,
2021-01-26 09:19:24 -04:00
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnUnshelve ) ) ) ;
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
Section . AddMenuEntry (
" DeleteShelved " ,
LOCTEXT ( " SourceControl_DeleteShelved " , " Delete Shelved Files " ) ,
LOCTEXT ( " SourceControl_DeleteShelved_Tooltip " , " Delete selected shelved files or all from changelist " ) ,
FSlateIcon ( ) ,
2021-01-26 09:19:24 -04:00
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnDeleteShelvedFiles ) ) ) ;
}
// Shelved files-only operations
if ( bHasSelectedShelvedFiles )
{
// Diff against workspace
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
Section . AddMenuEntry (
" DiffAgainstWorkspace " ,
LOCTEXT ( " SourceControl_DiffAgainstWorkspace " , " Diff Against Workspace Files... " ) ,
LOCTEXT ( " SourceControl_DiffAgainstWorkspace_Tooltip " , " Diff shelved file against the (local) workspace file " ) ,
FSlateIcon ( ) ,
2021-01-26 09:19:24 -04:00
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnDiffAgainstWorkspace ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanDiffAgainstWorkspace ) ) ) ;
}
2021-01-19 14:50:23 -04:00
if ( bHasEmptySelection | | bHasSelectedChangelist )
{
2021-01-27 16:11:25 -04:00
Section . AddSeparator ( " ChangelistsSeparator " ) ;
2021-01-19 14:50:23 -04:00
}
if ( bHasSelectedChangelist )
{
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
Section . AddMenuEntry (
" EditChangelist " ,
LOCTEXT ( " SourceControl_EditChangelist " , " Edit Changelist... " ) ,
LOCTEXT ( " SourceControl_Edit_Changelist_Tooltip " , " Edit a changelist description " ) ,
FSlateIcon ( ) ,
2021-01-19 14:50:23 -04:00
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnEditChangelist ) ) ) ;
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
Section . AddMenuEntry (
" DeleteChangelist " ,
LOCTEXT ( " SourceControl_DeleteChangelist " , " Delete Empty Changelist " ) ,
LOCTEXT ( " SourceControl_Delete_Changelist_Tooltip " , " Deletes an empty changelist " ) ,
FSlateIcon ( ) ,
2021-01-19 14:50:23 -04:00
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnDeleteChangelist ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanDeleteChangelist ) ) ) ;
}
2022-09-08 09:19:01 -04:00
if ( bHasSelectedUncontrolledChangelist )
{
Section . AddMenuEntry (
" EditUncontrolledChangelist " ,
LOCTEXT ( " SourceControl_EditUncontrolledChangelist " , " Edit Uncontrolled Changelist... " ) ,
LOCTEXT ( " SourceControl_Edit_Uncontrolled_Changelist_Tooltip " , " Edit an uncontrolled changelist description " ) ,
FSlateIcon ( ) ,
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnEditUncontrolledChangelist ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanEditUncontrolledChangelist ) ) ) ;
Section . AddMenuEntry (
" DeleteUncontrolledChangelist " ,
LOCTEXT ( " SourceControl_DeleteUncontrolledChangelist " , " Delete Empty Changelist " ) ,
LOCTEXT ( " SourceControl_Delete_Uncontrolled_Changelist_Tooltip " , " Deletes an empty uncontrolled changelist " ) ,
FSlateIcon ( ) ,
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnDeleteUncontrolledChangelist ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanDeleteUncontrolledChangelist ) ) ) ;
}
2021-01-19 14:50:23 -04:00
// Files-only operations
2021-01-26 09:19:24 -04:00
if ( bHasSelectedFiles )
2021-01-19 14:50:23 -04:00
{
2021-01-27 16:11:25 -04:00
Section . AddSeparator ( " FilesSeparator " ) ;
2021-01-19 14:50:23 -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
Section . AddMenuEntry (
" MoveFiles " , LOCTEXT ( " SourceControl_MoveFiles " , " Move Files To... " ) ,
LOCTEXT ( " SourceControl_MoveFiles_Tooltip " , " Move Files To A Different Changelist... " ) ,
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnMoveFiles ) ) ) ;
2021-03-24 08:29:57 -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
Section . AddMenuEntry (
" ShowHistory " ,
LOCTEXT ( " SourceControl_ShowHistory " , " Show History... " ) ,
LOCTEXT ( " SourceControl_ShowHistory_ToolTip " , " Show File History From Selection... " ) ,
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnShowHistory ) ) ) ;
2021-01-19 14:50:23 -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
Section . AddMenuEntry (
" DiffAgainstLocalVersion " ,
LOCTEXT ( " SourceControl_DiffAgainstDepot " , " Diff Against Depot... " ) ,
LOCTEXT ( " SourceControl_DiffAgainstLocal_Tooltip " , " Diff local file against depot revision. " ) ,
FSlateIcon ( ) ,
2021-01-19 14:50:23 -04:00
FUIAction (
FExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : OnDiffAgainstDepot ) ,
FCanExecuteAction : : CreateSP ( this , & SSourceControlChangelistsWidget : : CanDiffAgainstDepot ) ) ) ;
2021-01-18 09:42:33 -04:00
}
2021-05-26 18:15:46 -04:00
if ( FUncontrolledChangelistsModule : : Get ( ) . IsEnabled ( ) )
{
Section . AddSeparator ( " ReconcileSeparator " ) ;
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
Section . AddMenuEntry (
" Reconcile assets " ,
LOCTEXT ( " SourceControl_ReconcileAssets " , " Reconcile assets " ) ,
LOCTEXT ( " SourceControl_ReconcileAssets_Tooltip " , " Look for uncontrolled modification in currently added assets. " ) ,
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateLambda ( [ ] ( ) { FUncontrolledChangelistsModule : : Get ( ) . OnReconcileAssets ( ) ; } ) ) ) ;
2021-05-26 18:15:46 -04:00
}
2021-01-18 09:42:33 -04:00
return ToolMenus - > GenerateWidget ( Menu ) ;
}
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
TSharedRef < SChangelistTree > SSourceControlChangelistsWidget : : CreateChangelistTreeView ( TArray < TSharedPtr < IChangelistTreeItem > > & ItemSources )
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
return SNew ( SChangelistTree )
2021-01-11 15:31:58 -04:00
. ItemHeight ( 24.0f )
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
. TreeItemsSource ( & ItemSources )
2021-01-11 15:31:58 -04:00
. OnGenerateRow ( this , & SSourceControlChangelistsWidget : : OnGenerateRow )
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
. OnGetChildren ( this , & SSourceControlChangelistsWidget : : OnGetChangelistChildren )
. SelectionMode ( ESelectionMode : : Single )
2022-08-30 17:17:25 -04:00
. OnMouseButtonDoubleClick ( this , & SSourceControlChangelistsWidget : : OnItemDoubleClicked )
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
. OnContextMenuOpening ( this , & SSourceControlChangelistsWidget : : OnOpenContextMenu )
. OnSelectionChanged ( this , & SSourceControlChangelistsWidget : : OnChangelistSelectionChanged ) ;
}
TSharedRef < STreeView < FChangelistTreeItemPtr > > SSourceControlChangelistsWidget : : CreateChangelistFilesView ( )
{
return SNew ( STreeView < FChangelistTreeItemPtr > )
. ItemHeight ( 24.0f )
. TreeItemsSource ( & FileTreeNodes )
. OnGenerateRow ( this , & SSourceControlChangelistsWidget : : OnGenerateRow )
. OnGetChildren ( this , & SSourceControlChangelistsWidget : : OnGetFileChildren )
2021-01-11 15:31:58 -04:00
. SelectionMode ( ESelectionMode : : Multi )
2021-01-18 09:42:33 -04:00
. OnContextMenuOpening ( this , & SSourceControlChangelistsWidget : : OnOpenContextMenu )
2022-08-26 11:04:20 -04:00
. OnMouseButtonDoubleClick ( this , & SSourceControlChangelistsWidget : : OnItemDoubleClicked )
2021-01-11 15:31:58 -04:00
. HeaderRow
(
SNew ( SHeaderRow )
2022-09-07 17:15:39 -04:00
+ SHeaderRow : : Column ( SourceControlFileViewColumnId : : Icon )
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
. DefaultLabel ( FText : : GetEmpty ( ) )
. FillSized ( 18 )
2022-09-07 17:15:39 -04:00
. SortPriority ( this , & SSourceControlChangelistsWidget : : GetColumnSortPriority , SourceControlFileViewColumnId : : Icon )
. SortMode ( this , & SSourceControlChangelistsWidget : : GetColumnSortMode , SourceControlFileViewColumnId : : Icon )
2022-09-06 15:43:24 -04:00
. OnSort ( this , & SSourceControlChangelistsWidget : : OnColumnSortModeChanged )
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-09-07 17:15:39 -04:00
+ SHeaderRow : : Column ( SourceControlFileViewColumnId : : Name )
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
. DefaultLabel ( LOCTEXT ( " Name " , " Name " ) )
2021-01-11 15:31:58 -04:00
. FillWidth ( 0.2f )
2022-09-07 17:15:39 -04:00
. SortPriority ( this , & SSourceControlChangelistsWidget : : GetColumnSortPriority , SourceControlFileViewColumnId : : Name )
. SortMode ( this , & SSourceControlChangelistsWidget : : GetColumnSortMode , SourceControlFileViewColumnId : : Name )
2022-09-06 15:43:24 -04:00
. OnSort ( this , & SSourceControlChangelistsWidget : : OnColumnSortModeChanged )
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-09-07 17:15:39 -04:00
+ SHeaderRow : : Column ( SourceControlFileViewColumnId : : Path )
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
. DefaultLabel ( LOCTEXT ( " Path " , " Path " ) )
2021-01-20 11:49:37 -04:00
. FillWidth ( 0.6f )
2022-09-07 17:15:39 -04:00
. SortPriority ( this , & SSourceControlChangelistsWidget : : GetColumnSortPriority , SourceControlFileViewColumnId : : Path )
. SortMode ( this , & SSourceControlChangelistsWidget : : GetColumnSortMode , SourceControlFileViewColumnId : : Path )
2022-09-06 15:43:24 -04:00
. OnSort ( this , & SSourceControlChangelistsWidget : : OnColumnSortModeChanged )
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-09-07 17:15:39 -04:00
+ SHeaderRow : : Column ( SourceControlFileViewColumnId : : Type )
2021-01-20 11:49:37 -04:00
. DefaultLabel ( LOCTEXT ( " Type " , " Type " ) )
. FillWidth ( 0.2f )
2022-09-07 17:15:39 -04:00
. SortPriority ( this , & SSourceControlChangelistsWidget : : GetColumnSortPriority , SourceControlFileViewColumnId : : Type )
. SortMode ( this , & SSourceControlChangelistsWidget : : GetColumnSortMode , SourceControlFileViewColumnId : : Type )
2022-09-06 15:43:24 -04:00
. OnSort ( this , & SSourceControlChangelistsWidget : : OnColumnSortModeChanged )
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
TSharedRef < ITableRow > SSourceControlChangelistsWidget : : OnGenerateRow ( TSharedPtr < IChangelistTreeItem > InTreeItem , const TSharedRef < STableViewBase > & OwnerTable )
2021-01-11 15:31:58 -04:00
{
switch ( InTreeItem - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : Changelist :
return SNew ( SChangelistTableRow , 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
. TreeItemToVisualize ( InTreeItem )
. OnPostDrop ( this , & SSourceControlChangelistsWidget : : OnRefresh ) ;
2021-01-11 15:31:58 -04:00
2021-05-06 14:40:16 -04:00
case IChangelistTreeItem : : UncontrolledChangelist :
return SNew ( SUncontrolledChangelistTableRow , 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
. TreeItemToVisualize ( InTreeItem )
. OnPostDrop ( this , & SSourceControlChangelistsWidget : : OnRefresh ) ;
2021-05-06 14:40:16 -04:00
2021-01-11 15:31:58 -04:00
case IChangelistTreeItem : : File :
return SNew ( SFileTableRow , OwnerTable )
2021-01-18 15:31:14 -04:00
. TreeItemToVisualize ( InTreeItem )
. OnDragDetected ( this , & SSourceControlChangelistsWidget : : OnFilesDragged ) ;
2021-01-11 15:31:58 -04:00
2021-06-08 17:12:06 -04:00
case IChangelistTreeItem : : OfflineFile :
return SNew ( SOfflineFileTableRow , OwnerTable )
. TreeItemToVisualize ( InTreeItem ) ;
2021-01-26 09:19:24 -04:00
case IChangelistTreeItem : : ShelvedChangelist :
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
return SNew ( SShelvedFilesTableRow , OwnerTable )
. Icon ( FAppStyle : : GetBrush ( " SourceControl.ShelvedChangelist " ) )
. Text ( static_cast < const FShelvedChangelistTreeItem * > ( InTreeItem . Get ( ) ) - > GetDisplayText ( ) ) ;
2021-01-26 09:19:24 -04:00
case IChangelistTreeItem : : ShelvedFile :
2021-02-04 17:41:41 -04:00
return SNew ( SFileTableRow , OwnerTable )
2021-01-26 09:19:24 -04:00
. TreeItemToVisualize ( InTreeItem ) ;
2021-01-11 15:31:58 -04:00
default :
check ( false ) ;
} ;
return SNew ( STableRow < TSharedPtr < FString > > , OwnerTable ) ;
}
2021-01-18 15:31:14 -04:00
FReply SSourceControlChangelistsWidget : : OnFilesDragged ( const FGeometry & InGeometry , const FPointerEvent & InMouseEvent )
{
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
if ( InMouseEvent . IsMouseButtonDown ( EKeys : : LeftMouseButton ) & & ! FileTreeView - > GetSelectedItems ( ) . IsEmpty ( ) )
2021-01-18 15:31:14 -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
TSharedRef < FSCCFileDragDropOp > Operation = MakeShared < FSCCFileDragDropOp > ( ) ;
2021-01-18 15:31:14 -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
for ( FChangelistTreeItemPtr InTreeItem : FileTreeView - > GetSelectedItems ( ) )
2021-05-12 17:06:06 -04:00
{
if ( InTreeItem - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
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
TSharedRef < FFileTreeItem > FileTreeItem = StaticCastSharedRef < FFileTreeItem > ( InTreeItem . ToSharedRef ( ) ) ;
2021-05-12 17:06:06 -04:00
FSourceControlStateRef FileState = FileTreeItem - > FileState ;
if ( FileTreeItem - > GetParent ( ) - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
Operation - > UncontrolledFiles . Add ( MoveTemp ( FileState ) ) ;
}
else
{
Operation - > Files . Add ( MoveTemp ( FileState ) ) ;
}
}
}
2021-01-18 15:31:14 -04:00
Operation - > Construct ( ) ;
2021-05-12 17:06:06 -04:00
return FReply : : Handled ( ) . BeginDragDrop ( Operation ) ;
2021-01-18 15:31:14 -04:00
}
return FReply : : Unhandled ( ) ;
}
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 SSourceControlChangelistsWidget : : OnGetFileChildren ( TSharedPtr < IChangelistTreeItem > InParent , TArray < FChangelistTreeItemPtr > & OutChildren )
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
// Files are leave and don't have children.
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
void SSourceControlChangelistsWidget : : OnGetChangelistChildren ( FChangelistTreeItemPtr InParent , TArray < FChangelistTreeItemPtr > & OutChildren )
2021-01-26 10:56:16 -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
if ( InParent - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
2021-01-26 10:56:16 -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
// In the data model, a changelist has files as children, but in UI, only the 'Shelved Files' node is displayed under the changelist,
// and the files are displayed in the file view at the right.
for ( const TSharedPtr < IChangelistTreeItem > & Child : InParent - > GetChildren ( ) )
2021-01-26 10:56:16 -04:00
{
if ( Child - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedChangelist )
{
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
if ( Child - > GetChildren ( ) . Num ( ) > 0 )
{
OutChildren . Add ( Child ) ; // Add the 'Shelved Files' only if there are shelved files.
break ; // Found the only possible child for the UI.
}
2021-01-26 10:56:16 -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
else if ( InParent - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
2021-01-26 10:56:16 -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
// Uncontrolled changelist nodes do not have children at the moment.
}
}
2022-08-26 11:04:20 -04:00
void SSourceControlChangelistsWidget : : OnItemDoubleClicked ( TSharedPtr < IChangelistTreeItem > Item )
{
if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : OfflineFile )
{
const FString & Filename = StaticCastSharedPtr < FOfflineFileTreeItem > ( Item ) - > GetFilename ( ) ;
ISourceControlWindowsModule : : Get ( ) . OnChangelistFileDoubleClicked ( ) . Broadcast ( Filename ) ;
}
else if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : File )
{
const FString & Filename = StaticCastSharedPtr < FFileTreeItem > ( Item ) - > FileState - > GetFilename ( ) ;
ISourceControlWindowsModule : : Get ( ) . OnChangelistFileDoubleClicked ( ) . Broadcast ( Filename ) ;
}
2022-08-30 17:17:25 -04:00
else if ( Item - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
// Submit the currently selected changelists if conditions are met.
FText FailureMessage ;
if ( CanSubmitChangelist ( & FailureMessage ) )
{
OnSubmitChangelist ( ) ;
}
else
{
FText Title ( LOCTEXT ( " Cannot_Submit_Changelist_Title " , " Cannot Submit Changelist " ) ) ;
FMessageDialog : : Open ( EAppMsgType : : Ok , EAppReturnType : : Ok , FailureMessage , & Title ) ;
}
}
2022-08-26 11:04:20 -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 SSourceControlChangelistsWidget : : OnChangelistSelectionChanged ( TSharedPtr < IChangelistTreeItem > SelectedChangelist , ESelectInfo : : Type SelectionType )
{
FileTreeNodes . Reset ( ) ;
// Add the children of the parent item to the file tree node.
auto AddChangelistFilesToFileView = [ this ] ( TSharedPtr < IChangelistTreeItem > ParentItem , IChangelistTreeItem : : TreeItemType DesiredChildrenType )
{
for ( const TSharedPtr < IChangelistTreeItem > & Child : ParentItem - > GetChildren ( ) )
2021-01-26 10:56:16 -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
if ( Child - > GetTreeItemType ( ) = = DesiredChildrenType )
2021-01-26 10:56:16 -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
FileTreeNodes . Add ( Child ) ;
2021-01-26 10:56:16 -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
} ;
if ( SelectedChangelist ) // Can be a Changelist, Uncontrolled Changelist or Shelved Changelist
{
IChangelistTreeItem : : TreeItemType ChangelistType = SelectedChangelist - > GetTreeItemType ( ) ;
switch ( ChangelistType )
{
case IChangelistTreeItem : : Changelist :
case IChangelistTreeItem : : ShelvedChangelist :
UncontrolledChangelistTreeView - > ClearSelection ( ) ; // Don't have a changelists selected at the same time than an uncontrolled one, they share the same file view.
AddChangelistFilesToFileView ( SelectedChangelist , ChangelistType = = IChangelistTreeItem : : Changelist ? IChangelistTreeItem : : File : IChangelistTreeItem : : ShelvedFile ) ;
break ;
case IChangelistTreeItem : : UncontrolledChangelist :
ChangelistTreeView - > ClearSelection ( ) ;
AddChangelistFilesToFileView ( SelectedChangelist , IChangelistTreeItem : : File ) ;
AddChangelistFilesToFileView ( SelectedChangelist , IChangelistTreeItem : : OfflineFile ) ;
break ;
default :
break ;
}
}
FileTreeView - > RequestTreeRefresh ( ) ;
}
2022-09-06 15:43:24 -04:00
EColumnSortPriority : : Type SSourceControlChangelistsWidget : : GetColumnSortPriority ( const FName ColumnId ) const
{
if ( ColumnId = = PrimarySortedColumn )
{
return EColumnSortPriority : : Primary ;
}
else if ( ColumnId = = SecondarySortedColumn )
{
return EColumnSortPriority : : Secondary ;
}
return EColumnSortPriority : : Max ; // No specific priority.
}
EColumnSortMode : : Type SSourceControlChangelistsWidget : : GetColumnSortMode ( const FName ColumnId ) const
{
if ( ColumnId = = PrimarySortedColumn )
{
return PrimarySortMode ;
}
else if ( ColumnId = = SecondarySortedColumn )
{
return SecondarySortMode ;
}
return EColumnSortMode : : None ;
}
void SSourceControlChangelistsWidget : : OnColumnSortModeChanged ( const EColumnSortPriority : : Type InSortPriority , const FName & InColumnId , const EColumnSortMode : : Type InSortMode )
{
if ( InSortPriority = = EColumnSortPriority : : Primary )
{
PrimarySortedColumn = InColumnId ;
PrimarySortMode = InSortMode ;
if ( InColumnId = = SecondarySortedColumn ) // Cannot be primary and secondary at the same time.
{
SecondarySortedColumn = FName ( ) ;
SecondarySortMode = EColumnSortMode : : None ;
}
}
else if ( InSortPriority = = EColumnSortPriority : : Secondary )
{
SecondarySortedColumn = InColumnId ;
SecondarySortMode = InSortMode ;
}
SortFileView ( ) ;
FileTreeView - > RequestListRefresh ( ) ;
}
void SSourceControlChangelistsWidget : : SortFileView ( )
{
// Invoked when sorting the icons. This gives a priority to the status for sorting purpose.
auto GetSourceControlStateWeight = [ ] ( const ISourceControlState & State )
{
if ( ! State . IsCurrent ( ) ) { return 0 ; } // First if sorted in ascending order.
if ( State . IsUnknown ( ) ) { return 1 ; }
if ( State . IsConflicted ( ) ) { return 2 ; }
if ( State . IsCheckedOutOther ( ) ) { return 3 ; }
if ( State . IsCheckedOut ( ) ) { return 4 ; }
if ( State . IsDeleted ( ) ) { return 5 ; }
if ( State . IsAdded ( ) ) { return 6 ; }
else { return 7 ; }
} ;
// Implements the equivalent of operator< to compare the files status.
auto OperatorLessFileIcon = [ & GetSourceControlStateWeight ] ( const FFileTreeItem & Lhs , const FFileTreeItem & Rhs ) - > bool
{
return GetSourceControlStateWeight ( Lhs . FileState . Get ( ) ) < GetSourceControlStateWeight ( Rhs . FileState . Get ( ) ) ;
} ;
auto OperatorLessOfflineFileIcon = [ ] ( const FOfflineFileTreeItem & Lhs , const FOfflineFileTreeItem & Rhs ) - > bool
{
return false ; // Offline file do not have state, don't change the order.
} ;
auto OperatorLessIcon = [ & OperatorLessFileIcon , & OperatorLessOfflineFileIcon ] ( IChangelistTreeItem * Lhs , IChangelistTreeItem * Rhs ) - > bool
{
check ( Lhs - > GetTreeItemType ( ) = = Rhs - > GetTreeItemType ( ) ) ;
switch ( Lhs - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : File :
case IChangelistTreeItem : : ShelvedFile :
return OperatorLessFileIcon ( * static_cast < FFileTreeItem * > ( Lhs ) , * static_cast < FFileTreeItem * > ( Rhs ) ) ;
case IChangelistTreeItem : : OfflineFile :
return OperatorLessOfflineFileIcon ( * static_cast < FOfflineFileTreeItem * > ( Lhs ) , * static_cast < FOfflineFileTreeItem * > ( Rhs ) ) ;
default :
return false ;
}
} ;
auto GetName = [ ] ( IChangelistTreeItem * Item ) - > FString
{
switch ( Item - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : File :
case IChangelistTreeItem : : ShelvedFile :
return static_cast < FFileTreeItem * > ( Item ) - > GetAssetName ( ) . ToString ( ) ;
case IChangelistTreeItem : : OfflineFile :
return static_cast < FOfflineFileTreeItem * > ( Item ) - > GetDisplayName ( ) . ToString ( ) ;
default :
return FString ( ) ;
}
} ;
auto GetPath = [ ] ( IChangelistTreeItem * Item ) - > FString
{
switch ( Item - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : File :
case IChangelistTreeItem : : ShelvedFile :
return static_cast < FFileTreeItem * > ( Item ) - > GetAssetPath ( ) . ToString ( ) ;
case IChangelistTreeItem : : OfflineFile :
return static_cast < FOfflineFileTreeItem * > ( Item ) - > GetDisplayPath ( ) . ToString ( ) ;
default :
return FString ( ) ;
}
} ;
auto GetType = [ ] ( IChangelistTreeItem * Item ) - > FString
{
switch ( Item - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : File :
case IChangelistTreeItem : : ShelvedFile :
return static_cast < FFileTreeItem * > ( Item ) - > GetAssetType ( ) . ToString ( ) ;
case IChangelistTreeItem : : OfflineFile :
return static_cast < FOfflineFileTreeItem * > ( Item ) - > GetDisplayType ( ) . ToString ( ) ;
default :
return FString ( ) ;
}
} ;
2022-09-07 17:15:39 -04:00
auto Compare = [ & ] ( const TSharedPtr < IChangelistTreeItem > & Lhs , const TSharedPtr < IChangelistTreeItem > & Rhs , const FName & ColumnId , EColumnSortMode : : Type SortMode ) - > bool
2022-09-06 15:43:24 -04:00
{
2022-09-07 17:15:39 -04:00
if ( ColumnId = = SourceControlFileViewColumnId : : Icon )
2022-09-06 15:43:24 -04:00
{
return SortMode = = EColumnSortMode : : Ascending ? OperatorLessIcon ( Lhs . Get ( ) , Rhs . Get ( ) ) : OperatorLessIcon ( Rhs . Get ( ) , Lhs . Get ( ) ) ;
}
2022-09-07 17:15:39 -04:00
else if ( ColumnId = = SourceControlFileViewColumnId : : Name )
2022-09-06 15:43:24 -04:00
{
return SortMode = = EColumnSortMode : : Ascending ? GetName ( Lhs . Get ( ) ) < GetName ( Rhs . Get ( ) ) : GetName ( Lhs . Get ( ) ) > GetName ( Rhs . Get ( ) ) ;
}
2022-09-07 17:15:39 -04:00
else if ( ColumnId = = SourceControlFileViewColumnId : : Path )
2022-09-06 15:43:24 -04:00
{
return SortMode = = EColumnSortMode : : Ascending ? GetPath ( Lhs . Get ( ) ) < GetPath ( Rhs . Get ( ) ) : GetPath ( Lhs . Get ( ) ) > GetPath ( Rhs . Get ( ) ) ;
}
2022-09-07 17:15:39 -04:00
else if ( ColumnId = = SourceControlFileViewColumnId : : Type )
2022-09-06 15:43:24 -04:00
{
return SortMode = = EColumnSortMode : : Ascending ? GetType ( Lhs . Get ( ) ) < GetType ( Rhs . Get ( ) ) : GetType ( Lhs . Get ( ) ) > GetType ( Rhs . Get ( ) ) ;
}
else
{
checkNoEntry ( ) ;
return false ;
}
} ;
FileTreeNodes . Sort ( [ & ] ( const TSharedPtr < IChangelistTreeItem > & Lhs , const TSharedPtr < IChangelistTreeItem > & Rhs )
{
if ( Compare ( Lhs , Rhs , PrimarySortedColumn , PrimarySortMode ) )
{
return true ; // Lhs must be before Rhs based on the primary sort order.
}
else if ( Compare ( Rhs , Lhs , PrimarySortedColumn , PrimarySortMode ) ) // Invert operands order (goal is to check if operands are equal or not)
{
return false ; // Rhs must be before Lhs based on the primary sort.
}
else if ( ! SecondarySortedColumn . IsNone ( ) ) // Lhs == Rhs on the primary column, need to sort according the secondary column if one is set.
{
return Compare ( Lhs , Rhs , SecondarySortedColumn , SecondarySortMode ) ;
}
return 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
void SSourceControlChangelistsWidget : : SaveExpandedAndSelectionStates ( FExpandedAndSelectionStates & OutStates )
{
// Save the selected item from the 'changelists' tree.
TArray < TSharedPtr < IChangelistTreeItem > > SelectedChangelistItems = ChangelistTreeView - > GetSelectedItems ( ) ;
OutStates . SelectedChangelistNode = SelectedChangelistItems . IsEmpty ( ) ? TSharedPtr < IChangelistTreeItem > ( ) : SelectedChangelistItems [ 0 ] ;
OutStates . bShelvedFilesNodeSelected = false ;
if ( OutStates . SelectedChangelistNode & & OutStates . SelectedChangelistNode - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedChangelist )
{
OutStates . SelectedChangelistNode = OutStates . SelectedChangelistNode - > GetParent ( ) ;
OutStates . bShelvedFilesNodeSelected = true ;
}
// Save the selected item from 'uncontrolled changelists' tree.
SelectedChangelistItems = UncontrolledChangelistTreeView - > GetSelectedItems ( ) ;
OutStates . SelectedUncontrolledChangelistNode = SelectedChangelistItems . IsEmpty ( ) ? TSharedPtr < IChangelistTreeItem > ( ) : SelectedChangelistItems [ 0 ] ;
// Remember the expanded nodes.
check ( OutStates . ExpandedTreeNodes . IsEmpty ( ) ) ;
ChangelistTreeView - > GetExpandedItems ( OutStates . ExpandedTreeNodes ) ;
UncontrolledChangelistTreeView - > GetExpandedItems ( OutStates . ExpandedTreeNodes ) ;
// Remember the selected files.
OutStates . SelectedFileNodes . Reset ( FileTreeView - > GetNumItemsSelected ( ) ) ;
OutStates . SelectedFileNodes . Append ( FileTreeView - > GetSelectedItems ( ) ) ;
}
void SSourceControlChangelistsWidget : : RestoreExpandedAndSelectionStates ( const FExpandedAndSelectionStates & InStates )
{
// Returns whether two changelist nodes represent the same changelist.
auto ChangelistEquals = [ ] ( const TSharedPtr < IChangelistTreeItem > & Lhs , const TSharedPtr < IChangelistTreeItem > & Rhs )
{
// NOTE: This TRUSTS the source control to return the same ' state' pointer before and after an update if the changelist still exists.
return static_cast < FChangelistTreeItem * > ( Lhs . Get ( ) ) - > ChangelistState = = static_cast < FChangelistTreeItem * > ( Rhs . Get ( ) ) - > ChangelistState ;
} ;
// Returns whether two uncontrolled changelist nodes represent the same changelist.
auto UncontrolledChangelistEquals = [ ] ( const TSharedPtr < IChangelistTreeItem > & Lhs , const TSharedPtr < IChangelistTreeItem > & Rhs )
{
// NOTE: This TRUSTS the source control to return the same 'state' pointer before and after an update if the changelist still exists.
return static_cast < FUncontrolledChangelistTreeItem * > ( Lhs . Get ( ) ) - > UncontrolledChangelistState = = static_cast < FUncontrolledChangelistTreeItem * > ( Rhs . Get ( ) ) - > UncontrolledChangelistState ;
} ;
// Find a specified item in a list. The nodes were deleted and recreated during the update and this function is used to match the new node corresponding to the old node.
auto Find = [ ] ( const TArray < TSharedPtr < IChangelistTreeItem > > & Nodes , const TSharedPtr < IChangelistTreeItem > SearchedItem ,
const TFunction < bool ( const TSharedPtr < IChangelistTreeItem > & Lhs , const TSharedPtr < IChangelistTreeItem > & Rhs ) > & Predicate )
{
if ( const TSharedPtr < IChangelistTreeItem > * Node = Nodes . FindByPredicate (
[ & SearchedItem , & Predicate ] ( const TSharedPtr < IChangelistTreeItem > & Candidate ) { return Predicate ( SearchedItem , Candidate ) ; } ) )
{
return * Node ;
}
return TSharedPtr < IChangelistTreeItem > ( ) ; // return nullptr;
} ;
// Restore the expansion states (Tree is only one level deep)
for ( const TSharedPtr < IChangelistTreeItem > & ExpandedNode : InStates . ExpandedTreeNodes )
{
if ( ExpandedNode - > GetTreeItemType ( ) = = IChangelistTreeItem : : Changelist )
{
// Check if the node still exist after the update.
if ( TSharedPtr < IChangelistTreeItem > MatchingNode = Find ( ChangelistTreeNodes , ExpandedNode , ChangelistEquals ) )
{
ChangelistTreeView - > SetItemExpansion ( MatchingNode , true ) ;
}
}
else if ( ExpandedNode - > GetTreeItemType ( ) = = IChangelistTreeItem : : UncontrolledChangelist )
{
// Check if the node still exist after the update.
if ( TSharedPtr < IChangelistTreeItem > MatchingNode = Find ( UncontrolledChangelistTreeNodes , ExpandedNode , UncontrolledChangelistEquals ) )
{
UncontrolledChangelistTreeView - > SetItemExpansion ( MatchingNode , true ) ;
}
}
}
// Restore the selected nodes.
if ( InStates . SelectedChangelistNode )
{
if ( TSharedPtr < IChangelistTreeItem > MatchingNode = Find ( ChangelistTreeNodes , InStates . SelectedChangelistNode , ChangelistEquals ) )
{
if ( InStates . bShelvedFilesNodeSelected & & static_cast < const FChangelistTreeItem * > ( MatchingNode . Get ( ) ) - > GetShelvedFileCount ( ) > 0 )
{
for ( const TSharedPtr < IChangelistTreeItem > & Child : MatchingNode - > GetChildren ( ) )
{
if ( Child - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedChangelist )
{
ChangelistTreeView - > SetSelection ( Child ) ; // Select 'Shelved Files' node under the changelist.
break ;
}
}
}
else
{
ChangelistTreeView - > SetSelection ( MatchingNode ) ; // Select the 'changelist' node
}
}
}
else if ( InStates . SelectedUncontrolledChangelistNode )
{
if ( TSharedPtr < IChangelistTreeItem > MatchingNode = Find ( UncontrolledChangelistTreeNodes , InStates . SelectedUncontrolledChangelistNode , UncontrolledChangelistEquals ) )
{
UncontrolledChangelistTreeView - > SetSelection ( MatchingNode ) ; // Select the 'uncontrolled changelist' node
}
}
FileTreeView - > ClearSelection ( ) ;
// Try to reselect the files.
for ( const TSharedPtr < IChangelistTreeItem > & FileNode : FileTreeNodes )
{
switch ( FileNode - > GetTreeItemType ( ) )
{
case IChangelistTreeItem : : File :
if ( InStates . SelectedFileNodes . ContainsByPredicate (
[ & FileNode ] ( const TSharedPtr < IChangelistTreeItem > & Candidate )
{
return Candidate - > GetTreeItemType ( ) = = IChangelistTreeItem : : File & &
static_cast < const FFileTreeItem * > ( Candidate . Get ( ) ) - > GetAssetPath ( ) . EqualTo ( static_cast < const FFileTreeItem * > ( FileNode . Get ( ) ) - > GetAssetPath ( ) ) & &
static_cast < const FFileTreeItem * > ( Candidate . Get ( ) ) - > GetFileName ( ) . EqualTo ( static_cast < const FFileTreeItem * > ( FileNode . Get ( ) ) - > GetFileName ( ) ) ;
} ) )
{
FileTreeView - > SetItemSelection ( FileNode , true ) ;
}
break ;
case IChangelistTreeItem : : ShelvedFile :
if ( InStates . SelectedFileNodes . ContainsByPredicate (
[ & FileNode ] ( const TSharedPtr < IChangelistTreeItem > & Candidate )
{
return Candidate - > GetTreeItemType ( ) = = IChangelistTreeItem : : ShelvedFile & &
static_cast < const FShelvedFileTreeItem * > ( Candidate . Get ( ) ) - > GetAssetPath ( ) . EqualTo ( static_cast < const FShelvedFileTreeItem * > ( FileNode . Get ( ) ) - > GetAssetPath ( ) ) & &
static_cast < const FShelvedFileTreeItem * > ( Candidate . Get ( ) ) - > GetFileName ( ) . EqualTo ( static_cast < const FShelvedFileTreeItem * > ( FileNode . Get ( ) ) - > GetFileName ( ) ) ;
} ) )
{
FileTreeView - > SetItemSelection ( FileNode , true ) ;
}
break ;
case IChangelistTreeItem : : OfflineFile :
if ( InStates . SelectedFileNodes . ContainsByPredicate (
[ & FileNode ] ( const TSharedPtr < IChangelistTreeItem > & Candidate )
{
return Candidate - > GetTreeItemType ( ) = = IChangelistTreeItem : : OfflineFile & &
static_cast < const FOfflineFileTreeItem * > ( Candidate . Get ( ) ) - > GetDisplayPath ( ) . EqualTo ( static_cast < const FOfflineFileTreeItem * > ( FileNode . Get ( ) ) - > GetDisplayPath ( ) ) & &
static_cast < const FOfflineFileTreeItem * > ( Candidate . Get ( ) ) - > GetDisplayName ( ) . EqualTo ( static_cast < const FOfflineFileTreeItem * > ( FileNode . Get ( ) ) - > GetDisplayName ( ) ) ;
} ) )
{
FileTreeView - > SetItemSelection ( FileNode , true ) ;
}
break ;
}
2021-01-26 10:56:16 -04:00
}
}
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
# undef LOCTEXT_NAMESPACE