- Timestamp:
- Oct 4, 2015, 9:12:21 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.cc
r9667 r10624 44 44 #include "CommandExecutor.h" 45 45 #include "ConsoleCommand.h" 46 #include "ConsoleCommandManager.h" 46 47 #include "TclThreadManager.h" 47 48 … … 98 99 99 100 // get all the groups that are visible (except the shortcut group "") 100 const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommand ::getCommands();101 const std::map<std::string, std::map<std::string, ConsoleCommand*> >& commands = ConsoleCommandManager::getInstance().getCommands(); 101 102 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group) 102 103 if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0)) … … 137 138 138 139 // find the iterator of the given group 139 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand ::getCommands().begin();140 for ( ; it_group != ConsoleCommand ::getCommands().end(); ++it_group)140 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().begin(); 141 for ( ; it_group != ConsoleCommandManager::getInstance().getCommands().end(); ++it_group) 141 142 if (getLowercase(it_group->first) == groupLC) 142 143 break; 143 144 144 145 // add all commands in the group to the list 145 if (it_group != ConsoleCommand ::getCommands().end())146 if (it_group != ConsoleCommandManager::getInstance().getCommands().end()) 146 147 { 147 148 for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command) … … 206 207 return detail::_groupsandcommands(fragment, true); 207 208 208 if (ConsoleCommand ::getCommandLC(getLowercase(tokens[0])))209 if (ConsoleCommandManager::getInstance().getCommandLC(getLowercase(tokens[0]))) 209 210 return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment); 210 211 211 212 if (tokens.size() == 1) 212 213 { 213 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand ::getCommands().find(tokens[0]);214 if (it_group != ConsoleCommand ::getCommands().end())214 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().find(tokens[0]); 215 if (it_group != ConsoleCommandManager::getInstance().getCommands().end()) 215 216 return detail::_subcommands(fragment, tokens[0], true); 216 217 else … … 218 219 } 219 220 220 if (ConsoleCommand ::getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1])))221 if (ConsoleCommandManager::getInstance().getCommandLC(getLowercase(tokens[0]), getLowercase(tokens[1]))) 221 222 return ARGUMENT_COMPLETION_FUNCTION_CALL(command)(fragment); 222 223
Note: See TracChangeset
for help on using the changeset viewer.