data: parsing file dependencies
This change adds the node NODE_FILE to the graph and the edge EDGE_INCLUDE, which determine the dependencies between files by parsing the include preprocessor directive. File nodes can be searched and displayed in the GraphView as file dependency graph. The filter "file" allows for selecting all files. The file depency information is used on project refresh do determine which files need to get reparsed.
This commit is contained in:
@@ -23,7 +23,6 @@ public:
|
||||
|
||||
virtual std::vector<Id> getActiveTokenIdsForId(Id tokenId, Id* declarationId) const = 0;
|
||||
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const = 0;
|
||||
virtual std::vector<Id> getLocationIdsForTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
||||
|
||||
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const = 0;
|
||||
};
|
||||
|
||||
@@ -89,16 +89,6 @@ std::vector<Id> GraphAccessProxy::getActiveTokenIdsForLocationId(Id locationId)
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
std::vector<Id> GraphAccessProxy::getLocationIdsForTokenIds(const std::vector<Id>& tokenIds) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getLocationIdsForTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
std::vector<Id> GraphAccessProxy::getTokenIdsForQuery(std::string query) const
|
||||
{
|
||||
if (hasSubject())
|
||||
|
||||
@@ -22,7 +22,6 @@ public:
|
||||
|
||||
virtual std::vector<Id> getActiveTokenIdsForId(Id tokenId, Id* declarationId) const;
|
||||
virtual std::vector<Id> getActiveTokenIdsForLocationId(Id locationId) const;
|
||||
virtual std::vector<Id> getLocationIdsForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
|
||||
virtual std::vector<Id> getTokenIdsForQuery(std::string query) const;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class LocationAccess
|
||||
{
|
||||
public:
|
||||
virtual ~LocationAccess();
|
||||
virtual TokenLocationCollection getTokenLocationsForLocationIds(const std::vector<Id>& locationIds) const = 0;
|
||||
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
||||
virtual TokenLocationFile getTokenLocationsForFile(const std::string& filePath) const = 0;
|
||||
virtual TokenLocationFile getTokenLocationsForLinesInFile(
|
||||
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
|
||||
|
||||
@@ -29,11 +29,11 @@ void LocationAccessProxy::setSubject(LocationAccess* subject)
|
||||
m_subject = subject;
|
||||
}
|
||||
|
||||
TokenLocationCollection LocationAccessProxy::getTokenLocationsForLocationIds(const std::vector<Id>& locationIds) const
|
||||
TokenLocationCollection LocationAccessProxy::getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getTokenLocationsForLocationIds(locationIds);
|
||||
return m_subject->getTokenLocationsForTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
return TokenLocationCollection();
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
void setSubject(LocationAccess* subject);
|
||||
|
||||
// LocationAccess implementation
|
||||
virtual TokenLocationCollection getTokenLocationsForLocationIds(const std::vector<Id>& locationIds) const;
|
||||
virtual TokenLocationCollection getTokenLocationsForTokenIds(const std::vector<Id>& tokenIds) const;
|
||||
virtual TokenLocationFile getTokenLocationsForFile(const std::string& filePath) const;
|
||||
virtual TokenLocationFile getTokenLocationsForLinesInFile(
|
||||
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
|
||||
|
||||
Reference in New Issue
Block a user