Ejemplo n.º 1
0
bool ReconcileProjectDlg::LoadData()
{
    ReconcileProjectFiletypesDlg dlg(clMainFrame::Get(), m_projname);
    dlg.SetData();
    if(dlg.ShowModal() != wxID_OK) {
        return false;
    }
    wxString toplevelDir, types;
    wxArrayString ignorefiles, excludes, regexes;
    dlg.GetData(toplevelDir, types, ignorefiles, excludes, regexes);
    m_regexes = regexes;

    wxDir dir(toplevelDir);
    if(!dir.IsOpened()) {
        return false;
    }

    m_toplevelDir = toplevelDir;

    m_allfiles.clear();
    {
        wxBusyInfo wait("Searching for files...", this);
        wxSafeYield();

        FindFilesTraverser traverser(types, ignorefiles, excludes, toplevelDir);
        dir.Traverse(traverser);
        m_allfiles.insert(traverser.GetResults().begin(), traverser.GetResults().end());
        DoFindFiles();
    }

    if(m_newfiles.empty() && m_stalefiles.empty()) {
        wxMessageBox(_("No new or stale files found. The project is up-to-date"),
                     _("CodeLite"),
                     wxICON_INFORMATION | wxOK,
                     this);
        return false;
    }

    DistributeFiles(false);
    return true;
}
Ejemplo n.º 2
0
void ReconcileProjectDlg::OnAutoSuggest(wxCommandEvent& event)
{
    DistributeFiles(true);
}