logic: Added indexing mode to reindex incomplete files (issue #493, #496)

* added radio buttons to start indexing dialog
* don't block task scheduler thread while start indexing dialog is visible
* don't force whole project refresh on settings change
* added help button to start indexing dialog explaining indexing modes
* disable unavailable modes when project needs full refresh
* improved label texts on indexing dialogs
* added --incomplete flag to index command of commandline API
* fixed deletion of window stack elements
This commit is contained in:
Eberhard Graether
2017-12-03 22:30:09 +01:00
parent faf9e7655f
commit f9e4afda77
33 changed files with 748 additions and 529 deletions
+9 -18
View File
@@ -14,11 +14,6 @@ LanguageType SourceGroup::getLanguage() const
return getLanguageTypeForSourceGroupType(getType());
}
bool SourceGroup::prepareRefresh()
{
return true;
}
bool SourceGroup::prepareIndexing()
{
return true;
@@ -26,7 +21,6 @@ bool SourceGroup::prepareIndexing()
void SourceGroup::fetchAllSourceFilePaths()
{
m_sourceFilePathsToIndex.clear();
FileManager fileManager;
fileManager.update(
getAllSourcePaths(),
@@ -36,15 +30,22 @@ void SourceGroup::fetchAllSourceFilePaths()
m_allSourceFilePaths = fileManager.getAllSourceFilePaths();
}
void SourceGroup::fetchSourceFilePathsToIndex(const std::set<FilePath>& staticSourceFilePaths)
std::set<FilePath> SourceGroup::getAllSourceFilePaths() const
{
return m_allSourceFilePaths;
}
std::set<FilePath> SourceGroup::getSourceFilePathsToIndex(const std::set<FilePath>& staticSourceFilePaths)
{
std::set<FilePath> sourceFilePathsToIndex;
for (const FilePath& sourceFilePath: m_allSourceFilePaths)
{
if (staticSourceFilePaths.find(sourceFilePath) == staticSourceFilePaths.end())
{
m_sourceFilePathsToIndex.insert(sourceFilePath);
sourceFilePathsToIndex.insert(sourceFilePath);
}
}
return sourceFilePathsToIndex;
}
std::set<FilePath> SourceGroup::getIndexedPaths()
@@ -57,16 +58,6 @@ std::set<FilePath> SourceGroup::getExcludedPaths()
return findAndAddSymlinkedDirectories(getSourceGroupSettings()->getExcludePathsExpandedAndAbsolute());
}
std::set<FilePath> SourceGroup::getAllSourceFilePaths() const
{
return m_allSourceFilePaths;
}
std::set<FilePath> SourceGroup::getSourceFilePathsToIndex() const
{
return m_sourceFilePathsToIndex;
}
std::set<FilePath> SourceGroup::findAndAddSymlinkedDirectories(const std::vector<FilePath>& paths)
{
std::set<FilePath> resultPaths;