logic: rewrote messages handling token activation for correct restoring on undo

* saving search query to undo stack with MessageSearch
* saving node and edge with name to undo stack with MessageActivateNode and MessageActivateEdge
* added FeatureController that handels distribution of MessageActivateTokens
* clearing views when refreshing or changing project
* clearing undo stack when changing project
* added StorageCache derived from StorageAccessProxy
This commit is contained in:
Eberhard Graether
2015-06-19 00:20:50 +02:00
parent d6269f9608
commit a527a3c34d
47 changed files with 726 additions and 268 deletions
+23 -3
View File
@@ -41,6 +41,16 @@ Id StorageAccessProxy::getIdForNodeWithName(const std::string& name) const
return 0;
}
Id StorageAccessProxy::getIdForEdgeWithName(const std::string& name) const
{
if (hasSubject())
{
return m_subject->getIdForEdgeWithName(name);
}
return 0;
}
Node::NodeType StorageAccessProxy::getNodeTypeForNodeWithId(Id id) const
{
if(hasSubject())
@@ -92,14 +102,14 @@ std::vector<Id> StorageAccessProxy::getActiveTokenIdsForId(Id tokenId, Id* delca
return std::vector<Id>();
}
std::vector<Id> StorageAccessProxy::getActiveTokenIdsForLocationId(Id locationId) const
Id StorageAccessProxy::getActiveNodeIdForLocationId(Id locationId) const
{
if (hasSubject())
{
return m_subject->getActiveTokenIdsForLocationId(locationId);
return m_subject->getActiveNodeIdForLocationId(locationId);
}
return std::vector<Id>();
return 0;
}
std::vector<Id> StorageAccessProxy::getTokenIdsForQuery(std::string query) const
@@ -122,6 +132,16 @@ Id StorageAccessProxy::getTokenIdForFileNode(const FilePath& filePath) const
return 0;
}
std::vector<Id> StorageAccessProxy::getTokenIdsForAggregationEdge(Id aggregationId) const
{
if (hasSubject())
{
return m_subject->getTokenIdsForAggregationEdge(aggregationId);
}
return std::vector<Id>();
}
TokenLocationCollection StorageAccessProxy::getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const
{
if (hasSubject())