Use type hints to improve completion

- Allow type hints to be completed.
- Use type information to infer completion candidates.
- Show typed function signature in tooltip.
- Add type hints when completing declaration from virtual functions
(optional).
This commit is contained in:
George Marques
2018-05-29 23:16:59 -03:00
parent 95351ac867
commit 75f395c2a0
3 changed files with 188 additions and 56 deletions

View File

@ -820,7 +820,9 @@ void ConnectionsDock::update_tree() {
if (i > 0)
signaldesc += ", ";
String tname = "var";
if (pi.type != Variant::NIL) {
if (pi.type == Variant::OBJECT && pi.class_name != StringName()) {
tname = pi.class_name.operator String();
} else if (pi.type != Variant::NIL) {
tname = Variant::get_type_name(pi.type);
}
signaldesc += tname + " " + (pi.name == "" ? String("arg " + itos(i)) : pi.name);