Add auto-completion suggestions for built-in attributes

refs #8776
This commit is contained in:
Gunnar Beutner 2015-03-18 08:19:36 +01:00
parent a2b701ad44
commit fec1266b1b
1 changed files with 7 additions and 0 deletions

View File

@ -144,6 +144,13 @@ static char *ConsoleCompleteHelper(const char *word, int state)
}
Type::Ptr type = value.GetReflectionType();
for (int i = 0; i < type->GetFieldCount(); i++) {
Field field = type->GetFieldInfo(i);
AddSuggestion(matches, word, pword + "." + field.Name);
}
Object::Ptr prototype = type->GetPrototype();
Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(prototype);