| 902 | } |
| 903 | |
| 904 | static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_list, const StringName &p_required_type = StringName()) { |
| 905 | const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\""; |
| 906 | const bool requires_type = !p_required_type.is_empty(); |
| 907 | |
| 908 | for (int i = 0; i < p_dir->get_file_count(); i++) { |
| 909 | if (requires_type && !ClassDB::is_parent_class(p_dir->get_file_type(i), p_required_type)) { |
| 910 | continue; |
| 911 | } |
| 912 | ScriptLanguage::CodeCompletionOption option(p_dir->get_file_path(i).quote(quote_style), ScriptLanguage::CODE_COMPLETION_KIND_FILE_PATH); |
| 913 | r_list.insert(option.display, option); |
| 914 | } |
| 915 | |
| 916 | for (int i = 0; i < p_dir->get_subdir_count(); i++) { |
| 917 | _get_directory_contents(p_dir->get_subdir(i), r_list, p_required_type); |
| 918 | } |
| 919 | } |
| 920 | |
| 921 | static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) { |
| 922 | ERR_FAIL_NULL(p_annotation); |
no test coverage detected