logic: Showing annotations in fulltext search results

* new LocationType for errors
* refactored CodeController
* cache active locations in CodeController for later manipulations
This commit is contained in:
Eberhard Graether
2016-06-08 20:33:34 +02:00
parent c6fa1f0969
commit 5173400b8d
19 changed files with 184 additions and 213 deletions
+10 -9
View File
@@ -23,6 +23,7 @@
#include "component/view/CodeView.h"
class StorageAccess;
class TokenLocation;
class TokenLocationCollection;
class TokenLocationFile;
@@ -64,23 +65,23 @@ private:
std::vector<CodeSnippetParams> getSnippetsForActiveTokenLocations(
const TokenLocationCollection* collection, Id declarationId) const;
std::vector<CodeSnippetParams> getSnippetsForActiveTokenLocationsInFile(
std::shared_ptr<TokenLocationFile>) const;
std::vector<CodeSnippetParams> getSnippetsForCollection(
std::shared_ptr<TokenLocationCollection> collection, bool addTokenLocations = false) const;
std::vector<CodeSnippetParams> getSnippetsForFile(
std::shared_ptr<TokenLocationFile> activeTokenLocations, std::shared_ptr<TokenLocationFile> fileLocations) const;
std::vector<CodeSnippetParams> getSnippetsForFile(std::shared_ptr<TokenLocationFile> file) const;
std::vector<CodeSnippetParams> getSnippetsForFullTextSearch(const std::string& searchTerm, bool caseSensitive) const;
std::shared_ptr<SnippetMerger> buildMergerHierarchy(
TokenLocation* location, std::shared_ptr<TokenLocationFile> context, SnippetMerger& fileScopedMerger, std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const;
std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(const TokenLocation* location, std::shared_ptr<TokenLocationFile> context) const;
std::shared_ptr<TokenLocationFile> file, bool addTokenLocations = false) const;
std::vector<CodeSnippetParams> getSnippetsForErrorLocations(std::vector<ErrorInfo>* errors) const;
std::shared_ptr<SnippetMerger> buildMergerHierarchy(
TokenLocation* location, std::shared_ptr<TokenLocationFile> context, SnippetMerger& fileScopedMerger,
std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const;
std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(
const TokenLocation* location, std::shared_ptr<TokenLocationFile> context) const;
std::vector<std::string> getProjectDescription(TokenLocationFile* locationFile) const;
void addModificationTimes(std::vector<CodeSnippetParams>& snippets) const;
StorageAccess* m_storageAccess;
mutable std::shared_ptr<TokenLocationCollection> m_collection;
};
#endif // CODE_CONTROLLER_H