src: harmonized indexer command names
* some parts of the indexer were called "manual" while others used the name "empty". renamed everything that was called "manual" to "empty" to conform to names in GUI
This commit is contained in:
@@ -6,13 +6,13 @@ add_files(
|
||||
data/indexer/IndexerCommandCxx.h
|
||||
data/indexer/IndexerCommandCxxCdb.cpp
|
||||
data/indexer/IndexerCommandCxxCdb.h
|
||||
data/indexer/IndexerCommandCxxManual.cpp
|
||||
data/indexer/IndexerCommandCxxManual.h
|
||||
data/indexer/IndexerCommandCxxEmpty.cpp
|
||||
data/indexer/IndexerCommandCxxEmpty.h
|
||||
data/indexer/IndexerCxx.h
|
||||
data/indexer/IndexerFactoryModuleCxxCdb.cpp
|
||||
data/indexer/IndexerFactoryModuleCxxCdb.h
|
||||
data/indexer/IndexerFactoryModuleCxxManual.cpp
|
||||
data/indexer/IndexerFactoryModuleCxxManual.h
|
||||
data/indexer/IndexerFactoryModuleCxxEmpty.cpp
|
||||
data/indexer/IndexerFactoryModuleCxxEmpty.h
|
||||
|
||||
data/parser/cxx/name/CxxDeclName.cpp
|
||||
data/parser/cxx/name/CxxDeclName.h
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
|
||||
IndexerCommandType IndexerCommandCxxManual::getStaticIndexerCommandType()
|
||||
IndexerCommandType IndexerCommandCxxEmpty::getStaticIndexerCommandType()
|
||||
{
|
||||
return INDEXER_COMMAND_CXX_MANUAL;
|
||||
return INDEXER_COMMAND_CXX_EMPTY;
|
||||
}
|
||||
|
||||
IndexerCommandCxxManual::IndexerCommandCxxManual(
|
||||
IndexerCommandCxxEmpty::IndexerCommandCxxEmpty(
|
||||
const FilePath& sourceFilePath,
|
||||
const std::set<FilePath>& indexedPaths,
|
||||
const std::set<FilePath>& excludedPaths,
|
||||
@@ -19,17 +19,17 @@ IndexerCommandCxxManual::IndexerCommandCxxManual(
|
||||
{
|
||||
}
|
||||
|
||||
IndexerCommandType IndexerCommandCxxManual::getIndexerCommandType() const
|
||||
IndexerCommandType IndexerCommandCxxEmpty::getIndexerCommandType() const
|
||||
{
|
||||
return getStaticIndexerCommandType();
|
||||
}
|
||||
|
||||
size_t IndexerCommandCxxManual::getByteSize(size_t stringSize) const
|
||||
size_t IndexerCommandCxxEmpty::getByteSize(size_t stringSize) const
|
||||
{
|
||||
return IndexerCommandCxx::getByteSize(stringSize) + m_languageStandard.size();
|
||||
}
|
||||
|
||||
std::string IndexerCommandCxxManual::getLanguageStandard() const
|
||||
std::string IndexerCommandCxxEmpty::getLanguageStandard() const
|
||||
{
|
||||
return m_languageStandard;
|
||||
}
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
#ifndef INDEXER_COMMAND_CXX_MANUAL_H
|
||||
#define INDEXER_COMMAND_CXX_MANUAL_H
|
||||
#ifndef INDEXER_COMMAND_CXX_EMPTY_H
|
||||
#define INDEXER_COMMAND_CXX_EMPTY_H
|
||||
|
||||
#include "data/indexer/IndexerCommandCxx.h"
|
||||
|
||||
class FilePath;
|
||||
|
||||
class IndexerCommandCxxManual
|
||||
class IndexerCommandCxxEmpty
|
||||
: public IndexerCommandCxx
|
||||
{
|
||||
public:
|
||||
static IndexerCommandType getStaticIndexerCommandType();
|
||||
|
||||
IndexerCommandCxxManual(
|
||||
IndexerCommandCxxEmpty(
|
||||
const FilePath& sourceFilePath,
|
||||
const std::set<FilePath>& indexedPaths,
|
||||
const std::set<FilePath>& excludedPaths,
|
||||
@@ -29,4 +29,4 @@ private:
|
||||
std::string m_languageStandard;
|
||||
};
|
||||
|
||||
#endif // INDEXER_COMMAND_CXX_MANUAL_H
|
||||
#endif // INDEXER_COMMAND_CXX_EMPTY_H
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "data/indexer/IndexerFactoryModuleCxxEmpty.h"
|
||||
|
||||
#include "data/indexer/IndexerCxx.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
|
||||
std::shared_ptr<IndexerBase> IndexerFactoryModuleCxxEmpty::createIndexer()
|
||||
{
|
||||
return std::make_shared<IndexerCxx<IndexerCommandCxxEmpty, CxxParser>>();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef INDEXER_FACTORY_MODULE_CXX_EMPTY_H
|
||||
#define INDEXER_FACTORY_MODULE_CXX_EMPTY_H
|
||||
|
||||
#include "data/indexer/IndexerFactoryModule.h"
|
||||
|
||||
class IndexerFactoryModuleCxxEmpty: public IndexerFactoryModule
|
||||
{
|
||||
public:
|
||||
virtual std::shared_ptr<IndexerBase> createIndexer();
|
||||
};
|
||||
|
||||
#endif // INDEXER_FACTORY_MODULE_CXX_EMPTY_H
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "data/indexer/IndexerFactoryModuleCxxManual.h"
|
||||
|
||||
#include "data/indexer/IndexerCxx.h"
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
|
||||
std::shared_ptr<IndexerBase> IndexerFactoryModuleCxxManual::createIndexer()
|
||||
{
|
||||
return std::make_shared<IndexerCxx<IndexerCommandCxxManual, CxxParser>>();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef INDEXER_FACTORY_MODULE_CXX_MANUAL_H
|
||||
#define INDEXER_FACTORY_MODULE_CXX_MANUAL_H
|
||||
|
||||
#include "data/indexer/IndexerFactoryModule.h"
|
||||
|
||||
class IndexerFactoryModuleCxxManual: public IndexerFactoryModule
|
||||
{
|
||||
public:
|
||||
virtual std::shared_ptr<IndexerBase> createIndexer();
|
||||
};
|
||||
|
||||
#endif // INDEXER_FACTORY_MODULE_CXX_MANUAL_H
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "utility/text/TextAccess.h"
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxCdb.h"
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/parser/cxx/ASTActionFactory.h"
|
||||
#include "data/parser/cxx/CanonicalFilePathCache.h"
|
||||
#include "data/parser/cxx/CxxCompilationDatabaseSingle.h"
|
||||
@@ -83,7 +83,7 @@ void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand)
|
||||
runTool(&compilationDatabase, indexerCommand->getSourceFilePath());
|
||||
}
|
||||
|
||||
void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxManual> indexerCommand)
|
||||
void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand)
|
||||
{
|
||||
std::shared_ptr<clang::tooling::CompilationDatabase> compilationDatabase = getCompilationDatabase(indexerCommand);
|
||||
|
||||
@@ -163,7 +163,7 @@ std::vector<std::string> CxxParser::getCommandlineArgumentsEssential(
|
||||
return args;
|
||||
}
|
||||
|
||||
std::vector<std::string> CxxParser::getCommandlineArguments(std::shared_ptr<IndexerCommandCxxManual> indexerCommand) const
|
||||
std::vector<std::string> CxxParser::getCommandlineArguments(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand) const
|
||||
{
|
||||
std::vector<std::string> args = getCommandlineArgumentsEssential(
|
||||
indexerCommand->getCompilerFlags(), indexerCommand->getSystemHeaderSearchPaths(), indexerCommand->getFrameworkSearchPaths()
|
||||
@@ -177,7 +177,7 @@ std::vector<std::string> CxxParser::getCommandlineArguments(std::shared_ptr<Inde
|
||||
}
|
||||
|
||||
std::shared_ptr<clang::tooling::FixedCompilationDatabase> CxxParser::getCompilationDatabase(
|
||||
std::shared_ptr<IndexerCommandCxxManual> indexerCommand
|
||||
std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand
|
||||
) const {
|
||||
// Commandline flags passed to the programm. Everything after '--' will be interpreted by the ClangTool.
|
||||
std::vector<std::string> args = getCommandlineArguments(indexerCommand);
|
||||
|
||||
@@ -8,7 +8,7 @@ class CxxDiagnosticConsumer;
|
||||
class FilePath;
|
||||
class FileRegister;
|
||||
class IndexerCommandCxxCdb;
|
||||
class IndexerCommandCxxManual;
|
||||
class IndexerCommandCxxEmpty;
|
||||
class TaskParseCxx;
|
||||
|
||||
namespace clang {
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
~CxxParser();
|
||||
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand);
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxManual> indexerCommand);
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand);
|
||||
void buildIndex(const std::string& fileName, std::shared_ptr<TextAccess> fileContent);
|
||||
|
||||
private:
|
||||
@@ -35,8 +35,8 @@ private:
|
||||
const std::vector<std::string>& compilerFlags,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths) const;
|
||||
std::vector<std::string> getCommandlineArguments(std::shared_ptr<IndexerCommandCxxManual> indexerCommand) const;
|
||||
std::shared_ptr<clang::tooling::FixedCompilationDatabase> getCompilationDatabase(std::shared_ptr<IndexerCommandCxxManual> indexerCommand) const;
|
||||
std::vector<std::string> getCommandlineArguments(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand) const;
|
||||
std::shared_ptr<clang::tooling::FixedCompilationDatabase> getCompilationDatabase(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand) const;
|
||||
|
||||
std::shared_ptr<CxxDiagnosticConsumer> getDiagnostics(std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache, bool logErrors) const;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "clang/Tooling/CompilationDatabase.h"
|
||||
#include "clang/Tooling/JSONCompilationDatabase.h"
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/indexer/IndexerCommandCxxCdb.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/file/FileManager.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "project/SourceGroupCxxEmpty.h"
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/utility.h"
|
||||
|
||||
@@ -58,7 +58,7 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
|
||||
{
|
||||
if (filesToIndex.find(sourcePath) != filesToIndex.end())
|
||||
{
|
||||
indexerCommands.push_back(std::make_shared<IndexerCommandCxxManual>(
|
||||
indexerCommands.push_back(std::make_shared<IndexerCommandCxxEmpty>(
|
||||
sourcePath,
|
||||
indexedPaths,
|
||||
excludedPaths,
|
||||
|
||||
Reference in New Issue
Block a user