Esempio n. 1
0
bool CodeFormatter::BatchFormat(const std::vector<wxFileName>& files)
{
    FormatOptions options;
    m_mgr->GetConfigTool()->ReadObject(wxT("FormatterOptions"), &options);

    if(options.GetEngine() == kFormatEngineAStyle) {
        return AStyleBatchFOrmat(files, options);

    } else if(options.GetEngine() == kFormatEngineClangFormat) {
        return ClangBatchFormat(files, options);
    }
}
Esempio n. 2
0
bool CodeFormatter::BatchFormat(const std::vector<wxFileName>& files)
{
    FormatOptions options;
    m_mgr->GetConfigTool()->ReadObject(wxT("FormatterOptions"), &options);

    switch(options.GetEngine()) {
    case kFormatEngineAStyle:
        return AStyleBatchFOrmat(files, options);
    case kFormatEngineClangFormat:
        return ClangBatchFormat(files, options);
    }
    return false;
}