Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6166


Ignore:
Timestamp:
Nov 26, 2009, 6:49:35 PM (14 years ago)
Author:
rgrieder
Message:

Fixed auto completion:

  • When completing for instance "KeyBin", it was extended to "keybinder" instead of "KeyBinder" ("KeyBinderManager" has the same casing)
  • "keybinder " didn't show the config values for the KeyBinder (occurred often because of the issue above)
Location:
code/branches/presentation2/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc

    r5929 r6166  
    101101
    102102            for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin(); it != Identifier::getStringIdentifierMapEnd(); ++it)
    103                 if ((*it).second->hasConfigValues())
    104                     classlist.push_back(ArgumentCompletionListElement((*it).second->getName(), getLowercase((*it).first)));
     103                if (it->second->hasConfigValues())
     104                    classlist.push_back(ArgumentCompletionListElement(it->first, getLowercase(it->first)));
    105105
    106106            return classlist;
     
    110110        {
    111111            ArgumentCompletionList configvalues;
    112             std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getStringIdentifierMap().find(classname);
     112            std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
    113113
    114             if (identifier != Identifier::getStringIdentifierMapEnd() && (*identifier).second->hasConfigValues())
     114            if (identifier != Identifier::getLowercaseStringIdentifierMapEnd() && identifier->second->hasConfigValues())
    115115            {
    116                 for (std::map<std::string, ConfigValueContainer*>::const_iterator it = (*identifier).second->getConfigValueMapBegin(); it != (*identifier).second->getConfigValueMapEnd(); ++it)
    117                     configvalues.push_back(ArgumentCompletionListElement((*it).second->getName(), getLowercase((*it).first)));
     116                for (std::map<std::string, ConfigValueContainer*>::const_iterator it = identifier->second->getConfigValueMapBegin(); it != identifier->second->getConfigValueMapEnd(); ++it)
     117                    configvalues.push_back(ArgumentCompletionListElement(it->first, getLowercase(it->first)));
    118118            }
    119119
     
    127127            if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    128128            {
    129                 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
    130                 if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
     129                std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
     130                if (variable != identifier->second->getLowercaseConfigValueMapEnd())
    131131                {
    132                     std::string valuestring = (*variable).second->toString();
     132                    std::string valuestring = variable->second->toString();
    133133                    oldvalue.push_back(ArgumentCompletionListElement(valuestring, getLowercase(valuestring), "Old value: " + valuestring));
    134134                }
  • code/branches/presentation2/src/libraries/core/CommandExecutor.cc

    r5929 r6166  
    637637            for (unsigned int i = 0; true; i++)
    638638            {
     639                char tempComparable = 0;
    639640                char temp = 0;
    640641                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
    641642                {
    642                     std::string argument = (*it).getComparable();
     643                    std::string argumentComparable = (*it).getComparable();
     644                    std::string argument = (*it).getString();
    643645                    if (argument.size() > i)
    644646                    {
    645647                        if (it == list.begin())
    646648                        {
     649                            tempComparable = argumentComparable[i];
    647650                            temp = argument[i];
    648651                        }
    649652                        else
    650653                        {
    651                             if (temp != argument[i])
     654                            if (tempComparable != argumentComparable[i])
    652655                                return output;
     656                            else if (temp != argument[i])
     657                                temp = tempComparable;
    653658                        }
    654659                    }
Note: See TracChangeset for help on using the changeset viewer.