diff --git a/src/lib/component/controller/GraphController.cpp b/src/lib/component/controller/GraphController.cpp index 01a2d7ae..0ef743d4 100644 --- a/src/lib/component/controller/GraphController.cpp +++ b/src/lib/component/controller/GraphController.cpp @@ -272,12 +272,22 @@ void GraphController::handleMessage(MessageFocusOut *message) void GraphController::handleMessage(MessageGraphNodeBundleSplit* message) { std::wstring name; + if (m_dummyNodes.size() == 1 && m_dummyNodes[0]->isGroupNode()) + { + name = m_dummyNodes[0]->name; + std::shared_ptr groupNode = m_dummyNodes[0]; + m_dummyNodes = groupNode->subNodes; + } + for (size_t i = 0; i < m_dummyNodes.size(); i++) { DummyNode* node = m_dummyNodes[i].get(); if ((node->isBundleNode() || node->isGroupNode()) && node->tokenId == message->bundleId) { - name = node->name; + if (!name.size()) + { + name = node->name; + } std::vector> nodes; if (node->isBundleNode()) diff --git a/src/lib/data/storage/PersistentStorage.cpp b/src/lib/data/storage/PersistentStorage.cpp index ed29039b..450f0037 100644 --- a/src/lib/data/storage/PersistentStorage.cpp +++ b/src/lib/data/storage/PersistentStorage.cpp @@ -476,6 +476,8 @@ std::map> PersistentStorage::getNodeIdToParentF std::map> nodeIdToParentFileMap; std::shared_ptr locations = m_sqliteIndexStorage.getSourceLocationsForElementIds(nodeIds); + + // prefer scope locations if available locations->forEachSourceLocation( [this, &nodeIdToParentFileMap](SourceLocation* location) { @@ -490,6 +492,26 @@ std::map> PersistentStorage::getNodeIdToParentF } ); + // fill in missing ones + locations->forEachSourceLocation( + [this, &nodeIdToParentFileMap](SourceLocation* location) + { + if (!location->isStartLocation()) + { + return; + } + + for (Id tokenId : location->getTokenIds()) + { + if (nodeIdToParentFileMap.find(tokenId) == nodeIdToParentFileMap.end()) + { + nodeIdToParentFileMap.emplace(tokenId, std::make_pair(getFileNodeId(location->getFilePath()), + NameHierarchy(location->getFilePath().wstr(), NAME_DELIMITER_FILE))); + } + } + } + ); + return nodeIdToParentFileMap; } diff --git a/src/lib/settings/ProjectSettings.cpp b/src/lib/settings/ProjectSettings.cpp index 568abbf7..6af7043f 100644 --- a/src/lib/settings/ProjectSettings.cpp +++ b/src/lib/settings/ProjectSettings.cpp @@ -356,6 +356,8 @@ SettingsMigrator ProjectSettings::getMigrations() const case LANGUAGE_JAVA: languageName = "java"; break; + case LANGUAGE_UNKNOWN: + continue; } std::string key = SourceGroupSettings::s_keyPrefix + sourceGroupSettings->getId(); diff --git a/src/lib/utility/file/FilePath.cpp b/src/lib/utility/file/FilePath.cpp index 803383be..f23fe80d 100644 --- a/src/lib/utility/file/FilePath.cpp +++ b/src/lib/utility/file/FilePath.cpp @@ -344,7 +344,7 @@ FilePath FilePath::getLowerCase() const bool FilePath::contains(const FilePath& other) const { - if (exists() && !isDirectory()) + if (!isDirectory()) { return false; } diff --git a/src/lib_cxx/utility/codeblocks/CodeblocksProject.h b/src/lib_cxx/utility/codeblocks/CodeblocksProject.h index ecc18435..123c48c8 100644 --- a/src/lib_cxx/utility/codeblocks/CodeblocksProject.h +++ b/src/lib_cxx/utility/codeblocks/CodeblocksProject.h @@ -3,6 +3,7 @@ #include #include +#include #include class ApplicationSettings; diff --git a/src/lib_cxx/utility/codeblocks/CodeblocksTarget.h b/src/lib_cxx/utility/codeblocks/CodeblocksTarget.h index b6707034..26ff859f 100644 --- a/src/lib_cxx/utility/codeblocks/CodeblocksTarget.h +++ b/src/lib_cxx/utility/codeblocks/CodeblocksTarget.h @@ -2,7 +2,7 @@ #define CODEBLOCKS_TARGET_H #include -#include +#include #include #include "utility/codeblocks/CodeblocksTargetRelationType.h" diff --git a/src/lib_cxx/utility/codeblocks/CodeblocksTargetRelationType.cpp b/src/lib_cxx/utility/codeblocks/CodeblocksTargetRelationType.cpp index 697300b2..6fc100f3 100644 --- a/src/lib_cxx/utility/codeblocks/CodeblocksTargetRelationType.cpp +++ b/src/lib_cxx/utility/codeblocks/CodeblocksTargetRelationType.cpp @@ -14,6 +14,8 @@ namespace Codeblocks return 2; case CODEBLOCKS_TARGET_RELATION_TARGET_AFTER_PROJECT: return 3; + case CODEBLOCKS_TARGET_RELATION_UNKNOWN: + break; } return 99; } diff --git a/src/lib_gui/qt/element/QtCodeFile.cpp b/src/lib_gui/qt/element/QtCodeFile.cpp index efc10439..1eb37902 100644 --- a/src/lib_gui/qt/element/QtCodeFile.cpp +++ b/src/lib_gui/qt/element/QtCodeFile.cpp @@ -387,8 +387,6 @@ void QtCodeFile::findScreenMatches(const std::wstring& query, std::vectorrequestScroll(m_filePath, 0, 0, false, QtCodeNavigateable::SCROLL_VISIBLE); - MessageChangeFileView( m_filePath, MessageChangeFileView::FILE_MINIMIZED,