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
+26 -1
View File
@@ -62,6 +62,20 @@ void ASTBodyVisitor::VisitCXXConstructExpr(clang::CXXConstructExpr* expr)
VisitStmt(expr);
}
void ASTBodyVisitor::VisitCXXNewExpr(clang::CXXNewExpr* expr)
{
if (m_functionDecl)
{
m_client->VisitCXXNewExprInDeclBody(m_functionDecl, expr);
}
else
{
m_client->VisitCXXNewExprInDeclBody(m_varDecl, expr);
}
VisitStmt(expr);
}
void ASTBodyVisitor::VisitMemberExpr(clang::make_ptr<clang::MemberExpr>::type expr)
{
if (expr->getMemberDecl()->getKind() == clang::Decl::Kind::Field)
@@ -75,7 +89,18 @@ void ASTBodyVisitor::VisitDeclRefExpr(clang::make_ptr<clang::DeclRefExpr>::type
{
if (expr->getDecl()->getKind() == clang::Decl::Var && expr->getDecl()->isDefinedOutsideFunctionOrMethod())
{
m_client->VisitDeclRefExprInDeclBody(m_functionDecl, expr);
m_client->VisitGlobalVariableExprInDeclBody(m_functionDecl, expr);
}
else if (expr->getDecl()->getKind() == clang::Decl::EnumConstant)
{
if (m_functionDecl)
{
m_client->VisitEnumExprInDeclBody(m_functionDecl, expr);
}
else
{
m_client->VisitEnumExprInDeclBody(m_varDecl, expr);
}
}
VisitStmt(expr);
}