Files
UnrealEngineUWP/Engine/Source/Editor/DataTableEditor/Private/DataTableEditorModule.cpp
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

52 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "DataTableEditorModule.h"
#include "Modules/ModuleManager.h"
#include "IDataTableEditor.h"
#include "DataTableEditor.h"
#include "CompositeDataTableEditor.h"
#include "Engine/CompositeDataTable.h"
IMPLEMENT_MODULE( FDataTableEditorModule, DataTableEditor );
const FName FDataTableEditorModule::DataTableEditorAppIdentifier( TEXT( "DataTableEditorApp" ) );
void FDataTableEditorModule::StartupModule()
{
MenuExtensibilityManager = MakeShareable(new FExtensibilityManager);
ToolBarExtensibilityManager = MakeShareable(new FExtensibilityManager);
}
void FDataTableEditorModule::ShutdownModule()
{
MenuExtensibilityManager.Reset();
ToolBarExtensibilityManager.Reset();
}
TSharedRef<IDataTableEditor> FDataTableEditorModule::CreateDataTableEditor(const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, UDataTable* Table)
{
if (Cast<UCompositeDataTable>(Table) != nullptr)
{
return CreateCompositeDataTableEditor(Mode, InitToolkitHost, Table);
}
return CreateStandardDataTableEditor(Mode, InitToolkitHost, Table);
}
TSharedRef<IDataTableEditor> FDataTableEditorModule::CreateStandardDataTableEditor(const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, UDataTable* Table)
{
TSharedRef< FDataTableEditor > NewDataTableEditor( new FDataTableEditor() );
NewDataTableEditor->InitDataTableEditor( Mode, InitToolkitHost, Table );
return NewDataTableEditor;
}
TSharedRef<IDataTableEditor> FDataTableEditorModule::CreateCompositeDataTableEditor(const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, UDataTable* Table)
{
TSharedRef< FCompositeDataTableEditor > NewDataTableEditor(new FCompositeDataTableEditor());
NewDataTableEditor->InitDataTableEditor(Mode, InitToolkitHost, Table);
return NewDataTableEditor;
}