Files
UnrealEngineUWP/Engine/Source/Developer/ProjectLauncher/Private/ProjectLauncherModule.cpp

76 lines
2.6 KiB
C++
Raw Normal View History

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "ProjectLauncherPrivatePCH.h"
Window menu refactor & polish - Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes. - Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely. - Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category. - Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly. - Added & updated lots of icons! (those missing will be TTP'd) - The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability. - Unreal frontend options were also moved into a context menu within the General section - Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category - Undo history now under Edit menu [CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
#include "WorkspaceMenuStructureModule.h"
#include "SDockTab.h"
static const FName ProjectLauncherTabName("ProjectLauncher");
/**
* Implements the SessionSProjectLauncher module.
*/
class FProjectLauncherModule
: public IProjectLauncherModule
{
public:
// IModuleInterface interface
virtual void StartupModule( ) override
{
Window menu refactor & polish - Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes. - Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely. - Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category. - Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly. - Added & updated lots of icons! (those missing will be TTP'd) - The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability. - Unreal frontend options were also moved into a context menu within the General section - Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category - Undo history now under Edit menu [CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
#if WITH_EDITOR
FGlobalTabmanager::Get()->RegisterTabSpawner(ProjectLauncherTabName, FOnSpawnTab::CreateRaw(this, &FProjectLauncherModule::SpawnProjectLauncherTab));
#else
// This is still experimental in the editor, so it'll be invoked specifically in FMainMenu if the experimental settings flag is set.
//@todo Enable this in the editor when no longer experimental
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(ProjectLauncherTabName, FOnSpawnTab::CreateRaw(this, &FProjectLauncherModule::SpawnProjectLauncherTab))
.SetDisplayName(NSLOCTEXT("FProjectLauncherModule", "ProjectLauncherTabTitle", "Project Launcher"))
.SetTooltipText(NSLOCTEXT("FProjectLauncherModule", "ProjectLauncherTooltipText", "Open the Project Launcher tab."))
Window menu refactor & polish - Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes. - Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely. - Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category. - Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly. - Added & updated lots of icons! (those missing will be TTP'd) - The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability. - Unreal frontend options were also moved into a context menu within the General section - Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category - Undo history now under Edit menu [CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "Launcher.TabIcon"))
.SetGroup(WorkspaceMenu::GetMenuStructure().GetToolsCategory());
#endif
}
virtual void ShutdownModule( ) override
{
Window menu refactor & polish - Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes. - Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely. - Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category. - Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly. - Added & updated lots of icons! (those missing will be TTP'd) - The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability. - Unreal frontend options were also moved into a context menu within the General section - Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category - Undo history now under Edit menu [CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
#if WITH_EDITOR
FGlobalTabmanager::Get()->UnregisterTabSpawner(ProjectLauncherTabName);
Window menu refactor & polish - Window menu is now sectioned and labeled based on the current editor. There's now a local workspace root member in FTabManager and a workspace category in FAssetEditorToolkit (both are FWorkspaceItem objects). Individual editors attach their local category to the tab manager's local root. Workflow app modes have their own category members that are swapped out when the mode changes. - Finally, the AssetEditorCategory of FWorkspaceMenuStructure has been removed entirely. - Replaced the AddMenuSeparator() call in FTabManager::PopulateSpawnerMenu_Helper() with a section of the same title as the workspace category. - Tab spawner menu entries for the local editor now properly show the icon of the associated tab. To accomplish this it was necessary to change FWorkflowTabFactory::TabIcon to be an FSlateIcon instead of an FSlateBrush*. All factory instances have been updated accordingly. - Added & updated lots of icons! (those missing will be TTP'd) - The nomad tab spawner section (named "General" in the menu) has been largely compressed into the Developer Tools submenu, which has also been organized into sections for readability. - Unreal frontend options were also moved into a context menu within the General section - Moved all experimental tools to their own section of the Window menu. When they're no longer experimental they should register as nomads in the appropriate category - Undo history now under Edit menu [CL 2324285 by Dan Hertzka in Main branch]
2014-10-09 12:34:55 -04:00
#else
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(ProjectLauncherTabName);
#endif
}
private:
/**
* Creates a new session launcher tab.
*
* @param SpawnTabArgs The arguments for the tab to spawn.
* @return The spawned tab.
*/
TSharedRef<SDockTab> SpawnProjectLauncherTab(const FSpawnTabArgs& SpawnTabArgs)
{
const TSharedRef<SDockTab> DockTab = SNew(SDockTab)
.Icon(FEditorStyle::GetBrush("Launcher.TabIcon"))
.TabRole(ETabRole::NomadTab);
ILauncherServicesModule& ProjectLauncherServicesModule = FModuleManager::LoadModuleChecked<ILauncherServicesModule>("LauncherServices");
ITargetDeviceServicesModule& TargetDeviceServicesModule = FModuleManager::LoadModuleChecked<ITargetDeviceServicesModule>("TargetDeviceServices");
FProjectLauncherModelRef Model = MakeShareable(new FProjectLauncherModel(
TargetDeviceServicesModule.GetDeviceProxyManager(),
ProjectLauncherServicesModule.CreateLauncher(),
ProjectLauncherServicesModule.GetProfileManager()
));
DockTab->SetContent(SNew(SProjectLauncher, DockTab, SpawnTabArgs.GetOwnerWindow(), Model));
return DockTab;
}
};
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3125471) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3105904 on 2016/08/30 by Ben.Marsh PR #2691: Copy .map-file to staging & cleanup (Contributed by projectgheist) Change 3105974 on 2016/08/30 by Ben.Marsh PR #2748: [Bug-Fix] UGS - Ensure older events do not trample newer ones (Contributed by paulevans) Change 3106035 on 2016/08/30 by Ben.Marsh PR #2746: [Bug-Fix] UGS - Starting build colour was the same as disabled (Contributed by paulevans) Change 3106172 on 2016/08/30 by Ben.Marsh UAT: Do not default to submitting build products from BuildCookRun unless -submit is explicitly specified on the command line. #codreview Maciej.Mroz Change 3107642 on 2016/08/31 by Matthew.Griffin More Monolithic editor fixes Fixed IMPLEMENT_MODULE macros with incorrect module name Wrapped some usages of GIsHotReload in WITH_HOT_RELOAD Fixed NiagaraConstants so that they can be used in multiple modules Change 3107808 on 2016/08/31 by Matthew.Griffin Added Node to Compile UAT on Mac to catch any Mono failures which will run as part of monolithics aggregate Change 3111527 on 2016/09/02 by Matthew.Griffin Duplicating CL#3111524 from Release-4.13 stream Including Documentation/Extras in installed build Change 3117683 on 2016/09/08 by Ben.Marsh PR #2771: Fix compilation of C# projects on case-sensitive OSes (Contributed by slonopotamus) Change 3119707 on 2016/09/09 by Ben.Marsh UBT: Add more explicit methods for querying Visual C++ and Visual Studio installation directories. Now uses the same logic in the Visual Studio batch files. Change 3120824 on 2016/09/12 by Ben.Marsh UnrealGameSync: Add a project-wide option which can disable using the last code changelist for version files, and use the sync changelist instead. ("VersionToLastCodeChange" in the "[Options]" section). Update version to 1.80. Change 3120996 on 2016/09/12 by Ben.Marsh Core: Fix lines of output text from FMonitoredProcess being truncated at 512 characters, due to pipe buffer size. Accumulate incomplete lines and merge them together again instead. Also remove CR-LF pairs if they occur at the end of a line. #jira UE-35659 Change 3121353 on 2016/09/12 by Ben.Marsh Core: Manually enumerate and load dependent DLLs for modules by the editor, to work around limitations in the number of search paths checked by the Windows loader. We previously temporarily modified the PATH environment variable to provide this functionality, but are close to the OS limit for length of that string. This method should not have any such restrictions (though it will not work for circular dependencies). Change 3121996 on 2016/09/12 by Ben.Marsh Add support for Visual Studio 2017 (aka "15"; assuming consistent naming with other versions until final name is announced). * Compiler, STL implementation and CRT are binary compatible with VS2015 (see https://blogs.msdn.microsoft.com/vcblog/2016/08/24/c1417-features-and-stl-fixes-in-vs-15-preview-4/), so no new third-party libraries needed so far. WindowsPlatform.GetVisualStudioCompilerVersionName() returns "2015" as a result. * Default compiler for compiling and generating project files is still VS 2015 for now. Pass -2017 on the command line to GenerateProjectFiles.bat to generate VS2017 projects. Projects generated for VS2017 will use the 2017 compiler by default. * Visual Studio source code accessor can talk to VS 2017 instances. * Added a VS2017 configuration for UnrealVS, and added precompiled vsix package. * Switched GetVSComnTools to check the SOFTWARE\Microsoft\VisualStudio\SxS\VS7 registry key rather than the individual product install registry key. "15" doesn't seem to have it's own "InstallDir" key, but this system seems to work for all versions of Visual Studio (including previous releases of VS Express). * Removed ATL dependency from VisualStudioSourceCodeAccessor. It's not installed with VS by default any more, and is only used for a couple of smart pointer classes. Tested running the editor and packaging TP_Flying for Win64. Packaging from the editor still defaults to using the 2015 compiler, so ConfigureToolchain() needs to be overriden from the .target.cs file if multiple Visual Studio versions are installed. Change 3123144 on 2016/09/13 by Ben.Marsh BuildGraph: Fix exception due to mismatched argument lists. Change 3123160 on 2016/09/13 by Ben.Marsh Linux: Make PLATFORM_SUPPORTS_JEMALLOC a globally defined macro rather than just defined by the jemalloc module. Core supplies a default value for this macro which is inconsistent unless your module has an explicit dependency on jemalloc. Change 3123211 on 2016/09/13 by Ben.Marsh UBT: Fix exception writing a version manifest if the output directory does not exist. Change 3125300 on 2016/09/14 by Ben.Marsh UnrealVS: Few fixes to single-file compile command. * All documents are now saved before compile starts. * Now gives a useful error when trying to compile non-cpp files, rather than falling back to the invalid default command handler. * Trying to do a single-file compile while an existing build is running now prompts to stop it, rather than falling back to the default command handler (which gives a "Invalid command" message for makefile projects) Change 3125437 on 2016/09/14 by Ben.Marsh UnrealVS: Update version number to 1.43 in order to prevent installer from bailing unless existing version is uninstalled first. [CL 3126342 by Ben Marsh in Main branch]
2016-09-15 08:33:13 -04:00
IMPLEMENT_MODULE(FProjectLauncherModule, ProjectLauncher);