Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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)
File:
1 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                }
Note: See TracChangeset for help on using the changeset viewer.