|
@@ -955,13 +955,13 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a
|
|
|
r_result.insert(option.display, option);
|
|
|
}
|
|
|
|
|
|
- List<StringName> global_script_classes;
|
|
|
- ScriptServer::get_global_class_list(&global_script_classes);
|
|
|
- for (const StringName &E : global_script_classes) {
|
|
|
- if (!ClassDB::is_parent_class(ScriptServer::get_global_class_native_base(E), "Node")) {
|
|
|
+ LocalVector<StringName> global_script_classes;
|
|
|
+ ScriptServer::get_global_class_list(global_script_classes);
|
|
|
+ for (const StringName &class_name : global_script_classes) {
|
|
|
+ if (!ClassDB::is_parent_class(ScriptServer::get_global_class_native_base(class_name), "Node")) {
|
|
|
continue;
|
|
|
}
|
|
|
- ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
|
|
|
+ ScriptLanguage::CodeCompletionOption option(class_name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
|
|
|
option.insert_text = option.display.quote(p_quote_style);
|
|
|
r_result.insert(option.display, option);
|
|
|
}
|
|
@@ -1049,11 +1049,11 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio
|
|
|
// Built-in Variant Types
|
|
|
_find_built_in_variants(r_result, true);
|
|
|
|
|
|
- List<StringName> native_types;
|
|
|
- ClassDB::get_class_list(&native_types);
|
|
|
- for (const StringName &E : native_types) {
|
|
|
- if (ClassDB::is_class_exposed(E) && !Engine::get_singleton()->has_singleton(E)) {
|
|
|
- ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
|
|
|
+ LocalVector<StringName> native_types;
|
|
|
+ ClassDB::get_class_list(native_types);
|
|
|
+ for (const StringName &type : native_types) {
|
|
|
+ if (ClassDB::is_class_exposed(type) && !Engine::get_singleton()->has_singleton(type)) {
|
|
|
+ ScriptLanguage::CodeCompletionOption option(type, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
|
|
|
r_result.insert(option.display, option);
|
|
|
}
|
|
|
}
|
|
@@ -1103,10 +1103,10 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio
|
|
|
}
|
|
|
|
|
|
// Global scripts
|
|
|
- List<StringName> global_classes;
|
|
|
- ScriptServer::get_global_class_list(&global_classes);
|
|
|
- for (const StringName &E : global_classes) {
|
|
|
- ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
|
|
|
+ LocalVector<StringName> global_classes;
|
|
|
+ ScriptServer::get_global_class_list(global_classes);
|
|
|
+ for (const StringName &class_name : global_classes) {
|
|
|
+ ScriptLanguage::CodeCompletionOption option(class_name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
|
|
|
r_result.insert(option.display, option);
|
|
|
}
|
|
|
|
|
@@ -1626,10 +1626,10 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
|
|
|
_find_global_enums(r_result);
|
|
|
|
|
|
// Global classes
|
|
|
- List<StringName> global_classes;
|
|
|
- ScriptServer::get_global_class_list(&global_classes);
|
|
|
- for (const StringName &E : global_classes) {
|
|
|
- ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
|
|
|
+ LocalVector<StringName> global_classes;
|
|
|
+ ScriptServer::get_global_class_list(global_classes);
|
|
|
+ for (const StringName &class_name : global_classes) {
|
|
|
+ ScriptLanguage::CodeCompletionOption option(class_name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
|
|
|
r_result.insert(option.display, option);
|
|
|
}
|
|
|
}
|