logic: sonargraph fixes

* updated sonargraph project icon
* fixed Sonargraph SourceGroup to only return indexer commands for requested files
* fixed refresh info generator to ignore non-existing files
This commit is contained in:
mlangkabel
2018-06-04 19:05:54 +02:00
parent 12bf007caf
commit 3cc51e0d01
6 changed files with 47 additions and 15 deletions
+8 -1
View File
@@ -35,7 +35,14 @@ void IndexerCommandList::shuffle()
std::vector<PairType> sourceFileSizesToCommands;
for (std::shared_ptr<IndexerCommand> command: m_commands)
{
sourceFileSizesToCommands.push_back(std::make_pair(FileSystem::getFileByteSize(command->getSourceFilePath()), command));
if (command->getSourceFilePath().exists())
{
sourceFileSizesToCommands.push_back(std::make_pair(FileSystem::getFileByteSize(command->getSourceFilePath()), command));
}
else
{
sourceFileSizesToCommands.push_back(std::make_pair(1, command));
}
}
std::sort(sourceFileSizesToCommands.begin(), sourceFileSizesToCommands.end(), [](const PairType& p, const PairType& q){ return p.first > q.first; });
+7 -1
View File
@@ -170,7 +170,13 @@ std::set<FilePath> RefreshInfoGenerator::getAllSourceFilePaths(const std::vector
{
if (sourceGroup->getStatus() == SOURCE_GROUP_STATUS_ENABLED)
{
utility::append(allSourceFilePaths, sourceGroup->getAllSourceFilePaths());
for (const FilePath& sourceFilePath : sourceGroup->getAllSourceFilePaths())
{
if (sourceFilePath.exists())
{
allSourceFilePaths.insert(sourceFilePath);
}
}
}
}