mirror of
https://github.com/godotengine/godot.git
synced 2026-04-19 18:31:25 +00:00
Implement declaration and lambda function tooltips.
This commit is contained in:
parent
65e73b3a5e
commit
0c3bfae3ef
4 changed files with 27 additions and 1 deletions
|
|
@ -3465,6 +3465,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
|
|||
|
||||
switch (completion_context.type) {
|
||||
case GDScriptParser::COMPLETION_NONE:
|
||||
case GDScriptParser::COMPLETION_DECLARATION:
|
||||
break;
|
||||
case GDScriptParser::COMPLETION_ANNOTATION: {
|
||||
List<MethodInfo> annotations;
|
||||
|
|
@ -4412,6 +4413,8 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
|
|||
case GDScriptParser::COMPLETION_METHOD:
|
||||
case GDScriptParser::COMPLETION_ASSIGN:
|
||||
case GDScriptParser::COMPLETION_CALL_ARGUMENTS:
|
||||
case GDScriptParser::COMPLETION_DECLARATION:
|
||||
case GDScriptParser::COMPLETION_INHERIT_TYPE:
|
||||
case GDScriptParser::COMPLETION_IDENTIFIER:
|
||||
case GDScriptParser::COMPLETION_PROPERTY_METHOD:
|
||||
case GDScriptParser::COMPLETION_SUBSCRIPT: {
|
||||
|
|
@ -4604,8 +4607,14 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
|
|||
}
|
||||
} break;
|
||||
case GDScriptParser::COMPLETION_OVERRIDE_METHOD: {
|
||||
// This logic applies to any method declaration (override or not),
|
||||
// but shows parent documentation on virtual method overrides.
|
||||
GDScriptParser::DataType base_type = context.current_class->base_type;
|
||||
if (_lookup_symbol_from_base(base_type, p_symbol, r_result) == OK) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
base_type = context.current_class->get_datatype();
|
||||
if (_lookup_symbol_from_base(base_type, p_symbol, r_result) == OK) {
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue