Files
UnrealEngineUWP/Engine/Source/Developer/SourceCodeAccess/Public/ISourceCodeAccessModule.h
Jamie Dale a3928adc10 Fixed VS_OPEN logspam caused by a deferred command being constantly requested until VS had finished opening
TTP# 331398 - EDITOR: Logspam when opening Visual Studio

Deferring a VS file open request used to use a deferred command to wait until VS had finished opening before opening the requested files, however, this command was essentially simulating a Tick, as if the command was not yet ready to be processed it was simply deferred again, leading to spammed output.

Rather than do this, I've added a Tick function which will attempt to open the entire list of pending files as a single call, rather than try each file individually like the command would.

ReviewedBy Thomas.Sarkanen, Chris.Wood, Max.Preussner

[CL 2058815 by Jamie Dale in Main branch]
2014-04-29 11:36:21 -04:00

54 lines
1.7 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ISourceCodeAccessor.h"
/** 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;
/**
* 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;
};