mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 03:34:17 +00:00
Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
This commit is contained in:
parent
20edf69f96
commit
be7a353c70
6 changed files with 64 additions and 3 deletions
|
|
@ -1425,6 +1425,7 @@ static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_contex
|
|||
// Variable used in the same expression
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_guess_expression_type(p_context, m.expression, r_type)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3485,6 +3486,17 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
|
|||
return OK;
|
||||
}
|
||||
} break;
|
||||
case GDScriptParser::COMPLETION_TYPE_HINT: {
|
||||
|
||||
GDScriptParser::DataType base_type = context._class->base_type;
|
||||
base_type.has_type = true;
|
||||
base_type.kind = GDScriptParser::DataType::CLASS;
|
||||
base_type.class_type = const_cast<GDScriptParser::ClassNode *>(context._class);
|
||||
|
||||
if (_lookup_symbol_from_base(base_type, p_symbol, false, r_result) == OK) {
|
||||
return OK;
|
||||
}
|
||||
} break;
|
||||
default: {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue