ui: Added custom tooltipping to code and graph (issue #195)
* Tooltips show node type with access specifier, reference count and fully qualified name * Fields and global variables include the type name * Methods and functinos show whole signature. Gets broken into multiple lines if too long. Included changes: * Upgraded to C++14 * fixed clang warnings * Pass location of .srctrlprj file to build.sh script to load on launch * Split off QtCodeField for showing highlighted and annotated code fom QtCodeArea * removed TokenComponentSignature * added TaskDecoratorDelay bug id = 195
This commit is contained in:
@@ -10,13 +10,14 @@
|
||||
#include "data/graph/token_component/TokenComponentConst.h"
|
||||
#include "data/graph/token_component/TokenComponentStatic.h"
|
||||
#include "data/graph/token_component/TokenComponentFilePath.h"
|
||||
#include "data/graph/token_component/TokenComponentSignature.h"
|
||||
|
||||
const Node::NodeTypeMask Node::NODE_NOT_VISIBLE = Node::NODE_NAMESPACE | Node::NODE_PACKAGE;
|
||||
const Node::NodeTypeMask Node::NODE_USEABLE_TYPE = Node::NODE_NON_INDEXED | Node::NODE_BUILTIN_TYPE |
|
||||
Node::NODE_STRUCT | Node::NODE_CLASS | Node::NODE_INTERFACE | Node::NODE_TYPEDEF;
|
||||
const Node::NodeTypeMask Node::NODE_INHERITABLE_TYPE = Node::NODE_NON_INDEXED | Node::NODE_BUILTIN_TYPE |
|
||||
NODE_TYPE | Node::NODE_STRUCT | Node::NODE_CLASS | Node::NODE_INTERFACE;
|
||||
const Node::NodeTypeMask Node::NODE_NOT_VISIBLE = NODE_NAMESPACE | NODE_PACKAGE;
|
||||
const Node::NodeTypeMask Node::NODE_USEABLE_TYPE = NODE_NON_INDEXED | NODE_BUILTIN_TYPE | NODE_STRUCT | NODE_CLASS |
|
||||
NODE_UNION | NODE_INTERFACE | NODE_TYPEDEF;
|
||||
const Node::NodeTypeMask Node::NODE_INHERITABLE_TYPE = NODE_NON_INDEXED | NODE_BUILTIN_TYPE | NODE_TYPE | NODE_STRUCT |
|
||||
NODE_CLASS | NODE_INTERFACE;
|
||||
const Node::NodeTypeMask Node::NODE_MEMBER_TYPE = NODE_METHOD | NODE_FIELD | NODE_CLASS | NODE_INTERFACE | NODE_STRUCT |
|
||||
NODE_UNION | NODE_TYPEDEF | NODE_ENUM;
|
||||
|
||||
std::string Node::getUnderscoredTypeString(NodeType type)
|
||||
{
|
||||
@@ -469,23 +470,6 @@ void Node::addComponentFilePath(std::shared_ptr<TokenComponentFilePath> componen
|
||||
}
|
||||
}
|
||||
|
||||
void Node::addComponentSignature(std::shared_ptr<TokenComponentSignature> component)
|
||||
{
|
||||
if (getComponent<TokenComponentSignature>())
|
||||
{
|
||||
LOG_ERROR("TokenComponentSignature has been set before!");
|
||||
return;
|
||||
}
|
||||
else if (!isType(NODE_FUNCTION | NODE_METHOD))
|
||||
{
|
||||
LOG_ERROR("TokenComponentFilePath can't be set on node of type: " + getReadableTypeString());
|
||||
}
|
||||
else
|
||||
{
|
||||
addComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
void Node::addComponentAccess(std::shared_ptr<TokenComponentAccess> component)
|
||||
{
|
||||
if (getComponent<TokenComponentAccess>())
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
static const NodeTypeMask NODE_NOT_VISIBLE;
|
||||
static const NodeTypeMask NODE_USEABLE_TYPE;
|
||||
static const NodeTypeMask NODE_INHERITABLE_TYPE;
|
||||
static const NodeTypeMask NODE_MEMBER_TYPE;
|
||||
|
||||
Node(Id id, NodeType type, NameHierarchy nameHierarchy, bool defined);
|
||||
Node(const Node& other);
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#include "data/graph/token_component/TokenComponentSignature.h"
|
||||
|
||||
TokenComponentSignature::TokenComponentSignature(const std::string& signature)
|
||||
: m_signature(signature)
|
||||
{
|
||||
}
|
||||
|
||||
TokenComponentSignature::~TokenComponentSignature()
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenComponent> TokenComponentSignature::copy() const
|
||||
{
|
||||
return std::make_shared<TokenComponentSignature>(*this);
|
||||
}
|
||||
|
||||
const std::string& TokenComponentSignature::getSignature() const
|
||||
{
|
||||
return m_signature;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef TOKEN_COMPONENT_SIGNATURE_H
|
||||
#define TOKEN_COMPONENT_SIGNATURE_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "data/graph/token_component/TokenComponent.h"
|
||||
|
||||
class TokenComponentSignature
|
||||
: public TokenComponent
|
||||
{
|
||||
public:
|
||||
TokenComponentSignature(const std::string& signature);
|
||||
virtual ~TokenComponentSignature();
|
||||
|
||||
virtual std::shared_ptr<TokenComponent> copy() const;
|
||||
|
||||
const std::string& getSignature() const;
|
||||
|
||||
private:
|
||||
const std::string m_signature;
|
||||
};
|
||||
|
||||
#endif // TOKEN_COMPONENT_SIGNATURE_H
|
||||
Reference in New Issue
Block a user