Merge pull request #116014 from cdemirer/create-editor-help-highlighter-in-project-manager

Create EditorHelpHighlighter in Project Manager
This commit is contained in:
Thaddeus Crews 2026-02-25 09:27:46 -06:00
commit f5a4757763
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -39,6 +39,7 @@
#include "core/os/os.h"
#include "core/version.h"
#include "editor/asset_library/asset_library_editor_plugin.h"
#include "editor/doc/editor_help.h"
#include "editor/editor_string_names.h"
#include "editor/gui/editor_about.h"
#include "editor/gui/editor_file_dialog.h"
@ -76,6 +77,8 @@
#include "servers/physics_3d/physics_server_3d.h"
#endif // PHYSICS_3D_DISABLED
#include "modules/modules_enabled.gen.h" // For gdscript, mono. (For editor help highlighter).
constexpr int GODOT4_CONFIG_VERSION = 5;
ProjectManager *ProjectManager::singleton = nullptr;
@ -1384,6 +1387,10 @@ ProjectManager::ProjectManager() {
OS::get_singleton()->set_low_processor_usage_mode(true);
}
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
EditorHelpHighlighter::create_singleton();
#endif
SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
// Initialize UI.
@ -1971,6 +1978,11 @@ ProjectManager::ProjectManager() {
ProjectManager::~ProjectManager() {
singleton = nullptr;
EditorInspector::cleanup_plugins();
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
EditorHelpHighlighter::free_singleton();
#endif
if (EditorSettings::get_singleton()) {
EditorSettings::destroy();
}