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
+4 -1
View File
@@ -109,6 +109,8 @@ public:
// StorageAccess implementation
virtual Id getIdForNodeWithName(const std::string& fullName) const;
virtual Id getIdForEdgeWithName(const std::string& name) const;
virtual std::string getNameForNodeWithId(Id id) const;
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const;
virtual std::vector<SearchMatch> getAutocompletionMatches(
@@ -117,10 +119,11 @@ public:
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const;
virtual std::vector<Id> getActiveTokenIdsForId(Id tokenId, Id* declarationId) const;
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const;
virtual Id getActiveNodeIdForLocationId(Id locationId) const;
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const;
virtual Id getTokenIdForFileNode(const FilePath& filePath) const;
virtual std::vector<Id> getTokenIdsForAggregationEdge(Id aggregationId) const;
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const;
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const;