ui: show signature in function & method tooltip

This commit is contained in:
Eberhard Graether
2015-11-25 16:48:26 +01:00
parent 622972cd28
commit 6d8f733962
9 changed files with 107 additions and 7 deletions
+18
View File
@@ -8,6 +8,7 @@
#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_UNDEFINED | Node::NODE_NAMESPACE;
@@ -395,6 +396,23 @@ 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: " + getTypeString());
}
else
{
addComponent(component);
}
}
std::string Node::getTypeString() const
{
return getTypeString(m_type);