logic: Show overview of analyzed symbols after launch

* show analysed nodes as bundles in graph
* ellide node names longer than 50 chars
* sort nodes alphabetic in these bundles
* show stats of analysis in code
* error are displayed as well in overview
* added keywords overview and error
* project description can be set in .coatiproject file
* description can include links to symbols using [symbol] syntax
* updated documentation
* increased toc nesting in documentation
This commit is contained in:
Eberhard Graether
2016-01-25 17:02:48 +01:00
parent 8addbb2195
commit eb12d3cda1
45 changed files with 752 additions and 223 deletions
+25 -19
View File
@@ -10,6 +10,7 @@
#include <qscrollbar.h>
#include "utility/messaging/type/MessageActivateTokenLocations.h"
#include "utility/messaging/type/MessageActivateTokenIds.h"
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/messaging/type/MessageFocusIn.h"
#include "utility/messaging/type/MessageFocusOut.h"
@@ -369,21 +370,41 @@ void QtCodeArea::mouseReleaseEvent(QMouseEvent* event)
m_eventPosition = event->pos();
setIDECursorPosition();
}
else
else if (!m_fileWidget->getErrorMessages().size())
{
QTextCursor cursor = this->cursorForPosition(event->pos());
std::vector<Id> locationIds = findLocationIdsForPosition(cursor.position());
if (locationIds.size() && !m_fileWidget->getErrorMessages().size())
std::vector<const Annotation*> annotations = getAnnotationsForPosition(cursor.position());
std::vector<Id> locationIds;
std::vector<Id> tokenIds;
for (const Annotation* annotation : annotations)
{
if (annotation->locationId > 0)
{
locationIds.push_back(annotation->locationId);
}
if (annotation->tokenId > 0)
{
tokenIds.push_back(annotation->tokenId);
}
}
if (locationIds.size())
{
MessageActivateTokenLocations(locationIds).dispatch();
}
else if (tokenIds.size())
{
MessageActivateTokenIds(tokenIds).dispatch();
}
}
}
}
void QtCodeArea::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && m_fileWidget->getFilePath().str().size())
{
MessageShowFile(m_fileWidget->getFilePath().str(), (m_fileWidget->getErrorMessages().size() > 0)).dispatch();
}
@@ -482,21 +503,6 @@ void QtCodeArea::setIDECursorPosition()
MessageMoveIDECursor(m_locationFile->getFilePath().str(), lineColumn.first, lineColumn.second).dispatch();
}
std::vector<Id> QtCodeArea::findLocationIdsForPosition(int pos) const
{
std::vector<Id> locationIds;
for (const Annotation& annotation : m_annotations)
{
if (!annotation.isScope && pos >= annotation.start && pos <= annotation.end)
{
locationIds.push_back(annotation.locationId);
}
}
return locationIds;
}
std::vector<const QtCodeArea::Annotation*> QtCodeArea::getAnnotationsForPosition(int pos) const
{
std::vector<const QtCodeArea::Annotation*> annotations;