logic: Refactored undo redo stack
* Store MessageActivateTokens instead of original view messages * Renamed FeatureController to ActivationController * Remove all non-activation messages from undo redo stack after reindexing project * Added MessageShowReference to undo redo stack * Added MessageScrollGraph for restoring graph view scroll position * Fixed MessageGraphNodeMove not saved for bundles * Refactored tokenIds and nodeNames in SearchMatch and MessageActivateTokens * Refactored SearchController * Fixed file expansion on undoing/redoing after switching code view mode * Fixed redundant graph animation due to present qualifier nodes * Fixed no restoring of graph node expansion when showing overview in between
This commit is contained in:
@@ -77,6 +77,16 @@ bool StorageAccessProxy::checkEdgeExists(Id edgeId) const
|
||||
return false;
|
||||
}
|
||||
|
||||
NameHierarchy StorageAccessProxy::getNameHierarchyForNodeWithId(Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getNameHierarchyForNodeWithId(id);
|
||||
}
|
||||
|
||||
return NameHierarchy();
|
||||
}
|
||||
|
||||
Node::NodeType StorageAccessProxy::getNodeTypeForNodeWithId(Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
@@ -95,24 +105,22 @@ bool StorageAccessProxy::checkNodeExistsByName(const std::string& serializedName
|
||||
return false;
|
||||
}
|
||||
|
||||
NameHierarchy StorageAccessProxy::getNameHierarchyForNodeWithId(Id id) const
|
||||
std::vector<NameHierarchy> StorageAccessProxy::getNameHierarchiesForNodeIds(const std::vector<Id> nodeIds) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getNameHierarchyForNodeWithId(id);
|
||||
return m_subject->getNameHierarchiesForNodeIds(nodeIds);
|
||||
}
|
||||
|
||||
return NameHierarchy();
|
||||
return std::vector<NameHierarchy>();
|
||||
}
|
||||
|
||||
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(const std::string& query) const
|
||||
std::vector<Id> StorageAccessProxy::getNodeIdsForNameHierarchies(const std::vector<NameHierarchy> nameHierarchies) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getAutocompletionMatches(query);
|
||||
return m_subject->getNodeIdsForNameHierarchies(nameHierarchies);
|
||||
}
|
||||
|
||||
return std::vector<SearchMatch>();
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenLocationCollection> StorageAccessProxy::getFullTextSearchLocations(
|
||||
@@ -126,6 +134,16 @@ std::shared_ptr<TokenLocationCollection> StorageAccessProxy::getFullTextSearchLo
|
||||
return std::make_shared<TokenLocationCollection>();
|
||||
}
|
||||
|
||||
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(const std::string& query) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getAutocompletionMatches(query);
|
||||
}
|
||||
|
||||
return std::vector<SearchMatch>();
|
||||
}
|
||||
|
||||
std::vector<SearchMatch> StorageAccessProxy::getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const
|
||||
{
|
||||
if (hasSubject())
|
||||
@@ -186,16 +204,6 @@ std::vector<Id> StorageAccessProxy::getLocalSymbolIdsForLocationIds(const std::v
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
std::vector<Id> StorageAccessProxy::getTokenIdsForMatches(const std::vector<SearchMatch>& matches) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getTokenIdsForMatches(matches);
|
||||
}
|
||||
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
Id StorageAccessProxy::getTokenIdForFileNode(const FilePath& filePath) const
|
||||
{
|
||||
if (hasSubject())
|
||||
|
||||
Reference in New Issue
Block a user