Files
UnrealEngineUWP/Engine/Source/Developer/SourceCodeAccess/Public/ISourceCodeAccessModule.h
ben marsh de43fd704b Various fixes for using a non-default source code accessor in the editor.
* Fix incorrect path for tutorial dialog explaining how to install Visual Studio
* Tell the user that they need to restart when changing their source code accessor.
* On Windows, always check for the presence of Visual Studio 2017 or 2019 when determining whether the user can compile. This is distinct from whether the user has the chosen IDE available.

#rb none
#jira UE-69253

#ROBOMERGE-SOURCE: CL 4951506 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 4951508 by ben marsh in Main branch]
2019-02-08 15:46:29 -05:00

64 lines
1.9 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleInterface.h"
class ISourceCodeAccessor;
/** Event fired when launching code accessor */
DECLARE_MULTICAST_DELEGATE( FLaunchingCodeAccessor );
/**
* Event fired when done launching code accessor
* @param bSuccess Whether the launch was successful or not
*/
DECLARE_MULTICAST_DELEGATE_OneParam( FDoneLaunchingCodeAccessor, const bool /*bSuccess*/);
/**
* Event fired when opening a file has failed
* @param InFilename The filename that failed to open
*/
DECLARE_MULTICAST_DELEGATE_OneParam( FOpenFileFailed, const FString& /*InFilename*/);
/**
* Module used to access source code
*/
class ISourceCodeAccessModule : public IModuleInterface
{
public:
/**
* Check to see if source code can be accessed.
* @return true if source code can be accessed.
*/
virtual bool CanAccessSourceCode() const = 0;
/**
* Checks if a compiler is available
* @return true if source code can be compiled.
*/
virtual bool CanCompileSourceCode() const = 0;
/**
* Get the accessor to allow us to view source code
* @return the accessor.
*/
virtual ISourceCodeAccessor& GetAccessor() const = 0;
/**
* Set the accessor we want to use to view source code
* @param InName The name of the accessor we want to use
*/
virtual void SetAccessor(const FName& InName) = 0;
/** Gets the Event that is broad casted when attempting to launch visual studio */
virtual FLaunchingCodeAccessor& OnLaunchingCodeAccessor() = 0;
/** Gets the Event that is broadcasted when an attempted launch of this code accessor was successful or failed */
virtual FDoneLaunchingCodeAccessor& OnDoneLaunchingCodeAccessor() = 0;
/** Gets the Event that is broadcast when an attempt to load a file through Visual Studio failed */
virtual FOpenFileFailed& OnOpenFileFailed() = 0;
};