Пример #1
0
void PHPWorkspace::GetWorkspaceFiles(wxStringSet_t& workspaceFiles, wxProgressDialog* progress) const
{
    PHPProject::Map_t::const_iterator iter = m_projects.begin();
    for(; iter != m_projects.end(); ++iter) {
        const wxArrayString& files = iter->second->GetFiles(progress);
        workspaceFiles.insert(files.begin(), files.end());
    }
}
Пример #2
0
size_t FileUtils::SplitWords(const wxString& str, wxStringSet_t& outputSet, bool makeLower)
{
    size_t offset = 0;
    wxString word;
    outputSet.clear();
    while(NextWord(str, offset, word, makeLower)) {
        outputSet.insert(word);
    }
    return outputSet.size();
}
Пример #3
0
void Project::GetFiles(wxStringSet_t& files)
{
    DirSaver ds;
    FileNameVector_t v;
    ::wxSetWorkingDirectory(m_fileName.GetPath());
    GetFiles(m_doc.GetRoot(), v, true);
    for(size_t i=0; i<v.size(); i++) {
        files.insert(v.at(i).GetFullPath());
    }
}
Пример #4
0
void Project::GetFiles(wxStringSet_t& files, const wxString& relativePath)
{
    DirSaver ds;
    FileNameVector_t v;
    ::wxSetWorkingDirectory(relativePath);
    GetFiles(m_doc.GetRoot(), v, false);
    for(size_t i=0; i<v.size(); i++) {
        v.at(i).MakeRelativeTo(relativePath);
        files.insert(v.at(i).GetFullPath());
    }
}
Пример #5
0
void PHPWorkspace::GetWorkspaceFiles(wxStringSet_t& workspaceFiles, const wxString& filter) const
{
    wxStringSet_t all_files;
    GetWorkspaceFiles(all_files);
    if(filter.IsEmpty()) {
        workspaceFiles.swap(all_files);

    } else {
        wxStringSet_t::iterator iter = all_files.begin();
        for(; iter != all_files.end(); ++iter) {
            wxFileName fn(*iter);
            if(fn.GetName().Contains(filter)) {
                workspaceFiles.insert(*iter);
            }
        }
    }
}