MCPcopy Create free account
hub / github.com/SpartanJ/eepp / parseWorkSpaceEdit

Function parseWorkSpaceEdit

src/tools/ecode/plugins/lsp/lspclientserver.cpp:623–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623static LSPWorkspaceEdit parseWorkSpaceEdit( const json& result ) {
624 LSPWorkspaceEdit ret;
625 if ( result.contains( "changes" ) ) {
626 auto& changes = result.at( "changes" );
627 for ( auto it = changes.begin(); it != changes.end(); ++it ) {
628 ret.changes.insert( std::pair<URI, std::vector<LSPTextEdit>>(
629 URI( it.key() ), parseTextEditArray( it.value() ) ) );
630 }
631 }
632 if ( result.contains( "documentChanges" ) ) {
633 const auto& documentChanges = result.at( "documentChanges" );
634 // resourceOperations not supported for now
635 for ( const auto& edit : documentChanges ) {
636 ret.documentChanges.push_back( parseTextDocumentEdit( edit ) );
637 }
638 }
639 return ret;
640}
641
642static LSPCommand parseCommand( const json& result ) {
643 auto title = result.at( MEMBER_TITLE ).get<std::string>();

Callers 4

parseCodeActionFunction · 0.85
documentRenameMethod · 0.85

Calls 9

parseTextEditArrayFunction · 0.85
parseTextDocumentEditFunction · 0.85
atMethod · 0.80
push_backMethod · 0.80
containsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected