Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5330 in orxonox.OLD for trunk/src/lib/shell/shell_completion.cc


Ignore:
Timestamp:
Oct 8, 2005, 11:13:06 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: autocompletion now also works for Static Function-commandos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_completion.cc

    r5329 r5330  
    120120    classID = ClassList::StringToID(inputSplits.getString(0));
    121121    objectList = ClassList::getList(classID);
    122     if (classID == CL_NULL)
    123       return false;
    124     else
    125     {
    126       if (objectList != NULL && objectList->getSize() == 1)
    127         completeType |= SHELLC_FUNCTION;
     122    if (classID != CL_NULL)
    128123      completeType |= SHELLC_OBJECT;
    129     }
     124    //if (objectList != NULL && objectList->getSize() == 1)
     125      completeType |= SHELLC_FUNCTION;
    130126  }
    131127  else if ((inputSplits.getCount() == 2 && emptyComplete == true) ||
     
    144140    this->objectComplete(completeString, classID);
    145141  if (completeType & SHELLC_FUNCTION)
    146     this->functionComplete(completeString, classID);
     142    this->functionComplete(completeString, inputSplits.getString(0));
    147143  if (completeType & SHELLC_ALIAS)
    148144    this->aliasComplete(completeString);
     
    202198 * @param classID the class' ID to complete the function of
    203199 */
    204 bool ShellCompletion::functionComplete(const char* functionBegin, long classID)
     200bool ShellCompletion::functionComplete(const char* functionBegin, const char* className)
    205201{
    206202  if (unlikely(functionBegin == NULL))
    207203    return false;
    208204  tList<const char> fktList;
    209   ShellCommandClass::getCommandListOfClass(ClassList::IDToString(classID), &fktList);
     205  ShellCommandClass::getCommandListOfClass(className, &fktList);
    210206  //printf("%s\n", boList->firstElement()->getName());
    211207  if (!this->addToCompleteList(&fktList, functionBegin, SHELLC_FUNCTION))
Note: See TracChangeset for help on using the changeset viewer.