logic: fix update of Java indexer to new version of Java dependencies
* reapplied previous reverts * added cache for TypeSolvers in Java code
This commit is contained in:
@@ -8,6 +8,7 @@ add_files(
|
||||
data/indexer/IndexerCommandCxxCdb.h
|
||||
data/indexer/IndexerCommandCxxManual.cpp
|
||||
data/indexer/IndexerCommandCxxManual.h
|
||||
data/indexer/IndexerCxx.h
|
||||
data/indexer/IndexerFactoryModuleCxxCdb.cpp
|
||||
data/indexer/IndexerFactoryModuleCxxCdb.h
|
||||
data/indexer/IndexerFactoryModuleCxxManual.cpp
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef INDEXER_CXX_H
|
||||
#define INDEXER_CXX_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "data/indexer/Indexer.h"
|
||||
#include "data/parser/ParserClientImpl.h"
|
||||
#include "utility/file/FileRegister.h"
|
||||
|
||||
template <typename IndexerCommandType, typename ParserType>
|
||||
class IndexerCxx: public Indexer<IndexerCommandType>
|
||||
{
|
||||
public:
|
||||
virtual ~IndexerCxx();
|
||||
|
||||
virtual std::shared_ptr<IntermediateStorage> doIndex(
|
||||
std::shared_ptr<IndexerCommandType> indexerCommand,
|
||||
std::shared_ptr<FileRegister> fileRegister);
|
||||
};
|
||||
|
||||
template <typename IndexerCommandType, typename ParserType>
|
||||
IndexerCxx<IndexerCommandType, ParserType>::~IndexerCxx()
|
||||
{
|
||||
}
|
||||
|
||||
template <typename IndexerCommandType, typename ParserType>
|
||||
std::shared_ptr<IntermediateStorage> IndexerCxx<IndexerCommandType, ParserType>::doIndex(
|
||||
std::shared_ptr<IndexerCommandType> indexerCommand,
|
||||
std::shared_ptr<FileRegister> fileRegister)
|
||||
{
|
||||
std::shared_ptr<ParserClientImpl> parserClient = std::make_shared<ParserClientImpl>();
|
||||
|
||||
std::shared_ptr<ParserType> parser = std::make_shared<ParserType>(parserClient, fileRegister);
|
||||
|
||||
std::shared_ptr<IntermediateStorage> storage = std::make_shared<IntermediateStorage>();
|
||||
parserClient->setStorage(storage);
|
||||
|
||||
parser->buildIndex(indexerCommand);
|
||||
|
||||
parserClient->resetStorage();
|
||||
|
||||
if (parserClient->hasFatalErrors() || indexerCommand->preprocessorOnly())
|
||||
{
|
||||
storage->setAllFilesIncomplete();
|
||||
}
|
||||
else
|
||||
{
|
||||
storage->setFilesWithErrorsIncomplete();
|
||||
fileRegister->markIndexingFilesIndexed();
|
||||
}
|
||||
|
||||
if (interrupted())
|
||||
{
|
||||
return std::shared_ptr<IntermediateStorage>();
|
||||
}
|
||||
|
||||
return storage;
|
||||
}
|
||||
|
||||
#endif // INDEXER_CXX_H
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "data/indexer/IndexerFactoryModuleCxxCdb.h"
|
||||
|
||||
#include "data/indexer/Indexer.h"
|
||||
#include "data/indexer/IndexerCxx.h"
|
||||
#include "data/indexer/IndexerCommandCxxCdb.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
|
||||
@@ -10,5 +10,5 @@ IndexerFactoryModuleCxxCdb::~IndexerFactoryModuleCxxCdb()
|
||||
|
||||
std::shared_ptr<IndexerBase> IndexerFactoryModuleCxxCdb::createIndexer()
|
||||
{
|
||||
return std::make_shared<Indexer<IndexerCommandCxxCdb, CxxParser>>();
|
||||
return std::make_shared<IndexerCxx<IndexerCommandCxxCdb, CxxParser>>();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "data/indexer/IndexerFactoryModuleCxxManual.h"
|
||||
|
||||
#include "data/indexer/Indexer.h"
|
||||
#include "data/indexer/IndexerCxx.h"
|
||||
#include "data/indexer/IndexerCommandCxxManual.h"
|
||||
#include "data/parser/cxx/CxxParser.h"
|
||||
|
||||
@@ -10,5 +10,5 @@ IndexerFactoryModuleCxxManual::~IndexerFactoryModuleCxxManual()
|
||||
|
||||
std::shared_ptr<IndexerBase> IndexerFactoryModuleCxxManual::createIndexer()
|
||||
{
|
||||
return std::make_shared<Indexer<IndexerCommandCxxManual, CxxParser>>();
|
||||
return std::make_shared<IndexerCxx<IndexerCommandCxxManual, CxxParser>>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user