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

Method processDocumentFormatting

src/tools/ecode/plugins/lsp/lspclientplugin.cpp:351–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351PluginRequestHandle LSPClientPlugin::processDocumentFormatting( const PluginMessage& msg ) {
352 if ( !msg.isBroadcast() || !msg.isJSON() )
353 return {};
354
355 auto server = getServerURIFromTextDocumentURI( mClientManager, msg.asJSON() );
356 if ( !server.server )
357 return {};
358
359 if ( !msg.asJSON().contains( "options" ) )
360 return {};
361
362 auto ret = server.server->documentFormatting(
363 server.uri, msg.asJSON()["options"],
364 [this, server]( const PluginIDType&, const std::vector<LSPTextEdit>& edits ) {
365 mManager->getSplitter()->getUISceneNode()->runOnMainThread(
366 [this, server, edits] { processDocumentFormattingResponse( server.uri, edits ); } );
367 } );
368
369 return ret;
370}
371
372PluginRequestHandle LSPClientPlugin::processWorkspaceSymbol( const PluginMessage& msg ) {
373 if ( !msg.isRequest() || !msg.isJSON() )

Callers

nothing calls this directly

Calls 8

isJSONMethod · 0.80
documentFormattingMethod · 0.80
runOnMainThreadMethod · 0.80
isBroadcastMethod · 0.45
containsMethod · 0.45
getUISceneNodeMethod · 0.45
getSplitterMethod · 0.45

Tested by

no test coverage detected