logic: added C/C++ project setup from Code::Blocks

* also changed xml elements in sourcegroup settings that specify the used language standard, so that one sourcegroup can maintain multiple language standards
* added migration and migrated sample projects
This commit is contained in:
mlangkabel
2018-06-08 12:10:38 +02:00
parent ce0a8a6444
commit 704808b26f
86 changed files with 2376 additions and 543 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ std::set<FilePath> SourceGroupJava::getAllSourceFilePaths() const
std::vector<std::shared_ptr<IndexerCommand>> SourceGroupJava::getIndexerCommands(const std::set<FilePath>& filesToIndex) const
{
const std::string languageStandard = getSourceGroupSettingsJava()->getStandard();
const std::string languageStandard = getSourceGroupSettingsJava()->getJavaStandard();
std::vector<FilePath> classPath = getClassPath();
@@ -42,17 +42,23 @@ bool SourceGroupJavaSonargraph::prepareIndexing()
std::set<FilePath> SourceGroupJavaSonargraph::filterToContainedFilePaths(const std::set<FilePath>& filePaths) const
{
if (std::shared_ptr<Sonargraph::Project> project = Sonargraph::Project::load(
m_settings->getSonargraphProjectPathExpandedAndAbsolute(), getLanguage()
))
std::set<FilePath> containedFilePaths;
const std::set<FilePath> indexedPaths = getAllSourceFilePaths();
for (const FilePath& filePath : filePaths)
{
return project->filterToContainedFilePaths(filePaths);
for (const FilePath& indexedPath : indexedPaths)
{
if (indexedPath == filePath || indexedPath.contains(filePath))
{
containedFilePaths.insert(filePath);
break;
}
}
}
else
{
LOG_ERROR("Unable to load Sonargraph project to check the containment of file paths.");
}
return std::set<FilePath>();
return containedFilePaths;
}
std::set<FilePath> SourceGroupJavaSonargraph::getAllSourceFilePaths() const