ui: precollapse files in code view

This change shows the files in the code view minimized, if more than 5. This greatly improves performance, because code
and annotations won't get loaded until needed. Files including declarations or definitions of the active symbol are
still expanded. The number of references in each file is now shown in it's title bar. Clicking the title bar allows for
expanding and collapsing as well now.
This commit is contained in:
Eberhard Graether
2015-09-28 15:18:52 +02:00
parent 27ed5a0635
commit dd4d74a1d9
20 changed files with 353 additions and 85 deletions
@@ -25,6 +25,24 @@ size_t TokenLocationFile::getTokenLocationLineCount() const
return m_lines.size();
}
size_t TokenLocationFile::getUnscopedStartTokenLocationCount() const
{
size_t count = 0;
for (const TokenLocationLinePairType& line : m_lines)
{
line.second->forEachStartTokenLocation(
[&count](TokenLocation* location)
{
if (!location->isScopeTokenLocation())
{
count++;
}
}
);
}
return count;
}
const FilePath& TokenLocationFile::getFilePath() const
{
return m_filePath;