MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / load_script_doc_cache

Method load_script_doc_cache

editor/doc/editor_help.cpp:3111–3136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3109}
3110
3111void EditorHelp::load_script_doc_cache() {
3112 if (!ProjectSettings::get_singleton()->is_project_loaded()) {
3113 print_verbose("Skipping loading script doc cache since no project is open.");
3114 return;
3115 }
3116
3117 if (EditorNode::is_cmdline_mode()) {
3118 return;
3119 }
3120
3121 _wait_for_thread();
3122
3123 if (!ResourceLoader::exists(get_script_doc_cache_full_path())) {
3124 print_verbose("Script documentation cache not found. Regenerating it may take a while for projects with many scripts.");
3125 regenerate_script_doc_cache();
3126 return;
3127 }
3128
3129 if (EditorFileSystem::get_singleton()->is_scanning()) {
3130 // This is assuming EditorFileSystem is performing first scan. We must wait until it is done.
3131 EditorFileSystem::get_singleton()->connect(SNAME("sources_changed"), callable_mp_static(_load_script_doc_cache), CONNECT_ONE_SHOT);
3132 return;
3133 }
3134
3135 worker_thread.start(_load_script_doc_cache_thread, nullptr);
3136}
3137
3138void EditorHelp::_process_postponed_docs() {
3139 for (const String &class_name : _docs_to_remove) {

Callers

nothing calls this directly

Calls 4

is_project_loadedMethod · 0.80
is_scanningMethod · 0.80
connectMethod · 0.65
startMethod · 0.45

Tested by

no test coverage detected