logic: error limit and better user experience (issue #385)

* only show up to 1000 errors in table and code view
* click button in bottom right of error table to show all
* same error order in code and table
* highlight error line when switching reference in code view
* improved error view performance

bug id = 385
This commit is contained in:
Eberhard Graether
2017-05-30 23:11:20 +02:00
parent a34abe6b4b
commit 29cfbe0f66
20 changed files with 204 additions and 75 deletions
@@ -14,19 +14,36 @@ ErrorController::~ErrorController()
void ErrorController::handleMessage(MessageClearErrorCount* message)
{
clear();
getView()->resetErrorLimit();
}
void ErrorController::handleMessage(MessageFinishedParsing* message)
{
clear();
getView()->addErrors(m_storageAccess->getErrors(), false);
getView()->setErrorCount(m_storageAccess->getErrorCount());
getView()->addErrors(m_storageAccess->getErrorsLimited(), false);
}
void ErrorController::handleMessage(MessageNewErrors* message)
{
getView()->addErrors(message->errors, true);
getView()->showDockWidget();
ErrorFilter filter;
int room = message->errors.size() + filter.limit - message->errorCount.total;
if (room > 0)
{
std::vector<ErrorInfo> errors = message->errors;
if (room < int(errors.size()))
{
errors.resize(room);
}
getView()->addErrors(message->errors, true);
getView()->showDockWidget();
}
getView()->setErrorCount(message->errorCount);
}
void ErrorController::handleMessage(MessageShowErrors* message)
@@ -39,11 +56,13 @@ void ErrorController::handleMessage(MessageShowErrors* message)
clear();
std::vector<ErrorInfo> errors = m_storageAccess->getErrors();
std::vector<ErrorInfo> errors = m_storageAccess->getErrorsLimited();
if (errors.size())
{
getView()->showDockWidget();
}
getView()->setErrorCount(message->errorCount);
getView()->addErrors(errors, false);
}