- wxString srcName;
- bool innerCont = srcF.GetFirst(&srcName, wxT("*.h"), wxDIR_FILES);
- while (innerCont)
- {
- std::string blackBoxName = crea::wx2std(srcName);
- if(crea::wx2std(srcName.substr(0,2)) == "bb")
- {
- //check if box already exist
- bool found = false;
- for (int i = 0;!found && i < this->blackBoxes.size(); i++)
- {
- if (this->blackBoxes[i]->GetName() == blackBoxName)
- {
- found = true;
- int pos = std::find(this->children.begin(), this->children.end(), this->blackBoxes[i]) - this->children.begin();
- checked[pos] = true;
- checkedBlackBoxes[i] = true;
- if(!this->blackBoxes[i]->Refresh(result))
- return false;
- }
- }
- if(!found)
- {
- modelCDMBlackBox* blackBox = new modelCDMBlackBox(blackBoxName, path + "/" + "src", this->level +1);
- this->blackBoxes.push_back(blackBox);
- this->children.push_back(blackBox);
- }
- }
- innerCont = srcF.GetNext(&srcName);
- }
+ found = true;
+ int pos = std::find(this->children.begin(), this->children.end(), this->src) - this->children.begin();
+ checked[pos] = true;
+ checkedSrc = true;
+ if(!this->src->Refresh(result))
+ return false;
+ }
+ else
+ {
+ this->src = new modelCDMPackageSrc(path + CDMUtilities::SLASH + stdfileName, stdfileName, this->level +1);
+ this->children.push_back(this->src);