ui: hide name qualifiers for java graph nodes

* removed name qualifiers in non-package graph nodes for java projects
This commit is contained in:
malte_langkabel
2016-08-22 16:38:23 +02:00
parent 274eca0e5d
commit c3355f3c1a
3 changed files with 18 additions and 1 deletions
+5
View File
@@ -88,6 +88,11 @@ FilePath Project::getProjectSettingsFilePath() const
return getProjectSettings()->getFilePath();
}
LanguageType Project::getLanguage() const
{
return getProjectSettings()->getLanguage();
}
std::string Project::getDescription() const
{
return getProjectSettings()->getDescription();
+1
View File
@@ -25,6 +25,7 @@ public:
void forceRefresh();
FilePath getProjectSettingsFilePath() const;
LanguageType getLanguage() const;
std::string getDescription() const;
bool settingsEqualExceptNameAndLocation(const ProjectSettings& otherSettings) const;
void logStats() const;
@@ -13,6 +13,7 @@
#include "data/access/StorageAccess.h"
#include "data/parser/AccessKind.h"
#include "data/graph/Graph.h"
#include "Application.h"
GraphController::GraphController(StorageAccess* storageAccess)
: m_storageAccess(storageAccess)
@@ -260,7 +261,17 @@ void GraphController::createDummyGraphForTokenIds(const std::vector<Id>& tokenId
for (std::shared_ptr<DummyNode> node : dummyNodes)
{
node->hasParent = false;
node->name = node->data->getFullName();
// we remove the name qualifier for java projects.
// TODO: get rid of this distinction once we implemented better namespace/package display in graph.
if (Application::getInstance()->getCurrentProject()->getLanguage() == LANGUAGE_JAVA && !node->data->isType(Node::NODE_PACKAGE))
{
node->name = node->data->getName();
}
else
{
node->name = node->data->getFullName();
}
}
m_dummyNodes = dummyNodes;