// 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 #include namespace ccls { namespace { struct Param { bool dependencies = true; std::vector whitelist; std::vector blacklist; }; MAKE_REFLECT_STRUCT(Param, dependencies, whitelist, blacklist); } // namespace void MessageHandler::ccls_reload(Reader &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