You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Added yield() signal smart autocompletion.
This commit is contained in:
@@ -2389,7 +2389,24 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case GDParser::COMPLETION_YIELD: {
|
||||
|
||||
const GDParser::Node *node = p.get_completion_node();
|
||||
|
||||
GDCompletionIdentifier t;
|
||||
if (!_guess_expression_type(context,node,p.get_completion_line(),t))
|
||||
break;
|
||||
|
||||
if (t.type==Variant::OBJECT && t.obj_type!=StringName()) {
|
||||
|
||||
List<MethodInfo> sigs;
|
||||
ObjectTypeDB::get_signal_list(t.obj_type,&sigs);
|
||||
for (List<MethodInfo>::Element *E=sigs.front();E;E=E->next()) {
|
||||
options.insert("\""+E->get().name+"\"");
|
||||
}
|
||||
}
|
||||
|
||||
} break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user