#pragma once #include "query_utils.h" #include "query.h" #include "working_files.h" #include optional GetDefinitionSpellingOfSymbol(QueryDatabase* db, const QueryTypeId& id); optional GetDefinitionSpellingOfSymbol(QueryDatabase* db, const QueryFuncId& id); optional GetDefinitionSpellingOfSymbol(QueryDatabase* db, const QueryVarId& id); optional GetDefinitionSpellingOfSymbol(QueryDatabase* db, const SymbolIdx& symbol); optional GetDefinitionExtentOfSymbol(QueryDatabase* db, const SymbolIdx& symbol); std::string GetHoverForSymbol(QueryDatabase* db, const SymbolIdx& symbol); optional GetDeclarationFileForSymbol(QueryDatabase* db, const SymbolIdx& symbol); std::vector ToQueryLocation(QueryDatabase* db, const std::vector& refs); std::vector ToQueryLocation(QueryDatabase* db, const std::vector& ids); std::vector ToQueryLocation(QueryDatabase* db, const std::vector& ids); std::vector ToQueryLocation(QueryDatabase* db, const std::vector& ids); std::vector GetUsesOfSymbol(QueryDatabase* db, const SymbolIdx& symbol); std::vector GetDeclarationsOfSymbolForGotoDefinition(QueryDatabase* db, const SymbolIdx& symbol); optional GetBaseDefinitionOrDeclarationSpelling(QueryDatabase* db, QueryFunc& func); std::vector GetCallersForAllBaseFunctions(QueryDatabase* db, QueryFunc& root); std::vector GetCallersForAllDerivedFunctions(QueryDatabase* db, QueryFunc& root); optional GetLsPosition(WorkingFile* working_file, const Position& position); optional GetLsRange(WorkingFile* working_file, const Range& location); lsDocumentUri GetLsDocumentUri(QueryDatabase* db, QueryFileId file_id, std::string* path); lsDocumentUri GetLsDocumentUri(QueryDatabase* db, QueryFileId file_id); optional GetLsLocation(QueryDatabase* db, WorkingFiles* working_files, const QueryLocation& location); NonElidedVector GetLsLocations(QueryDatabase* db, WorkingFiles* working_files, const std::vector& locations); // Returns a symbol. The symbol will have *NOT* have a location assigned. optional GetSymbolInfo(QueryDatabase* db, WorkingFiles* working_files, SymbolIdx symbol); struct CommonCodeLensParams { std::vector* result; QueryDatabase* db; WorkingFiles* working_files; WorkingFile* working_file; }; void AddCodeLens( const char* singular, const char* plural, CommonCodeLensParams* common, QueryLocation loc, const std::vector& uses, optional excluded, bool force_display); lsWorkspaceEdit BuildWorkspaceEdit(QueryDatabase* db, WorkingFiles* working_files, const std::vector& locations, const std::string& new_text); std::vector FindSymbolsAtLocation(WorkingFile* working_file, QueryFile* file, lsPosition position); NonElidedVector BuildParentTypeHierarchy(QueryDatabase* db, WorkingFiles* working_files, QueryTypeId root); optional BuildTypeHierarchy(QueryDatabase* db, WorkingFiles* working_files, QueryTypeId root_id); NonElidedVector BuildInitialCallTree(QueryDatabase* db, WorkingFiles* working_files, QueryFuncId root); NonElidedVector BuildExpandCallTree(QueryDatabase* db, WorkingFiles* working_files, QueryFuncId root);