Browse Source

Rename message files (e.g. ccls_call_hierarchy.cc -> ccls_callHierarchy.cc)

pull/517/head
Fangrui Song 6 years ago
parent
commit
2682964039
  1. 44
      CMakeLists.txt
  2. 0
      src/messages/ccls_callHierarchy.cc
  3. 0
      src/messages/ccls_fileInfo.cc
  4. 0
      src/messages/ccls_freshenIndex.cc
  5. 0
      src/messages/ccls_inheritanceHierarchy.cc
  6. 0
      src/messages/ccls_memberHierarchy.cc
  7. 0
      src/messages/textDocument_codeLens.cc
  8. 0
      src/messages/textDocument_completion.cc
  9. 0
      src/messages/textDocument_definition.cc
  10. 0
      src/messages/textDocument_didChange.cc
  11. 0
      src/messages/textDocument_didClose.cc
  12. 0
      src/messages/textDocument_didOpen.cc
  13. 0
      src/messages/textDocument_didSave.cc
  14. 0
      src/messages/textDocument_documentHighlight.cc
  15. 34
      src/messages/textDocument_documentSymbol.cc
  16. 0
      src/messages/textDocument_hover.cc
  17. 0
      src/messages/textDocument_implementation.cc
  18. 0
      src/messages/textDocument_references.cc
  19. 0
      src/messages/textDocument_rename.cc
  20. 0
      src/messages/textDocument_signatureHelp.cc
  21. 0
      src/messages/textDocument_typeDefinition.cc
  22. 0
      src/messages/workspace_didChangeConfiguration.cc
  23. 0
      src/messages/workspace_didChangeWatchedFiles.cc
  24. 0
      src/messages/workspace_executeCommand.cc

44
CMakeLists.txt

@ -220,32 +220,32 @@ target_sources(ccls PRIVATE
target_sources(ccls PRIVATE target_sources(ccls PRIVATE
src/messages/ccls_base.cc src/messages/ccls_base.cc
src/messages/ccls_call_hierarchy.cc src/messages/ccls_callHierarchy.cc
src/messages/ccls_callers.cc src/messages/ccls_callers.cc
src/messages/ccls_file_info.cc src/messages/ccls_fileInfo.cc
src/messages/ccls_freshen_index.cc src/messages/ccls_freshenIndex.cc
src/messages/ccls_inheritance_hierarchy.cc src/messages/ccls_inheritanceHierarchy.cc
src/messages/ccls_member_hierarchy.cc src/messages/ccls_memberHierarchy.cc
src/messages/ccls_vars.cc src/messages/ccls_vars.cc
src/messages/exit.cc src/messages/exit.cc
src/messages/initialize.cc src/messages/initialize.cc
src/messages/shutdown.cc src/messages/shutdown.cc
src/messages/text_document_code_lens.cc src/messages/textDocument_codeLens.cc
src/messages/text_document_completion.cc src/messages/textDocument_completion.cc
src/messages/text_document_definition.cc src/messages/textDocument_definition.cc
src/messages/text_document_did_change.cc src/messages/textDocument_didChange.cc
src/messages/text_document_did_close.cc src/messages/textDocument_didClose.cc
src/messages/text_document_did_open.cc src/messages/textDocument_didOpen.cc
src/messages/text_document_did_save.cc src/messages/textDocument_didSave.cc
src/messages/text_document_document_highlight.cc src/messages/textDocument_documentHighlight.cc
src/messages/text_document_document_symbol.cc src/messages/textDocument_documentSymbol.cc
src/messages/text_document_hover.cc src/messages/textDocument_hover.cc
src/messages/text_document_implementation.cc src/messages/textDocument_implementation.cc
src/messages/text_document_references.cc src/messages/textDocument_references.cc
src/messages/text_document_rename.cc src/messages/textDocument_rename.cc
src/messages/text_document_signature_help.cc src/messages/textDocument_signatureHelp.cc
src/messages/text_document_type_definition.cc src/messages/textDocument_typeDefinition.cc
src/messages/workspace_did_change_configuration.cc src/messages/workspace_didChangeConfiguration.cc
src/messages/workspace_did_change_watched_files.cc src/messages/workspace_didChangeWatchedFiles.cc
src/messages/workspace_symbol.cc src/messages/workspace_symbol.cc
) )

0
src/messages/ccls_call_hierarchy.cc → src/messages/ccls_callHierarchy.cc

0
src/messages/ccls_file_info.cc → src/messages/ccls_fileInfo.cc

0
src/messages/ccls_freshen_index.cc → src/messages/ccls_freshenIndex.cc

0
src/messages/ccls_inheritance_hierarchy.cc → src/messages/ccls_inheritanceHierarchy.cc

0
src/messages/ccls_member_hierarchy.cc → src/messages/ccls_memberHierarchy.cc

0
src/messages/text_document_code_lens.cc → src/messages/textDocument_codeLens.cc

0
src/messages/text_document_completion.cc → src/messages/textDocument_completion.cc

0
src/messages/text_document_definition.cc → src/messages/textDocument_definition.cc

0
src/messages/text_document_did_change.cc → src/messages/textDocument_didChange.cc

0
src/messages/text_document_did_close.cc → src/messages/textDocument_didClose.cc

0
src/messages/text_document_did_open.cc → src/messages/textDocument_didOpen.cc

0
src/messages/text_document_did_save.cc → src/messages/textDocument_didSave.cc

0
src/messages/text_document_document_highlight.cc → src/messages/textDocument_documentHighlight.cc

34
src/messages/text_document_document_symbol.cc → src/messages/textDocument_documentSymbol.cc

@ -20,6 +20,21 @@ struct In_TextDocumentDocumentSymbol : public RequestInMessage {
MAKE_REFLECT_STRUCT(In_TextDocumentDocumentSymbol, id, params); MAKE_REFLECT_STRUCT(In_TextDocumentDocumentSymbol, id, params);
REGISTER_IN_MESSAGE(In_TextDocumentDocumentSymbol); REGISTER_IN_MESSAGE(In_TextDocumentDocumentSymbol);
struct lsSimpleLocation {
lsRange range;
};
MAKE_REFLECT_STRUCT(lsSimpleLocation, range);
struct lsSimpleSymbolInformation {
lsSimpleLocation location;
};
MAKE_REFLECT_STRUCT(lsSimpleSymbolInformation, location);
struct Out_SimpleDocumentSymbol
: public lsOutMessage<Out_SimpleDocumentSymbol> {
lsRequestId id;
std::vector<lsSimpleSymbolInformation> result;
};
MAKE_REFLECT_STRUCT(Out_SimpleDocumentSymbol, jsonrpc, id, result);
struct Out_TextDocumentDocumentSymbol struct Out_TextDocumentDocumentSymbol
: public lsOutMessage<Out_TextDocumentDocumentSymbol> { : public lsOutMessage<Out_TextDocumentDocumentSymbol> {
lsRequestId id; lsRequestId id;
@ -32,8 +47,6 @@ struct Handler_TextDocumentDocumentSymbol
MethodType GetMethodType() const override { return kMethodType; } MethodType GetMethodType() const override { return kMethodType; }
void Run(In_TextDocumentDocumentSymbol* request) override { void Run(In_TextDocumentDocumentSymbol* request) override {
auto& params = request->params; auto& params = request->params;
Out_TextDocumentDocumentSymbol out;
out.id = request->id;
QueryFile* file; QueryFile* file;
int file_id; int file_id;
@ -42,17 +55,17 @@ struct Handler_TextDocumentDocumentSymbol
return; return;
if (params.all) { if (params.all) {
Out_SimpleDocumentSymbol out;
out.id = request->id;
for (SymbolRef sym : file->def->all_symbols) for (SymbolRef sym : file->def->all_symbols)
if (std::optional<lsSymbolInformation> info =
GetSymbolInfo(db, working_files, sym, false)) {
if (std::optional<lsLocation> location = GetLsLocation( if (std::optional<lsLocation> location = GetLsLocation(
db, working_files, db, working_files,
Use{{sym.range, sym.usr, sym.kind, sym.role}, file_id})) { Use{{sym.range, sym.usr, sym.kind, sym.role}, file_id}))
info->location = *location; out.result.push_back({{location->range}});
out.result.push_back(*info); pipeline::WriteStdout(kMethodType, out);
}
}
} else { } else {
Out_TextDocumentDocumentSymbol out;
out.id = request->id;
for (SymbolRef sym : file->def->outline) for (SymbolRef sym : file->def->outline)
if (std::optional<lsSymbolInformation> info = if (std::optional<lsSymbolInformation> info =
GetSymbolInfo(db, working_files, sym, false)) { GetSymbolInfo(db, working_files, sym, false)) {
@ -69,10 +82,9 @@ struct Handler_TextDocumentDocumentSymbol
out.result.push_back(*info); out.result.push_back(*info);
} }
} }
}
pipeline::WriteStdout(kMethodType, out); pipeline::WriteStdout(kMethodType, out);
} }
}
}; };
REGISTER_MESSAGE_HANDLER(Handler_TextDocumentDocumentSymbol); REGISTER_MESSAGE_HANDLER(Handler_TextDocumentDocumentSymbol);
} // namespace } // namespace

0
src/messages/text_document_hover.cc → src/messages/textDocument_hover.cc

0
src/messages/text_document_implementation.cc → src/messages/textDocument_implementation.cc

0
src/messages/text_document_references.cc → src/messages/textDocument_references.cc

0
src/messages/text_document_rename.cc → src/messages/textDocument_rename.cc

0
src/messages/text_document_signature_help.cc → src/messages/textDocument_signatureHelp.cc

0
src/messages/text_document_type_definition.cc → src/messages/textDocument_typeDefinition.cc

0
src/messages/workspace_did_change_configuration.cc → src/messages/workspace_didChangeConfiguration.cc

0
src/messages/workspace_did_change_watched_files.cc → src/messages/workspace_didChangeWatchedFiles.cc

0
src/messages/workspace_execute_command.cc → src/messages/workspace_executeCommand.cc

Loading…
Cancel
Save