ui/logic/data: refreshing only source files that have been updated

This change adds the refresh component that allows for refreshing the source code via UI or shortcut. If automatic
refreshing is activated via the UI, the code is refreshed anytime the window gets focus. The contents of all the
updated source files get removed from Storage, before reparsing them. File dependencies are not respected yet.
This commit is contained in:
Eberhard Graether
2015-02-03 14:27:39 +01:00
parent e17341fc43
commit 1690479b0e
52 changed files with 1145 additions and 92 deletions
+8 -1
View File
@@ -22,15 +22,21 @@ public:
SearchNode(SearchNode* parent, const std::string& name, Id nameId);
~SearchNode();
size_t getNodeCount() const;
const std::string& getName() const;
std::vector<std::string> getNameHierarchy() const;
std::string getFullName() const;
Id getNameId() const;
std::deque<Id> getNameIdsRecursive() const;
Id getFirstTokenId() const;
const std::set<Id>& getTokenIds() const;
bool hasTokenIdsRecursive() const;
void addTokenId(Id tokenId);
void removeTokenId(Id tokenId);
SearchNode* getParent() const;
std::deque<SearchNode*> getParentsWithoutTokenId();
@@ -46,11 +52,12 @@ private:
typedef std::multimap<size_t, const SearchNode*> FuzzyMap;
typedef FuzzyMap::const_iterator FuzzyMapIterator;
// Accessed by SearchIndex
std::shared_ptr<SearchNode> addNodeRecursive(std::deque<Id>* nameIds, const Dictionary& dictionary);
std::shared_ptr<SearchNode> getNodeRecursive(std::deque<Id>* nameIds) const;
void removeSearchNode(SearchNode* node);
SearchMatch fuzzyMatchData(const std::string& query, const SearchNode* parent) const;
friend class SearchIndex;