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:
+16
-4
@@ -7,7 +7,7 @@
|
||||
#include "data/access/LocationAccessProxy.h"
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/messaging/MessageQueue.h"
|
||||
#include "utility/messaging/type/MessageActivateToken.h"
|
||||
#include "utility/messaging/type/MessageActivateTokens.h"
|
||||
|
||||
std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ void Application::loadProject(const std::string& projectSettingsFilePath)
|
||||
m_project->loadProjectSettings(projectSettingsFilePath);
|
||||
m_project->parseCode();
|
||||
|
||||
MessageActivateToken(1).dispatch();
|
||||
activateInitialNode();
|
||||
}
|
||||
|
||||
void Application::loadSource(const std::string& sourceDirectoryPath)
|
||||
@@ -59,7 +59,7 @@ void Application::loadSource(const std::string& sourceDirectoryPath)
|
||||
m_project->setSourceDirectoryPath(sourceDirectoryPath);
|
||||
m_project->parseCode();
|
||||
|
||||
MessageActivateToken(1).dispatch();
|
||||
activateInitialNode();
|
||||
}
|
||||
|
||||
void Application::reloadProject()
|
||||
@@ -67,7 +67,7 @@ void Application::reloadProject()
|
||||
m_project->clearStorage();
|
||||
m_project->parseCode();
|
||||
|
||||
MessageActivateToken(1).dispatch();
|
||||
activateInitialNode();
|
||||
}
|
||||
|
||||
void Application::saveProject(const std::string& projectSettingsFilePath)
|
||||
@@ -78,6 +78,18 @@ void Application::saveProject(const std::string& projectSettingsFilePath)
|
||||
}
|
||||
}
|
||||
|
||||
void Application::activateInitialNode() const
|
||||
{
|
||||
Id mainId = m_graphAccessProxy->getIdForNodeWithName("main");
|
||||
|
||||
if (!mainId)
|
||||
{
|
||||
mainId = 1;
|
||||
}
|
||||
|
||||
MessageActivateTokens(mainId).dispatch();
|
||||
}
|
||||
|
||||
void Application::handleMessage(MessageLoadProject* message)
|
||||
{
|
||||
loadProject(message->projectSettingsFilePath);
|
||||
|
||||
Reference in New Issue
Block a user