Files
UnrealEngineUWP/Engine/Source/Developer/SourceCodeAccess/Public/ISourceCodeAccessModule.h
Thomas Sarkanen 2e3d1f5aae #summary Source code access is now done via plugins
#ttp 330039 	EDITOR: Platform-agnostic editor code depends on Windows-only VSAccessor headers
#detail 	Source code access is now extensible via plugins, so any new editors can be easily added.
#add 	Added SourceCodeAccess module that routes access via plugins.
#change 	Moved much of the old VSAccessor code into a new VisualStudioSourceCodeAccess plugin.
#add 	Added a counterpart XCode plugin & migrated the code from FSourceCodeNavigation (Applescript etc.) into there.
#remove 	Removed applescript for XCode access (it is now done via code).
#remove 	Removed source code access functionality from platform layer.
#add 	Added details customization for source code access settings, so users can choose their own accessor.
#remove 	Removed dependencies on VSAccessor.
#change 	Changed API in SWidget to not require building a string to be parsed, instead this acesses and forwards filenames & line numbers.
#extra 	Tested on Mac by Mark S.
reviewed by 	Andrew.Brown

[CL 2048697 by Thomas Sarkanen in Main branch]
2014-04-23 19:19:51 -04:00

63 lines
2.0 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 launching code accessor deferred
* @param InFilename The command being deferred
*/
DECLARE_MULTICAST_DELEGATE_OneParam( FLaunchCodeAccessorDeferred, const FString& /*InFilename*/);
/**
* 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 a delegate to be invoked when the the open command needs to be deferred */
virtual FLaunchCodeAccessorDeferred& OnLaunchCodeAccessorDeferred() = 0;
/** Gets the Event that is broadcast when an attempt to load a file through Visual Studio failed */
virtual FOpenFileFailed& OnOpenFileFailed() = 0;
};