logic: Fixed error view related issues
* polished color schemes for error view * fixed error id column not hidden * fixed error count shown correctly in each view * moved storage stats logging to application * fixed indexed flag of errors broken for indexed headers in cdb project * fixed scrolling to active error when errors where not visible before * reverted tictactoe files to no errors
This commit is contained in:
@@ -338,31 +338,6 @@ std::vector<FileInfo> PersistentStorage::getInfoOnAllFiles() const
|
||||
return fileInfos;
|
||||
}
|
||||
|
||||
void PersistentStorage::logStats() const
|
||||
{
|
||||
TRACE();
|
||||
|
||||
std::stringstream ss;
|
||||
StorageStats stats = getStorageStats();
|
||||
|
||||
ss << "\nGraph:\n";
|
||||
ss << "\t" << stats.nodeCount << " Nodes\n";
|
||||
ss << "\t" << stats.edgeCount << " Edges\n";
|
||||
|
||||
ss << "\nCode:\n";
|
||||
ss << "\t" << stats.fileCount << " Files\n";
|
||||
ss << "\t" << stats.fileLOCCount << " Lines of Code\n";
|
||||
|
||||
|
||||
ErrorCountInfo errorCount = getErrorCount();
|
||||
|
||||
ss << "\nErrors:\n";
|
||||
ss << "\t" << errorCount.total << " Errors\n";
|
||||
ss << "\t" << errorCount.fatal << " Fatal Errors\n";
|
||||
|
||||
LOG_INFO(ss.str());
|
||||
}
|
||||
|
||||
void PersistentStorage::buildCaches()
|
||||
{
|
||||
TRACE();
|
||||
@@ -1060,10 +1035,10 @@ ErrorCountInfo PersistentStorage::getErrorCount() const
|
||||
return ErrorCountInfo();
|
||||
}
|
||||
|
||||
ErrorCountInfo PersistentStorage::getFilteredErrorCount() const
|
||||
std::vector<StorageError> PersistentStorage::getErrors() const
|
||||
{
|
||||
LOG_ERROR("This should never be called.");
|
||||
return ErrorCountInfo();
|
||||
return std::vector<StorageError>();
|
||||
}
|
||||
|
||||
std::vector<StorageError> PersistentStorage::getAllErrors() const
|
||||
@@ -1071,12 +1046,6 @@ std::vector<StorageError> PersistentStorage::getAllErrors() const
|
||||
return m_sqliteStorage.getAllErrors();
|
||||
}
|
||||
|
||||
std::vector<StorageError> PersistentStorage::getFilteredErrors() const
|
||||
{
|
||||
LOG_ERROR("This should never be called.");
|
||||
return std::vector<StorageError>();
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenLocationCollection> PersistentStorage::getErrorTokenLocations(std::vector<ErrorInfo>* errors) const
|
||||
{
|
||||
TRACE();
|
||||
|
||||
@@ -65,8 +65,6 @@ public:
|
||||
|
||||
std::vector<FileInfo> getInfoOnAllFiles() const;
|
||||
|
||||
void logStats() const;
|
||||
|
||||
void buildCaches();
|
||||
|
||||
void optimizeMemory();
|
||||
@@ -116,10 +114,8 @@ public:
|
||||
virtual StorageStats getStorageStats() const;
|
||||
|
||||
virtual ErrorCountInfo getErrorCount() const;
|
||||
virtual ErrorCountInfo getFilteredErrorCount() const;
|
||||
|
||||
virtual std::vector<StorageError> getErrors() const;
|
||||
virtual std::vector<StorageError> getAllErrors() const;
|
||||
virtual std::vector<StorageError> getFilteredErrors() const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getErrorTokenLocations(std::vector<ErrorInfo>* errors) const;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
|
||||
m_fileRegister->getParsedSourceFilesCount(),
|
||||
m_fileRegister->getSourceFilesCount(),
|
||||
time,
|
||||
m_storageAccess->getFilteredErrorCount()
|
||||
m_storageAccess->getErrorCount()
|
||||
);
|
||||
|
||||
return STATE_SUCCESS;
|
||||
|
||||
@@ -70,10 +70,8 @@ public:
|
||||
virtual StorageStats getStorageStats() const = 0;
|
||||
|
||||
virtual ErrorCountInfo getErrorCount() const = 0;
|
||||
virtual ErrorCountInfo getFilteredErrorCount() const = 0;
|
||||
|
||||
virtual std::vector<StorageError> getErrors() const = 0;
|
||||
virtual std::vector<StorageError> getAllErrors() const = 0;
|
||||
virtual std::vector<StorageError> getFilteredErrors() const = 0;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getErrorTokenLocations(std::vector<ErrorInfo>* errors) const = 0;
|
||||
};
|
||||
|
||||
@@ -274,7 +274,7 @@ ErrorCountInfo StorageAccessProxy::getErrorCount() const
|
||||
{
|
||||
ErrorCountInfo info;
|
||||
|
||||
std::vector<StorageError> storageErrors = getAllErrors();
|
||||
std::vector<StorageError> storageErrors = getErrors();
|
||||
for (const StorageError& error : storageErrors)
|
||||
{
|
||||
info.total++;
|
||||
@@ -288,27 +288,25 @@ ErrorCountInfo StorageAccessProxy::getErrorCount() const
|
||||
return info;
|
||||
}
|
||||
|
||||
ErrorCountInfo StorageAccessProxy::getFilteredErrorCount() const
|
||||
std::vector<StorageError> StorageAccessProxy::getErrors() const
|
||||
{
|
||||
ErrorCountInfo info;
|
||||
|
||||
std::vector<StorageError> storageErrors = getAllErrors();
|
||||
for (const StorageError& error : storageErrors)
|
||||
if (hasSubject())
|
||||
{
|
||||
if (!m_errorFilter.filter(error))
|
||||
std::vector<StorageError> errors = m_subject->getAllErrors();;
|
||||
std::vector<StorageError> filteredErrors;
|
||||
|
||||
for (const StorageError& error : errors)
|
||||
{
|
||||
continue;
|
||||
if (m_errorFilter.filter(error))
|
||||
{
|
||||
filteredErrors.push_back(error);
|
||||
}
|
||||
}
|
||||
|
||||
info.total++;
|
||||
|
||||
if (error.fatal)
|
||||
{
|
||||
info.fatal++;
|
||||
}
|
||||
return filteredErrors;
|
||||
}
|
||||
|
||||
return info;
|
||||
return std::vector<StorageError>();
|
||||
}
|
||||
|
||||
std::vector<StorageError> StorageAccessProxy::getAllErrors() const
|
||||
@@ -321,22 +319,6 @@ std::vector<StorageError> StorageAccessProxy::getAllErrors() const
|
||||
return std::vector<StorageError>();
|
||||
}
|
||||
|
||||
std::vector<StorageError> StorageAccessProxy::getFilteredErrors() const
|
||||
{
|
||||
std::vector<StorageError> errors = getAllErrors();
|
||||
std::vector<StorageError> filteredErrors;
|
||||
|
||||
for (const StorageError& error : errors)
|
||||
{
|
||||
if (m_errorFilter.filter(error))
|
||||
{
|
||||
filteredErrors.push_back(error);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredErrors;
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenLocationCollection> StorageAccessProxy::getErrorTokenLocations(std::vector<ErrorInfo>* errors) const
|
||||
{
|
||||
if (hasSubject())
|
||||
@@ -368,5 +350,5 @@ std::shared_ptr<TokenLocationCollection> StorageAccessProxy::getErrorTokenLocati
|
||||
void StorageAccessProxy::handleMessage(MessageErrorFilterChanged* message)
|
||||
{
|
||||
m_errorFilter = message->errorFilter;
|
||||
MessageShowErrors(getFilteredErrorCount()).dispatch();
|
||||
MessageShowErrors(getErrorCount()).dispatch();
|
||||
}
|
||||
|
||||
@@ -65,10 +65,8 @@ public:
|
||||
virtual StorageStats getStorageStats() const;
|
||||
|
||||
virtual ErrorCountInfo getErrorCount() const;
|
||||
virtual ErrorCountInfo getFilteredErrorCount() const;
|
||||
|
||||
virtual std::vector<StorageError> getErrors() const;
|
||||
virtual std::vector<StorageError> getAllErrors() const;
|
||||
virtual std::vector<StorageError> getFilteredErrors() const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getErrorTokenLocations(std::vector<ErrorInfo>* errors) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user