Clang: Improve generated files handling

Generated files are referenced by the system collector directly to set the
unsaved files.

Change-Id: I24be3ee544b7824b8b0e518eafd409f32bd002ab
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-09-03 14:38:01 +02:00
parent 461d5b5d15
commit 2a30f0e5d6
27 changed files with 234 additions and 203 deletions

View File

@@ -31,6 +31,7 @@
#include <connectionserver.h>
#include <filepathcaching.h>
#include <generatedfiles.h>
#include <refactoringserver.h>
#include <refactoringclientproxy.h>
#include <symbolindexing.h>
@@ -42,6 +43,7 @@
using namespace std::chrono_literals;
using ClangBackEnd::FilePathCaching;
using ClangBackEnd::GeneratedFiles;
using ClangBackEnd::RefactoringClientProxy;
using ClangBackEnd::RefactoringServer;
using ClangBackEnd::RefactoringDatabaseInitializer;
@@ -100,8 +102,9 @@ int main(int argc, char *argv[])
Sqlite::Database database{Utils::PathString{databasePath}, 100000ms};
RefactoringDatabaseInitializer<Sqlite::Database> databaseInitializer{database};
FilePathCaching filePathCache{database};
SymbolIndexing symbolIndexing{database, filePathCache};
RefactoringServer clangCodeModelServer{symbolIndexing, filePathCache};
GeneratedFiles generatedFiles;
SymbolIndexing symbolIndexing{database, filePathCache, generatedFiles};
RefactoringServer clangCodeModelServer{symbolIndexing, filePathCache, generatedFiles};
ConnectionServer<RefactoringServer, RefactoringClientProxy> connectionServer;
connectionServer.setServer(&clangCodeModelServer);
connectionServer.start(connectionName);