src: Refactored TokenLocation classes to SourceLocation classes
* Removed TokenLocationLine * decoupled TokenLocationFile from TokenLocationCollection * save vector of Token ids to SourceLocation * refactored SourceLocationFile::getFilteredByLines() * refactored snippet creation
This commit is contained in:
@@ -33,7 +33,7 @@ public:
|
||||
virtual StorageEdge getEdgeById(Id edgeId) const;
|
||||
virtual bool checkEdgeExists(Id edgeId) const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getFullTextSearchLocations(
|
||||
virtual std::shared_ptr<SourceLocationCollection> getFullTextSearchLocations(
|
||||
const std::string& searchTerm, bool caseSensitive) const;
|
||||
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const;
|
||||
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
@@ -44,18 +44,18 @@ public:
|
||||
virtual std::vector<Id> getActiveTokenIdsForId(Id tokenId, Id* declarationId) const;
|
||||
virtual std::vector<Id> getNodeIdsForLocationIds(const std::vector<Id>& locationIds) const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getTokenLocationsForTokenIds(
|
||||
virtual std::shared_ptr<SourceLocationCollection> getSourceLocationsForTokenIds(
|
||||
const std::vector<Id>& tokenIds
|
||||
) const;
|
||||
virtual std::shared_ptr<TokenLocationCollection> getTokenLocationsForLocationIds(
|
||||
virtual std::shared_ptr<SourceLocationCollection> getSourceLocationsForLocationIds(
|
||||
const std::vector<Id>& locationIds
|
||||
) const;
|
||||
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const;
|
||||
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForLinesInFile(
|
||||
virtual std::shared_ptr<SourceLocationFile> getSourceLocationsForFile(const FilePath& filePath) const;
|
||||
virtual std::shared_ptr<SourceLocationFile> getSourceLocationsForLinesInFile(
|
||||
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
|
||||
) const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationFile> getCommentLocationsInFile(const FilePath& filePath) const;
|
||||
virtual std::shared_ptr<SourceLocationFile> getCommentLocationsInFile(const FilePath& filePath) const;
|
||||
|
||||
virtual std::shared_ptr<TextAccess> getFileContent(const FilePath& filePath) const;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
virtual ErrorCountInfo getErrorCount() const;
|
||||
virtual std::vector<ErrorInfo> getErrors() const;
|
||||
|
||||
virtual std::shared_ptr<TokenLocationCollection> getErrorTokenLocations(std::vector<ErrorInfo>* errors) const;
|
||||
virtual std::shared_ptr<SourceLocationCollection> getErrorSourceLocations(std::vector<ErrorInfo>* errors) const;
|
||||
|
||||
virtual Id addNodeBookmark(const NodeBookmark& bookmark);
|
||||
virtual Id addEdgeBookmark(const EdgeBookmark& bookmark);
|
||||
|
||||
Reference in New Issue
Block a user