From fec1266b1b0857f44e885e2c1cd9ab902e1828d6 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 18 Mar 2015 08:19:36 +0100 Subject: [PATCH] Add auto-completion suggestions for built-in attributes refs #8776 --- lib/cli/consolecommand.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index a8d509e7c..0e31f897d 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -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(prototype); -- 2.40.0