1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Refactor DocData into core and editor (DocTools) parts

This commit is contained in:
Thakee Nathees
2020-11-29 09:12:06 +05:30
parent d0e7d9b62f
commit 42bfa16996
30 changed files with 390 additions and 261 deletions

View File

@@ -799,11 +799,16 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
}
}
if (fc) {
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
if (lang->has_documentation() && fc->type == lang->get_type()) {
ResourceLoader::load(path);
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
if (lang->supports_documentation() && fi->type == lang->get_type()) {
Ref<Script> script = ResourceLoader::load(path);
if (script == nullptr) {
continue;
}
const Vector<DocData::ClassDoc> &docs = script->get_documentation();
for (int j = 0; j < docs.size(); j++) {
EditorHelp::get_doc_data()->add_doc(docs[j]);
}
}
}