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