rename recordCommentLocation to recordAtomicSourceRange

This is done because the feature can be useful for all kind of multi-line symbols that should not be split being part of a code snippet.
This commit is contained in:
mlangkabel
2019-02-26 17:12:18 +01:00
parent b8664ce131
commit 3b76c403dc
8 changed files with 27 additions and 24 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ namespace sourcetrail
LocationKind::QUALIFIER,
LocationKind::LOCAL_SYMBOL,
LocationKind::SIGNATURE,
LocationKind::COMMENT,
LocationKind::ATOMIC_RANGE,
LocationKind::INDEXER_ERROR,
LocationKind::FULLTEXT_SEARCH,
LocationKind::SCREEN_SEARCH
+8 -8
View File
@@ -541,23 +541,23 @@ namespace sourcetrail
}
}
bool SourcetrailDBWriter::recordCommentLocation(const SourceRange& location)
bool SourcetrailDBWriter::recordAtomicSourceRange(const SourceRange& sourceRange)
{
if (!m_storage)
{
m_lastError = "Unable to record comment location, because no database is currently open.";
m_lastError = "Unable to record atomic source range, because no database is currently open.";
return false;
}
try
{
const int sourceLocationId = m_storage->addSourceLocation(StorageSourceLocationData(
location.fileId,
location.startLine,
location.startColumn,
location.endLine,
location.endColumn,
locationKindToInt(LocationKind::COMMENT)
sourceRange.fileId,
sourceRange.startLine,
sourceRange.startColumn,
sourceRange.endLine,
sourceRange.endColumn,
locationKindToInt(LocationKind::ATOMIC_RANGE)
));
return true;