logic: lazy load code annotations

* code annotations are loaded after showing the code file
* added traces
* refactored highlighter
* fixed error tooltip style in codeview

fortune cookie message = It's not the time that counts, but what you do with it.
This commit is contained in:
Eberhard Graether
2018-03-24 13:19:49 +01:00
parent 0d79639c96
commit aed783f5ca
24 changed files with 405 additions and 361 deletions
@@ -115,6 +115,16 @@ SourceLocation* SourceLocationFile::addSourceLocationCopy(const SourceLocation*
return copy.get();
}
void SourceLocationFile::copySourceLocations(std::shared_ptr<SourceLocationFile> file)
{
file->forEachSourceLocation(
[this](SourceLocation* location)
{
addSourceLocationCopy(location);
}
);
}
SourceLocation* SourceLocationFile::getSourceLocationById(Id locationId) const
{
std::map<Id, SourceLocation*>::const_iterator it = m_locationIndex.find(locationId);
@@ -45,6 +45,8 @@ public:
size_t endLineNumber, size_t endColumnNumber);
SourceLocation* addSourceLocationCopy(const SourceLocation* location);
void copySourceLocations(std::shared_ptr<SourceLocationFile> file);
SourceLocation* getSourceLocationById(Id locationId) const;
void forEachSourceLocation(std::function<void(SourceLocation*)> func) const;