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:
+2
-2
@@ -6,7 +6,7 @@
|
||||
#include "data/indexer/IndexerFactory.h"
|
||||
#include "data/indexer/IndexerFactoryModuleJava.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxCdb.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxManual.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxEmpty.h"
|
||||
#include "LicenseChecker.h"
|
||||
#include "project/SourceGroupFactory.h"
|
||||
#include "project/SourceGroupFactoryModuleCxx.h"
|
||||
@@ -170,7 +170,7 @@ void addLanguageModules()
|
||||
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleJava>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxCdb>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxManual>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxEmpty>());
|
||||
}
|
||||
|
||||
QCoreApplication* createApplication(int &argc, char *argv[], bool noGUI = false)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "data/indexer/IndexerFactory.h"
|
||||
#include "data/indexer/IndexerFactoryModuleJava.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxCdb.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxManual.h"
|
||||
#include "data/indexer/IndexerFactoryModuleCxxEmpty.h"
|
||||
#include "data/indexer/interprocess/InterprocessIndexer.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/AppPath.h"
|
||||
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleJava>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxCdb>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxManual>());
|
||||
IndexerFactory::getInstance()->addModule(std::make_shared<IndexerFactoryModuleCxxEmpty>());
|
||||
|
||||
InterprocessIndexer indexer(instanceUuid, processId);
|
||||
indexer.work();
|
||||
|
||||
@@ -4,8 +4,8 @@ std::string indexerCommandTypeToString(IndexerCommandType type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case INDEXER_COMMAND_CXX_MANUAL:
|
||||
return "indexer command cxx manual";
|
||||
case INDEXER_COMMAND_CXX_EMPTY:
|
||||
return "indexer command cxx empty";
|
||||
case INDEXER_COMMAND_CXX_CDB:
|
||||
return "indexer command cxx cdb";
|
||||
case INDEXER_COMMAND_JAVA:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
enum IndexerCommandType
|
||||
{
|
||||
INDEXER_COMMAND_UNKNOWN,
|
||||
INDEXER_COMMAND_CXX_MANUAL,
|
||||
INDEXER_COMMAND_CXX_EMPTY,
|
||||
INDEXER_COMMAND_CXX_CDB,
|
||||
INDEXER_COMMAND_JAVA,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "SharedIndexerCommand.h"
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxCdb.h"
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/indexer/IndexerCommandJava.h"
|
||||
|
||||
#include "utility/logging/logging.h"
|
||||
@@ -22,11 +22,11 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
|
||||
}
|
||||
else if (dynamic_cast<IndexerCommandCxxManual*>(indexerCommand) != NULL)
|
||||
else if (dynamic_cast<IndexerCommandCxxEmpty*>(indexerCommand) != NULL)
|
||||
{
|
||||
IndexerCommandCxxManual* cmd = dynamic_cast<IndexerCommandCxxManual*>(indexerCommand);
|
||||
IndexerCommandCxxEmpty* cmd = dynamic_cast<IndexerCommandCxxEmpty*>(indexerCommand);
|
||||
|
||||
setType(CXX_MANUAL);
|
||||
setType(CXX_EMPTY);
|
||||
setLanguageStandard(cmd->getLanguageStandard());
|
||||
setCompilerFlags(cmd->getCompilerFlags());
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
@@ -63,9 +63,9 @@ std::shared_ptr<IndexerCommand> SharedIndexerCommand::fromShared(const SharedInd
|
||||
);
|
||||
return command;
|
||||
}
|
||||
else if (indexerCommand.getType() == CXX_MANUAL)
|
||||
else if (indexerCommand.getType() == CXX_EMPTY)
|
||||
{
|
||||
std::shared_ptr<IndexerCommand> command = std::make_shared<IndexerCommandCxxManual>(
|
||||
std::shared_ptr<IndexerCommand> command = std::make_shared<IndexerCommandCxxEmpty>(
|
||||
indexerCommand.getSourceFilePath(),
|
||||
indexerCommand.getIndexedPaths(),
|
||||
indexerCommand.getExcludedPaths(),
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
CXX_CDB,
|
||||
CXX_MANUAL,
|
||||
CXX_EMPTY,
|
||||
JAVA
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
#include "helper/DumpParserClient.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
|
||||
CxxParser parser(parserClient, fileRegister);
|
||||
|
||||
std::shared_ptr<IndexerCommandCxxManual> command = std::make_shared<IndexerCommandCxxManual>(
|
||||
std::shared_ptr<IndexerCommandCxxEmpty> command = std::make_shared<IndexerCommandCxxEmpty>(
|
||||
sourceFilePath,
|
||||
indexedPaths,
|
||||
excludedPaths,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "utility/utility.h"
|
||||
#include "utility/utilityString.h"
|
||||
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/indexer/IndexerCommandCxxEmpty.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
|
||||
#include "helper/TestFileRegister.h"
|
||||
@@ -3970,7 +3970,7 @@ public:
|
||||
std::set<FilePath> indexedPaths;
|
||||
indexedPaths.insert(FilePath("data/CxxParserTestSuite/"));
|
||||
|
||||
std::shared_ptr<IndexerCommandCxxManual> indexerCommand = std::make_shared<IndexerCommandCxxManual>(
|
||||
std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand = std::make_shared<IndexerCommandCxxEmpty>(
|
||||
FilePath("data/CxxParserTestSuite/code.cpp"),
|
||||
indexedPaths,
|
||||
std::set<FilePath>(),
|
||||
|
||||
Reference in New Issue
Block a user