Files
UnrealEngineUWP/Engine/Source/Editor/Kismet/Private/CallStackViewer.cpp
robert manuszewski d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00

621 lines
18 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CallStackViewer.h"
#include "Blueprint/WidgetBlueprintGeneratedClass.h"
#include "Styling/AppStyle.h"
#include "Framework/Commands/GenericCommands.h"
#include "Framework/Docking/TabManager.h"
#include "Framework/MultiBox/MultiBoxBuilder.h"
#include "HAL/PlatformApplicationMisc.h"
#include "K2Node_Event.h"
#include "Kismet2/KismetEditorUtilities.h"
#include "Kismet2/BlueprintEditorUtils.h"
#include "Kismet2/KismetDebugUtilities.h"
#include "Widgets/Docking/SDockTab.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/Layout/SBox.h"
#include "Widgets/Views/STreeView.h"
#include "ToolMenus.h"
// So that we can poll the running state:
#include "Editor/UnrealEdEngine.h"
#include "Kismet2/DebuggerCommands.h"
extern UNREALED_API UUnrealEdEngine* GUnrealEd;
#define LOCTEXT_NAMESPACE "CallStackViewer"
enum class ECallstackLanguages : uint8
{
Blueprints,
NativeCPP,
};
struct FCallStackRow
{
FCallStackRow(
UObject* InContextObject,
const FName& InScopeName,
const FName& InFunctionName,
int32 InScriptOffset,
ECallstackLanguages InLanguage,
const FText& InScopeDisplayName,
const FText& InFunctionDisplayName
)
: ContextObject(InContextObject)
, ScopeName(InScopeName)
, FunctionName(InFunctionName)
, ScriptOffset(InScriptOffset)
, Language(InLanguage)
, ScopeDisplayName(InScopeDisplayName)
, FunctionDisplayName(InFunctionDisplayName)
{
}
UObject* ContextObject;
FName ScopeName;
FName FunctionName;
int32 ScriptOffset;
ECallstackLanguages Language;
FText ScopeDisplayName;
FText FunctionDisplayName;
FText GetTextForEntry() const
{
switch(Language)
{
case ECallstackLanguages::Blueprints:
return FText::Format(
LOCTEXT("CallStackEntry", "{0}: {1}"),
ScopeDisplayName,
FunctionDisplayName
);
case ECallstackLanguages::NativeCPP:
return ScopeDisplayName;
}
return FText();
}
};
DECLARE_MULTICAST_DELEGATE_OneParam(FOnDisplayedCallstackChanged, TArray<TSharedRef<FCallStackRow>>*);
FOnDisplayedCallstackChanged ListSubscribers;
typedef STreeView<TSharedRef<FCallStackRow>> SCallStackTree;
class SCallStackViewer : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS( SCallStackViewer ){}
SLATE_END_ARGS()
void Construct(const FArguments& InArgs, TArray<TSharedRef<FCallStackRow>>* CallStackSource);
void UpdateCallStack(TArray<TSharedRef<FCallStackRow>>* ScriptStack);
void CopySelectedRows() const;
void JumpToEntry(TSharedRef< FCallStackRow > Entry);
void JumpToSelectedEntry();
/** SWidget interface */
virtual FReply OnKeyDown( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent );
TSharedPtr<SCallStackTree> CallStackTreeWidget;
TArray<TSharedRef<FCallStackRow>>* CallStackSource;
TWeakPtr<FCallStackRow> LastFrameNavigatedTo;
TWeakPtr<FCallStackRow> LastFrameClickedOn;
TSharedPtr< FUICommandList > CommandList;
};
class SCallStackViewerTableRow : public SMultiColumnTableRow< TSharedRef<FCallStackRow> >
{
public:
SLATE_BEGIN_ARGS(SCallStackViewerTableRow) { }
SLATE_END_ARGS()
void Construct( const FArguments& InArgs, TWeakPtr<FCallStackRow> InEntry, TWeakPtr<SCallStackViewer> InOwner, const TSharedRef<STableViewBase>& InOwnerTableView )
{
CallStackEntry = InEntry;
Owner = InOwner;
SMultiColumnTableRow< TSharedRef<FCallStackRow> >::Construct(FSuperRowType::FArguments(), InOwnerTableView);
TSharedPtr<FCallStackRow> EntryPinned = InEntry.Pin();
if(EntryPinned.IsValid())
{
switch(EntryPinned->Language)
{
case ECallstackLanguages::Blueprints:
SetEnabled(true);
break;
case ECallstackLanguages::NativeCPP:
SetEnabled(false);
break;
}
}
}
virtual TSharedRef<SWidget> GenerateWidgetForColumn( const FName& InColumnName )
{
TSharedPtr<FCallStackRow> CallStackEntryPinned = CallStackEntry.Pin();
if(InColumnName == TEXT("ProgramCounter") || !CallStackEntryPinned.IsValid())
{
TSharedPtr<SCallStackViewer> OwnerPinned = Owner.Pin();
if(CallStackEntryPinned.IsValid() && OwnerPinned.IsValid())
{
TSharedPtr<SImage> Icon;
if(OwnerPinned->CallStackSource->Num() > 0 && (*OwnerPinned->CallStackSource)[0] == CallStackEntryPinned)
{
Icon = SNew(SImage)
.Image(FAppStyle::GetBrush("Kismet.CallStackViewer.CurrentStackFrame"))
.ColorAndOpacity( FAppStyle::GetColor("Kismet.CallStackViewer.CurrentStackFrameColor") );
}
else
{
const auto NavigationTrackerVisibility = [](TWeakPtr<SCallStackViewer> InOwner, TWeakPtr<FCallStackRow> InCallStackEntry) -> EVisibility
{
TSharedPtr<SCallStackViewer> InOwnerPinned = InOwner.Pin();
TSharedPtr<FCallStackRow> InCallStackEntryPinned = InCallStackEntry.Pin();
if(InOwnerPinned.IsValid() && InCallStackEntryPinned.IsValid() && InOwnerPinned->LastFrameNavigatedTo == InCallStackEntryPinned)
{
return EVisibility::Visible;
}
return EVisibility::Hidden;
};
Icon = SNew(SImage)
.Image(FAppStyle::GetBrush("Kismet.CallStackViewer.CurrentStackFrame"))
.ColorAndOpacity( FAppStyle::GetColor("Kismet.CallStackViewer.LastStackFrameNavigatedToColor") )
.Visibility(
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateStatic(NavigationTrackerVisibility, Owner, CallStackEntry))
);
}
if(Icon.IsValid())
{
return SNew( SHorizontalBox )
+SHorizontalBox::Slot()
.AutoWidth()
.Padding(2, 2, 2, 2)
[
Icon.ToSharedRef()
];
}
}
return SNew(SBox);
}
else if( InColumnName == TEXT("FunctionName"))
{
return
SNew( SHorizontalBox )
+SHorizontalBox::Slot()
.AutoWidth()
.Padding(2, 2, 2, 2)
[
SNew(STextBlock)
.Text(
CallStackEntryPinned->GetTextForEntry()
)
];
}
else if (InColumnName == TEXT("Language"))
{
FText Language;
switch( CallStackEntryPinned->Language)
{
case ECallstackLanguages::Blueprints:
Language = LOCTEXT("BlueprintsLanguageName", "Blueprints");
break;
case ECallstackLanguages::NativeCPP:
Language = LOCTEXT("CPPLanguageName", "C++");
break;
}
return SNew( SHorizontalBox )
+SHorizontalBox::Slot()
.AutoWidth()
.Padding(2, 2, 2, 2)
[
SNew(STextBlock)
.Text(Language)
];
}
else
{
ensure(false);
return SNew(STextBlock)
.Text(LOCTEXT("UnexpectedColumn", "Unexpected Column"));
}
}
virtual FReply OnMouseButtonUp( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) override
{
// Our owner needs to know which row was right clicked in order to provide reliable navigation
// from the context menu:
TSharedPtr<SCallStackViewer> OwnerPinned = Owner.Pin();
if(OwnerPinned.IsValid())
{
OwnerPinned->LastFrameClickedOn = CallStackEntry;
}
return SMultiColumnTableRow< TSharedRef<FCallStackRow> >::OnMouseButtonUp(MyGeometry, MouseEvent);
}
private:
TWeakPtr<FCallStackRow> CallStackEntry;
TWeakPtr<SCallStackViewer> Owner;
};
void SCallStackViewer::Construct(const FArguments& InArgs, TArray<TSharedRef<FCallStackRow>>* InCallStackSource)
{
CommandList = MakeShareable( new FUICommandList );
CommandList->MapAction(
FGenericCommands::Get().Copy,
FExecuteAction::CreateSP( this, &SCallStackViewer::CopySelectedRows ),
// we need to override the default 'can execute' because we want to be available during debugging:
FCanExecuteAction::CreateStatic( [](){ return true; } )
);
CallStackSource = InCallStackSource;
// The table view 'owns' the row, but it's too inflexible to do anything useful, so we pass in a pointer to SCallStackViewer,
// this is only necessary because we have multiple columns and SMultiColumnTableRow requires deriving:
const auto RowGenerator = [](TSharedRef< FCallStackRow > Entry, const TSharedRef<STableViewBase>& TableOwner, TWeakPtr<SCallStackViewer> ControlOwner) -> TSharedRef< ITableRow >
{
return SNew(SCallStackViewerTableRow, Entry, ControlOwner, TableOwner);
};
const auto ContextMenuOpened = [](TWeakPtr<FUICommandList> InCommandList, TWeakPtr<SCallStackViewer> ControlOwnerWeak) -> TSharedPtr<SWidget>
{
const bool CloseAfterSelection = true;
FMenuBuilder MenuBuilder( CloseAfterSelection, InCommandList.Pin() );
TSharedPtr<SCallStackViewer> ControlOwner = ControlOwnerWeak.Pin();
if(ControlOwner.IsValid())
{
MenuBuilder.AddMenuEntry(
LOCTEXT("GoToDefinition", "Go to Function Definition"),
LOCTEXT("GoToDefinitionTooltip", "Opens the Blueprint that declares the function"),
FSlateIcon(),
FUIAction(
FExecuteAction::CreateSP(ControlOwner.ToSharedRef(), &SCallStackViewer::JumpToSelectedEntry),
FCanExecuteAction::CreateStatic( [](){ return true; } )
)
);
}
MenuBuilder.AddMenuEntry(FGenericCommands::Get().Copy);
return MenuBuilder.MakeWidget();
};
// there is no nesting in this list view:
const auto ChildrenAccessor = [](TSharedRef<FCallStackRow> InTreeItem, TArray< TSharedRef< FCallStackRow > >& OutChildren)
{
};
const auto EmptyWarningVisibility = [](TWeakPtr<SCallStackViewer> ControlOwnerWeak) -> EVisibility
{
TSharedPtr<SCallStackViewer> ControlOwner = ControlOwnerWeak.Pin();
if( ControlOwner.IsValid() &&
ControlOwner->CallStackSource &&
ControlOwner->CallStackSource->Num() > 0)
{
return EVisibility::Hidden;
}
return EVisibility::Visible;
};
const auto StaleCallStackWarning = [](TWeakPtr<SCallStackViewer> ControlOwnerWeak)->FText
{
TSharedPtr<SCallStackViewer> ControlOwner = ControlOwnerWeak.Pin();
if (ControlOwner.IsValid() &&
ControlOwner->CallStackSource &&
ControlOwner->CallStackSource->Num() > 0)
{
if (!GUnrealEd->PlayWorld)
{
return LOCTEXT("SessionOver", "Warning: The session has ended and therefore the displayed call stack is out of date");
}
if (!GUnrealEd->PlayWorld->bDebugPauseExecution)
{
return LOCTEXT("CurrentlyRunning", "Warning: The game is currently running - the callstack will be updated when excution is paused");
}
}
return FText();
};
const auto CallStackViewIsEnabled = [](TWeakPtr<SCallStackViewer> ControlOwnerWeak) -> bool
{
TSharedPtr<SCallStackViewer> ControlOwner = ControlOwnerWeak.Pin();
if(ControlOwner.IsValid() &&
ControlOwner->CallStackSource &&
ControlOwner->CallStackSource->Num() > 0)
{
return true;
}
return false;
};
// Cast due to TSharedFromThis inheritance issues:
TSharedRef<SCallStackViewer> SelfTyped = StaticCastSharedRef<SCallStackViewer>(AsShared());
TWeakPtr<SCallStackViewer> SelfWeak = SelfTyped;
TWeakPtr<FUICommandList> CommandListWeak = CommandList;
ChildSlot
[
SNew(SBorder)
.Padding(4)
.BorderImage( FAppStyle::GetBrush("ToolPanel.GroupBorder") )
[
SNew(SOverlay)
+SOverlay::Slot()
[
SNew(SVerticalBox)
+SVerticalBox::Slot()
.AutoHeight()
[
SAssignNew(CallStackTreeWidget, SCallStackTree)
.ItemHeight(25.0f)
.TreeItemsSource(CallStackSource)
.OnGenerateRow(SCallStackTree::FOnGenerateRow::CreateStatic(RowGenerator, SelfWeak))
.OnGetChildren(SCallStackTree::FOnGetChildren::CreateStatic(ChildrenAccessor))
.OnMouseButtonDoubleClick(SCallStackTree::FOnMouseButtonClick::CreateSP(SelfTyped, &SCallStackViewer::JumpToEntry))
.OnContextMenuOpening(FOnContextMenuOpening::CreateStatic(ContextMenuOpened, CommandListWeak, SelfWeak))
.IsEnabled(
TAttribute<bool>::Create(
TAttribute<bool>::FGetter::CreateStatic(CallStackViewIsEnabled, SelfWeak)
)
)
.HeaderRow
(
SNew(SHeaderRow)
+SHeaderRow::Column(TEXT("ProgramCounter"))
.DefaultLabel(FText::GetEmpty())
.FixedWidth(16.f)
+SHeaderRow::Column(TEXT("FunctionName"))
.FillWidth(.8f)
.DefaultLabel(LOCTEXT("FunctionName", "Function Name"))
+SHeaderRow::Column(TEXT("Language"))
.DefaultLabel(LOCTEXT("Language", "Language"))
.FillWidth(.15f)
)
]
+ SVerticalBox::Slot()
[
SNew(STextBlock)
.Text(
TAttribute<FText>::Create(
TAttribute<FText>::FGetter::CreateStatic(StaleCallStackWarning, SelfWeak)
)
)
.ColorAndOpacity(FLinearColor::Yellow)
.Justification(ETextJustify::Center)
]
]
+SOverlay::Slot()
.Padding(32.f)
[
SNew(STextBlock)
.Text(
LOCTEXT("NoCallStack", "No call stack to display - set a breakpoint and Play in Editor")
)
.Justification(ETextJustify::Center)
.Visibility(
TAttribute<EVisibility>::Create(
TAttribute<EVisibility>::FGetter::CreateStatic(EmptyWarningVisibility, SelfWeak)
)
)
]
]
];
ListSubscribers.AddSP(StaticCastSharedRef<SCallStackViewer>(AsShared()), &SCallStackViewer::UpdateCallStack);
}
void SCallStackViewer::UpdateCallStack(TArray<TSharedRef<FCallStackRow>>* ScriptStack)
{
CallStackTreeWidget->RequestTreeRefresh();
}
void SCallStackViewer::CopySelectedRows() const
{
FString StringToCopy;
// We want to copy in the order displayed, not the order selected, so iterate the list and build up the string:
if(CallStackSource)
{
for(const TSharedRef<FCallStackRow>& Item : *CallStackSource)
{
if(CallStackTreeWidget->IsItemSelected(Item))
{
StringToCopy.Append(Item->GetTextForEntry().ToString());
StringToCopy.Append(TEXT("\r\n"));
}
}
}
if( !StringToCopy.IsEmpty() )
{
FPlatformApplicationMisc::ClipboardCopy(*StringToCopy);
}
}
void SCallStackViewer::JumpToEntry(TSharedRef< FCallStackRow > Entry)
{
LastFrameNavigatedTo = Entry;
// Try to find a UClass* source:
UBlueprintGeneratedClass* BPGC = FindFirstObject<UBlueprintGeneratedClass>(*Entry->ScopeName.ToString(), EFindFirstObjectOptions::EnsureIfAmbiguous);
if(BPGC)
{
UFunction* Function = BPGC->FindFunctionByName(Entry->FunctionName);
if(Function)
{
UEdGraphNode* Node = FKismetDebugUtilities::FindSourceNodeForCodeLocation(Entry->ContextObject, Function, Entry->ScriptOffset, true);
if(Node)
{
FKismetEditorUtilities::BringKismetToFocusAttentionOnObject(Node);
}
else
{
FKismetEditorUtilities::BringKismetToFocusAttentionOnObject(Function);
}
}
else
{
FKismetEditorUtilities::BringKismetToFocusAttentionOnObject(BPGC);
}
}
}
void SCallStackViewer::JumpToSelectedEntry()
{
TSharedPtr<FCallStackRow> LastFrameClickedOnPinned = LastFrameClickedOn.Pin();
if(LastFrameClickedOnPinned.IsValid())
{
JumpToEntry(LastFrameClickedOnPinned.ToSharedRef());
}
else if(CallStackSource)
{
for(const TSharedRef<FCallStackRow>& Item : *CallStackSource)
{
if(CallStackTreeWidget->IsItemSelected(Item))
{
JumpToEntry(Item);
}
}
}
}
FReply SCallStackViewer::OnKeyDown( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent )
{
if (CommandList->ProcessCommandBindings(InKeyEvent))
{
return FReply::Handled();
}
return SCompoundWidget::OnKeyDown(MyGeometry, InKeyEvent);
}
// Proxy array of the call stack. This allows us to manually refresh UI state when changes are made:
TArray<TSharedRef<FCallStackRow>> Private_CallStackSource;
void CallStackViewer::UpdateDisplayedCallstack(TArrayView<const FFrame* const> ScriptStack)
{
Private_CallStackSource.Empty();
if (ScriptStack.Num() > 0)
{
for (int32 I = ScriptStack.Num() - 1; I >= 0; --I)
{
const FFrame* StackNode = ScriptStack[I];
bool bExactClass = false;
bool bAnyPackage = true;
UClass* SourceClass = Cast<UClass>(StackNode->Node->GetOuter());
// We're using GetClassNameWithoutSuffix so that we can display the BP name, which will
// be the most useful when debugging:
FText ScopeDisplayName = SourceClass ? FText::FromString(FBlueprintEditorUtils::GetClassNameWithoutSuffix(SourceClass)) : FText::FromName(StackNode->Node->GetOuter()->GetFName());
FText FunctionDisplayName = FText::FromName(StackNode->Node->GetFName());
if(SourceClass)
{
if(const UBlueprint* SourceBP = Cast<UBlueprint>(SourceClass->ClassGeneratedBy))
{
if( StackNode->Node->GetFName() == FBlueprintEditorUtils::GetUbergraphFunctionName(SourceBP))
{
FunctionDisplayName = LOCTEXT("EventGraphCallStackName", "Event Graph");
}
else
{
UEdGraphNode* Node = FKismetDebugUtilities::FindSourceNodeForCodeLocation(StackNode->Object, StackNode->Node, 0, true);
if(Node)
{
FunctionDisplayName = Node->GetNodeTitle(ENodeTitleType::ListView);
}
}
}
}
Private_CallStackSource.Add(
MakeShared<FCallStackRow>(
StackNode->Object,
StackNode->Node->GetOuter()->GetFName(),
StackNode->Node->GetFName(),
StackNode->Code - StackNode->Node->Script.GetData() - 1,
ECallstackLanguages::Blueprints,
ScopeDisplayName,
FunctionDisplayName
)
);
// If the next frame in the call stack does did not call this frame, insert a dummy entry informing
// the user that there was a native block:
if(StackNode->PreviousFrame == nullptr)
{
Private_CallStackSource.Add(
MakeShared<FCallStackRow>(
nullptr,
FName(),
FName(),
0,
ECallstackLanguages::NativeCPP,
LOCTEXT("NativeCodeLabel", "Native Code"),
FText()
)
);
}
}
}
// Notify subscribers:
ListSubscribers.Broadcast(&Private_CallStackSource);
}
FName CallStackViewer::GetTabName()
{
const FName TabName = TEXT("CallStackViewer");
return TabName;
}
void CallStackViewer::RegisterTabSpawner(FTabManager& TabManager)
{
const auto SpawnCallStackViewTab = []( const FSpawnTabArgs& Args )
{
static const FName ToolbarName = TEXT("Kismet.DebuggingViewToolBar");
FToolMenuContext MenuContext(FPlayWorldCommands::GlobalPlayWorldActions);
TSharedRef<SWidget> ToolbarWidget = UToolMenus::Get()->GenerateWidget(ToolbarName, MenuContext);
return SNew(SDockTab)
.TabRole( ETabRole::PanelTab )
.Label( LOCTEXT("TabTitle", "Call Stack") )
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
[
SNew(SBorder)
.BorderImage( FAppStyle::GetBrush( TEXT("NoBorder") ) )
[
ToolbarWidget
]
]
+ SVerticalBox::Slot()
.AutoHeight()
[
SNew(SBorder)
.BorderImage( FAppStyle::GetBrush("Docking.Tab.ContentAreaBrush") )
[
SNew(SCallStackViewer, &Private_CallStackSource)
]
]
];
};
TabManager.RegisterTabSpawner(CallStackViewer::GetTabName(), FOnSpawnTab::CreateStatic(SpawnCallStackViewTab) )
.SetDisplayName( LOCTEXT("TabTitle", "Call Stack") )
.SetTooltipText( LOCTEXT("TooltipText", "Open the Call Stack tab") );
}
#undef LOCTEXT_NAMESPACE