| 3109 | } |
| 3110 | |
| 3111 | void 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 | |
| 3138 | void EditorHelp::_process_postponed_docs() { |
| 3139 | for (const String &class_name : _docs_to_remove) { |
nothing calls this directly
no test coverage detected