data: Set correct name delimiter per language in parsers
This commit is contained in:
@@ -10,9 +10,11 @@
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxCdb.h"
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/name/NameHierarchy.h"
|
||||
#include "data/parser/cxx/ASTActionFactory.h"
|
||||
#include "data/parser/cxx/CxxCompilationDatabaseSingle.h"
|
||||
#include "data/parser/cxx/CxxDiagnosticConsumer.h"
|
||||
#include "settings/LanguageType.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -67,6 +69,8 @@ CxxParser::~CxxParser()
|
||||
|
||||
void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand)
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(LANGUAGE_CPP));
|
||||
|
||||
clang::tooling::CompileCommand compileCommand;
|
||||
compileCommand.Filename = indexerCommand->getSourceFilePath().str();
|
||||
compileCommand.Directory = indexerCommand->getWorkingDirectory().str();
|
||||
@@ -97,6 +101,8 @@ void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand)
|
||||
|
||||
void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxManual> indexerCommand)
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(LANGUAGE_CPP));
|
||||
|
||||
std::shared_ptr<clang::tooling::CompilationDatabase> compilationDatabase = getCompilationDatabase(indexerCommand);
|
||||
|
||||
clang::tooling::ClangTool tool(*compilationDatabase, std::vector<std::string>(1, indexerCommand->getSourceFilePath().str()));
|
||||
@@ -116,6 +122,8 @@ void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxManual> indexerComma
|
||||
|
||||
void CxxParser::buildIndex(const std::string& fileName, std::shared_ptr<TextAccess> fileContent)
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(LANGUAGE_CPP));
|
||||
|
||||
std::shared_ptr<FilePathCache> canonicalFilePathCache = std::make_shared<FilePathCache>([](std::string fileName) -> FilePath
|
||||
{
|
||||
return FilePath(fileName).canonical();
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "data/name/NameHierarchy.h"
|
||||
#include "data/parser/java/JavaEnvironmentFactory.h"
|
||||
#include "data/parser/ParseLocation.h"
|
||||
#include "data/parser/ReferenceKind.h"
|
||||
#include "data/parser/ParserClient.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "settings/LanguageType.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
@@ -102,6 +104,8 @@ void JavaParser::buildIndex(
|
||||
const std::string& classPath,
|
||||
std::shared_ptr<TextAccess> textAccess)
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(LANGUAGE_JAVA));
|
||||
|
||||
if (m_javaEnvironment)
|
||||
{
|
||||
m_currentFilePath = sourceFilePath;
|
||||
|
||||
Reference in New Issue
Block a user