MCPcopy Create free account
hub / github.com/MrDrElliot/LuminaEngine / OpenScriptInExternalEditor

Method OpenScriptInExternalEditor

Engine/Editor/Source/UI/EditorUI.cpp:1019–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1017 {
1018 FEditorTool* Tool = ToolsPendingDestroy.Peek();
1019 ToolsPendingDestroy.Pop();
1020
1021 // Deleting an asset queues its tool and the lost-asset check can queue it again the same frame.
1022 if (Algo::Find(EditorTools, Tool) == EditorTools.end())
1023 {
1024 continue;
1025 }
1026
1027 DestroyTool(UpdateContext, Tool);
1028 }
1029
1030 AddPendingTools();
1031
1032 DrawFooterDrawer(UpdateContext);
1033
1034 ModalManager.DrawDialogue();
1035
1036 // FEditorModalManager rejects CreateDialogue while a modal is active, so chains defer a frame.
1037 if (PendingDialogAction && !ModalManager.HasModal())
1038 {
1039 TFunction<void()> Action = std::move(PendingDialogAction);
1040 PendingDialogAction = nullptr;
1041 Action();
1042 }
1043
1044 // A standalone launch waiting on its build finishes here, on the thread that may spawn it.
1045 StandaloneLauncher.Tick();
1046
1047 // The registry has to be populated before a GUID resolves, and focus wants a live ImGui frame.
1048 if (bSessionRestorePending)
1049 {
1050 bSessionRestorePending = false;
1051 RestoreSessionTabs();
1052 }
1053
1054 // Save All is global, unlike Ctrl+S, so handling it per-tool would fire it once per open tool.
1055 if (ImGui::GetIO().KeyCtrl && ImGui::GetIO().KeyShift && ImGui::IsKeyPressed(ImGuiKey_S, false))
1056 {
1057 SaveAllDirtyPackages();
1058 }
1059
1060 // Gated on no active text input so it cannot fire out of a rename field or a search box.
1061 // The code workspace takes Ctrl+P for its own quick open while it has focus.
1062 const bool bCodeFocused = LastActiveTool != nullptr && LastActiveTool->GetUniqueTypeID() == FCodeWorkspaceTool::s_toolTypeID;
1063 if (ImGui::GetIO().KeyCtrl && !ImGui::GetIO().KeyShift && !ImGui::GetIO().WantTextInput && !bCodeFocused
1064 && ImGui::IsKeyPressed(ImGuiKey_P, false))
1065 {
1066 OpenAssetSearchModal();
1067 }
1068
1069 // Rebindable in Editor Settings, and the code workspace runs its own reload binding while it has focus.
1070 if (!bCodeFocused && ImGuiX::IsShortcutPressed(GetDefault<CEditorSettings>()->ReloadScriptsHotkey, 0, ImGuiInputFlags_RouteGlobal))
1071 {
1072 DotNet::RequestScriptReload();
1073 }

Callers

nothing calls this directly

Calls 13

FindDevEnvFunction · 0.85
FindVSCodeFunction · 0.85
FindRiderFunction · 0.85
ToWideStringFunction · 0.85
LaunchProcessFunction · 0.85
LaunchURLFunction · 0.85
replaceFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected