ui: Improved user experience of error display

* label errors as errors instead of references in file snippet headers
* show number of fatal errors in file snippet headers as well
* only show the first 10 error snippets open, remaining collapsed
* don't show status message after parsing in red on errors
* don't show stats of parsing when project was only loaded
This commit is contained in:
Eberhard Graether
2016-04-13 12:14:55 +02:00
parent 4eef42d15c
commit fcc39f4a77
21 changed files with 159 additions and 53 deletions
+5 -5
View File
@@ -643,17 +643,17 @@ std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForLinesInFile(
return m_sqliteStorage.getTokenLocationsForFile(filePath)->getFilteredByLines(firstLineNumber, lastLineNumber);
}
TokenLocationCollection Storage::getErrorTokenLocations(std::vector<std::string>* errorMessages) const
TokenLocationCollection Storage::getErrorTokenLocations(std::vector<ErrorInfo>* errors) const
{
TokenLocationCollection errorCollection;
std::vector<StorageError> errors = m_sqliteStorage.getAllErrors();
for (size_t i = 0; i < errors.size(); i++)
std::vector<StorageError> storageErrors = m_sqliteStorage.getAllErrors();
for (size_t i = 0; i < storageErrors.size(); i++)
{
const StorageError& error = errors[i];
const StorageError& error = storageErrors[i];
errorCollection.addTokenLocation(
i, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber);
errorMessages->push_back(error.message);
errors->push_back(ErrorInfo(error.message, error.filePath, i, error.fatal));
}
return errorCollection;