Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 28, 2006, 12:03:54 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Another CompletionMode is working

File:
1 edited

Legend:

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

    r7409 r7412  
    114114      if (sc != NULL)
    115115      {
    116         std::vector<std::string> test;
    117         sc->getCompletorPlugin(0)->addToCompleteList(test, inputSplits[inputSplits.size()-1]);
     116        std::vector<std::string> completed;
     117        sc->getCompletorPlugin(0)->addToCompleteList(completed, inputSplits[inputSplits.size()-1]);
     118        for (unsigned int i = 0; i < completed.size(); i++)
     119          this->completionList.push_back(CompletionElement(completed[i], ParamCompletion));
    118120      }
    119121    }
     
    256258          !nocaseCmp(*string, completionBegin, searchLength))
    257259      {
    258         CompletionElement newElem;
    259         newElem.name = (*string);
    260         newElem.type = type;
    261         this->completionList.push_back(newElem);
     260        this->completionList.push_back(CompletionElement (*string, type));
    262261      }
    263262    }
     
    282281          !nocaseCmp((*bo)->getName(), completionBegin, searchLength))
    283282      {
    284         CompletionElement newElem;
    285         newElem.name = (*bo)->getName();
    286         newElem.type = type;
    287         this->completionList.push_back(newElem);
     283        this->completionList.push_back(CompletionElement((*bo)->getName(), type));
    288284      }
    289285    }
     
    316312      case AliasCompletion:
    317313        return typeNames[4];
     314      case ParamCompletion:
     315        return typeNames[5];
    318316    }
    319317  }
     
    326324      "object",
    327325      "function",
    328       "alias"
     326      "alias",
     327      "parameter",
    329328    };
    330329
Note: See TracChangeset for help on using the changeset viewer.