Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Public/GraphEditorActions.h
Ben Cosh 71e37b5d75 #TTP 299847 - ROCKET: BIG: K2: USABILITY: Ability to go to C++ code for native functions/variables in BP editor
#Branch UE4
#Proj  BlueprintGraph, GraphEditor, Kismet, UnrealEd

#Summary Added code to navigate the users IDE to native functions and variables. Added options in the graph and myblueprint node context menus to navigate to the native code they represent.

#Add Added function FSourceCodeNavigation::NavigateToProperty to locate and open the header file where the variable is defined.
#Add Added function FSourceCodeNavigation::NavigateToFunction to locate the source code from the symbolmap and open the IDE at the definition location.
#Change Moved the code used to determine the correct modulename from FSourceCodeNavigation::GatherFunctionsForActors to FSourceCodeNavigation::FindClassModuleName so other functions didn't have to replicate the code.
#Change added Goto Code Definition for native variable nodes and native call_function nodes in the blueprint graph node context menu.
#Change added Goto Code Definition for native variables in the myblueprint node context menu.
#Add Added GotoNativeFunctionDefinition, IsSelectionNativeFunction, GotoNativeVariableDefinition and IsSelectionNativeVariable to FBlueprintEditor so the context menu actions can call these functions to goto source code.

ReviewedBy Chris.Wood

[CL 2044026 by Ben Cosh in Main branch]
2014-04-23 18:24:27 -04:00

112 lines
3.3 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Slate.h"
class FGraphEditorCommandsImpl : public TCommands<FGraphEditorCommandsImpl>
{
public:
FGraphEditorCommandsImpl()
: TCommands<FGraphEditorCommandsImpl>( TEXT("GraphEditor"), NSLOCTEXT("Contexts", "GraphEditor", "Graph Editor"), NAME_None, FEditorStyle::GetStyleSetName() )
{
}
virtual ~FGraphEditorCommandsImpl()
{
}
GRAPHEDITOR_API virtual void RegisterCommands() OVERRIDE;
TSharedPtr< FUICommandInfo > ReconstructNodes;
TSharedPtr< FUICommandInfo > BreakNodeLinks;
// Execution sequence specific commands
TSharedPtr< FUICommandInfo > AddExecutionPin;
TSharedPtr< FUICommandInfo > RemoveExecutionPin;
// Select node specific commands
TSharedPtr< FUICommandInfo > AddOptionPin;
TSharedPtr< FUICommandInfo > RemoveOptionPin;
TSharedPtr< FUICommandInfo > ChangePinType;
// Pin visibility modes
TSharedPtr< FUICommandInfo > ShowAllPins;
TSharedPtr< FUICommandInfo > HideNoConnectionPins;
TSharedPtr< FUICommandInfo > HideNoConnectionNoDefaultPins;
// Event / Function Entry commands
TSharedPtr< FUICommandInfo > AddParentNode;
// Debugging commands
TSharedPtr< FUICommandInfo > RemoveBreakpoint;
TSharedPtr< FUICommandInfo > AddBreakpoint;
TSharedPtr< FUICommandInfo > EnableBreakpoint;
TSharedPtr< FUICommandInfo > DisableBreakpoint;
TSharedPtr< FUICommandInfo > ToggleBreakpoint;
// Encapsulation commands
TSharedPtr< FUICommandInfo > CollapseNodes;
TSharedPtr< FUICommandInfo > PromoteSelectionToFunction;
TSharedPtr< FUICommandInfo > PromoteSelectionToMacro;
TSharedPtr< FUICommandInfo > ExpandNodes;
TSharedPtr< FUICommandInfo > CollapseSelectionToFunction;
TSharedPtr< FUICommandInfo > CollapseSelectionToMacro;
//
TSharedPtr< FUICommandInfo > SelectReferenceInLevel;
TSharedPtr< FUICommandInfo > AssignReferencedActor;
// Find variable references
TSharedPtr< FUICommandInfo > FindVariableReferences;
// Goto native code actions
TSharedPtr< FUICommandInfo > GotoNativeFunctionDefinition;
TSharedPtr< FUICommandInfo > GotoNativeVariableDefinition;
// Pin-specific actions
TSharedPtr< FUICommandInfo > BreakPinLinks;
TSharedPtr< FUICommandInfo > PromoteToVariable;
TSharedPtr< FUICommandInfo > StartWatchingPin;
TSharedPtr< FUICommandInfo > StopWatchingPin;
// SkeletalControl specific commands
TSharedPtr< FUICommandInfo > SelectBone;
// Blend list options
TSharedPtr< FUICommandInfo > AddBlendListPin;
TSharedPtr< FUICommandInfo > RemoveBlendListPin;
// options for sequence/evaluator converter
TSharedPtr< FUICommandInfo > ConvertToSeqEvaluator;
TSharedPtr< FUICommandInfo > ConvertToSeqPlayer;
// options for blendspace sequence/evaluator converter
TSharedPtr< FUICommandInfo > ConvertToBSEvaluator;
TSharedPtr< FUICommandInfo > ConvertToBSPlayer;
// option for opening the asset related to the graph node
TSharedPtr< FUICommandInfo > OpenRelatedAsset;
//open function editor
TSharedPtr< FUICommandInfo > EditTunnel;
//create a comment node
TSharedPtr< FUICommandInfo > CreateComment;
// Find instances of a Custom event node
TSharedPtr< FUICommandInfo > FindInstancesOfCustomEvent;
};
class GRAPHEDITOR_API FGraphEditorCommands
{
public:
static void Register();
static const FGraphEditorCommandsImpl& Get();
static void Unregister();
};