mirror of
https://github.com/MaskRay/ccls.git
synced 2025-04-03 15:32:09 +00:00
Delete virtual bases Reader & Writer Delete unused MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY Merge serializers/{json,binary}.hh into serializer.{hh,cc} MAKE_REFLECT_STRUCT => REFLECT_STRUCT MAKE_REFLECT_TYPE_PROXY => REFLECT_UNDERLYING
36 lines
811 B
C++
36 lines
811 B
C++
// Copyright 2017-2018 ccls Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
#include "message_handler.hh"
|
|
#include "pipeline.hh"
|
|
#include "project.hh"
|
|
#include "sema_manager.hh"
|
|
#include "working_files.hh"
|
|
|
|
#include <queue>
|
|
#include <unordered_set>
|
|
|
|
namespace ccls {
|
|
namespace {
|
|
struct Param {
|
|
bool dependencies = true;
|
|
std::vector<std::string> whitelist;
|
|
std::vector<std::string> blacklist;
|
|
};
|
|
REFLECT_STRUCT(Param, dependencies, whitelist, blacklist);
|
|
} // namespace
|
|
|
|
void MessageHandler::ccls_reload(JsonReader &reader) {
|
|
Param param;
|
|
Reflect(reader, param);
|
|
// Send index requests for every file.
|
|
if (param.whitelist.empty() && param.blacklist.empty()) {
|
|
vfs->Clear();
|
|
db->clear();
|
|
project->Index(wfiles, RequestId());
|
|
manager->Clear();
|
|
return;
|
|
}
|
|
}
|
|
} // namespace ccls
|