Lines Matching full:message
79 Marshaller::fromProtobuf(const LookupRequest *Message) {
81 auto IDs = getIDs(Message->ids());
89 Marshaller::fromProtobuf(const FuzzyFindRequest *Message) {
92 Result.Query = Message->query();
93 for (const auto &Scope : Message->scopes())
95 Result.AnyScope = Message->any_scope();
96 if (Message->limit())
97 Result.Limit = Message->limit();
98 Result.RestrictForCodeCompletion = Message->restricted_for_code_completion();
99 for (const auto &Path : Message->proximity_paths()) {
107 for (const auto &Type : Message->preferred_types())
113 Marshaller::fromProtobuf(const RefsRequest *Message) {
115 auto IDs = getIDs(Message->ids());
119 if (Message->has_filter())
120 Req.Filter = static_cast<clangd::RefKind>(Message->filter());
123 if (Message->limit())
124 Req.Limit = Message->limit();
125 Req.WantContainer = Message->want_container();
130 Marshaller::fromProtobuf(const ContainedRefsRequest *Message) {
132 if (!Message->has_id())
134 auto ID = SymbolID::fromStr(Message->id());
138 if (Message->has_limit())
139 Req.Limit = Message->limit();
144 Marshaller::fromProtobuf(const RelationsRequest *Message) {
146 auto IDs = getIDs(Message->subjects());
150 if (!Message->has_predicate())
152 Req.Predicate = static_cast<RelationKind>(Message->predicate());
153 if (Message->limit())
154 Req.Limit = Message->limit();
158 llvm::Expected<clangd::Symbol> Marshaller::fromProtobuf(const Symbol &Message) {
159 if (!Message.has_info() || !Message.has_canonical_declaration())
162 auto ID = SymbolID::fromStr(Message.id());
166 Result.SymInfo = fromProtobuf(Message.info());
167 Result.Name = Message.name();
168 Result.Scope = Message.scope();
169 if (Message.has_definition()) {
170 auto Definition = fromProtobuf(Message.definition());
174 auto Declaration = fromProtobuf(Message.canonical_declaration());
178 Result.References = Message.references();
181 Result.Signature = Message.signature();
182 Result.TemplateSpecializationArgs = Message.template_specialization_args();
183 Result.CompletionSnippetSuffix = Message.completion_snippet_suffix();
184 Result.Documentation = Message.documentation();
185 Result.ReturnType = Message.return_type();
186 Result.Type = Message.type();
187 for (const auto &Header : Message.headers()) {
193 Result.Flags = static_cast<clangd::Symbol::SymbolFlag>(Message.flags());
197 llvm::Expected<clangd::Ref> Marshaller::fromProtobuf(const Ref &Message) {
198 if (!Message.has_location())
201 auto Location = fromProtobuf(Message.location());
205 Result.Kind = static_cast<RefKind>(Message.kind());
210 Marshaller::fromProtobuf(const ContainedRef &Message) {
212 if (!Message.has_location())
214 if (!Message.has_kind())
216 if (!Message.has_symbol())
218 auto Location = fromProtobuf(Message.location());
222 Result.Kind = static_cast<RefKind>(Message.kind());
223 auto Symbol = SymbolID::fromStr(Message.symbol());
231 Marshaller::fromProtobuf(const Relation &Message) {
232 auto SubjectID = SymbolID::fromStr(Message.subject_id());
235 if (!Message.has_object())
237 auto Object = fromProtobuf(Message.object());
403 Marshaller::fromProtobuf(const Position &Message) {
405 Result.setColumn(static_cast<uint32_t>(Message.column()));
406 Result.setLine(static_cast<uint32_t>(Message.line()));
418 clang::index::SymbolInfo Marshaller::fromProtobuf(const SymbolInfo &Message) {
420 Result.Kind = static_cast<clang::index::SymbolKind>(Message.kind());
421 Result.SubKind = static_cast<clang::index::SymbolSubKind>(Message.subkind());
422 Result.Lang = static_cast<clang::index::SymbolLanguage>(Message.language());
424 static_cast<clang::index::SymbolPropertySet>(Message.properties());
438 Marshaller::fromProtobuf(const SymbolLocation &Message) {
440 auto URIString = relativePathToURI(Message.file_path());
444 Location.Start = fromProtobuf(Message.start());
445 Location.End = fromProtobuf(Message.end());
479 Marshaller::fromProtobuf(const HeaderWithReferences &Message) {
480 std::string Header = Message.header();
488 if (Message.has_supported_directives())
490 Message.supported_directives());
492 Strings.save(Header), Message.references(), Directives};