ui/data: cleaned up UI and parsing

* HOT FIX: typename not always correctly split to name hierarchy
* show node main if available as first active token after parsing
* show all contents of namespaces if searched for
* added missing enum type and enum value usages
* added inheritance for structs
* removed MessageActivateToken and replaced it with MessageActivateTokens
* activating correct nodes for clicks in GraphView and CodeView
* no graph change when clicking an edge, but highlighting the edge instead
* only show active nodes without connections when multiple are activated
* fixed snippet sorting to put file that contains declarations on top
* set sizeHints on CodeView and SearchView to increase their initial size

fortune cookie message = Das Leben wird eine positive Wendung nehmen.
This commit is contained in:
Eberhard Graether
2015-01-08 12:12:50 +01:00
parent ee85abfc7b
commit 8242454104
41 changed files with 703 additions and 294 deletions
+8 -14
View File
@@ -4,27 +4,21 @@
#include <string>
#include "component/controller/Controller.h"
#include "component/view/CodeView.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageActivateToken.h"
#include "utility/messaging/type/MessageActivateTokenLocation.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/types.h"
class CodeView;
class GraphAccess;
class LocationAccess;
class TokenLocationFile;
struct AnnotatedText
{
std::string text;
Id tokenId;
};
class CodeController
: public Controller
, public MessageListener<MessageActivateToken>
, public MessageListener<MessageActivateTokenLocation>
, public MessageListener<MessageActivateTokens>
, public MessageListener<MessageRefresh>
, public MessageListener<MessageShowFile>
@@ -33,18 +27,18 @@ public:
CodeController(GraphAccess* graphAccess, LocationAccess* locationAccess);
~CodeController();
void setActiveTokenIds(const std::vector<Id>& ids, Id activeId, Id declarationId);
private:
virtual void handleMessage(MessageActivateToken* message);
static const uint s_lineRadius;
virtual void handleMessage(MessageActivateTokenLocation* message);
virtual void handleMessage(MessageActivateTokens* message);
virtual void handleMessage(MessageRefresh* message);
virtual void handleMessage(MessageShowFile* message);
CodeView* getView();
static const uint s_lineRadius;
std::vector<CodeView::CodeSnippetParams> getSnippetsForActiveTokenIds(
const std::vector<Id>& ids, Id declarationId) const;
std::vector<std::pair<uint, uint>> getSnippetRangesForFile(TokenLocationFile* file, const uint lineRadius) const;
GraphAccess* m_graphAccess;