Documentation generation for GDScript

- ClassDoc added to GDScript and property reflection data were extracted
from parse tree

- GDScript comments are collected from tokenizer for documentation and
applied to the ClassDoc by the GDScript compiler

- private docs were excluded (name with underscore prefix and doesn't
have any doc comments)

- default values (of non exported vars), arguments are extraced from the
parser

- Integrated with GDScript 2.0 and new enums were added.

- merge conflicts fixed
This commit is contained in:
Thakee Nathees 2020-11-29 08:07:57 +05:30
parent ef2d1f6d19
commit d0e7d9b62f
21 changed files with 1036 additions and 76 deletions

View file

@ -2900,6 +2900,18 @@ void ScriptEditor::_help_class_goto(const String &p_desc) {
_save_layout();
}
void ScriptEditor::update_doc(const String &p_name) {
ERR_FAIL_COND(!EditorHelp::get_doc_data()->has_doc(p_name));
for (int i = 0; i < tab_container->get_child_count(); i++) {
EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh && eh->get_class() == p_name) {
eh->update_doc();
return;
}
}
}
void ScriptEditor::_update_selected_editor_menu() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
bool current = tab_container->get_current_tab() == i;