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

Method onRegisterDocument

src/tools/ecode/plugins/debugger/debuggerplugin.cpp:1522–1538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1520}
1521
1522void DebuggerPlugin::onRegisterDocument( TextDocument* doc ) {
1523 registerCommands( doc );
1524
1525 doc->setCommand( "debugger-breakpoint-toggle", [doc, this] {
1526 if ( setBreakpoint( doc, doc->getSelection().start().line() + 1 ) )
1527 getUISceneNode()->getRoot()->invalidateDraw();
1528 } );
1529
1530 doc->setCommand( "debugger-breakpoint-enable-toggle", [this, doc] {
1531 if ( breakpointToggleEnabled( doc, doc->getSelection().start().line() + 1 ) )
1532 getUISceneNode()->getRoot()->invalidateDraw();
1533 } );
1534
1535 Lock l( mClientsMutex );
1536 mClients[doc] = std::make_unique<DebuggerPluginClient>( this, doc );
1537 doc->registerClient( mClients[doc].get() );
1538}
1539
1540void DebuggerPlugin::onUnregisterDocument( TextDocument* doc ) {
1541 Lock l( mClientsMutex );

Callers

nothing calls this directly

Calls 7

invalidateDrawMethod · 0.80
setCommandMethod · 0.45
startMethod · 0.45
getSelectionMethod · 0.45
getRootMethod · 0.45
registerClientMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected