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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user