utility: added FilePath abstraction and rewrote data management to use it

The utility class FilePath wraps an instance of boost::filesystem::path. Using FilePath allows for easy comparision of
file paths on different platforms using absolute or relative paths. Whereever file paths are compared, this wrapper
should be used.
This commit is contained in:
Eberhard Graether
2015-03-09 01:51:32 +01:00
parent 7014c8ac4c
commit df888e4151
37 changed files with 387 additions and 126 deletions
@@ -108,7 +108,7 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
for (CodeView::CodeSnippetParams& params : fileSnippets)
{
params.locationFile = m_locationAccess->getTokenLocationsForLinesInFile(
file->getFilePath(), params.startLineNumber, params.endLineNumber);
file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
}
if (declarationId != 0)
@@ -144,7 +144,7 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForFile(const TokenLocationFile* file) const
{
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(file->getFilePath());
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(file->getFilePath().str());
std::vector<std::pair<uint, uint>> ranges = getSnippetRangesForFile(file);
std::vector<CodeView::CodeSnippetParams> snippets;