MCPcopy Create free account
hub / github.com/KDE/kdevelop / contextMenuExtension

Method contextMenuExtension

kdevplatform/shell/debugcontroller.cpp:514–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514ContextMenuExtension DebugController::contextMenuExtension(Context* context, QWidget* parent)
515{
516 Q_UNUSED(parent);
517
518 ContextMenuExtension menuExt;
519
520 if( context->type() != Context::EditorContext )
521 return menuExt;
522
523 auto *econtext = dynamic_cast<KDevelop::EditorContext*>(context);
524 if (!econtext)
525 return menuExt;
526
527 if (m_currentSession && m_currentSession->isRunning()) {
528 menuExt.addAction( KDevelop::ContextMenuExtension::DebugGroup, m_runToCursor);
529 }
530
531 if (econtext->url().isLocalFile()) {
532 menuExt.addAction( KDevelop::ContextMenuExtension::DebugGroup, m_toggleBreakpoint);
533 }
534 return menuExt;
535}
536
537#if 0
538void DebugController::restartDebugger() {

Callers

nothing calls this directly

Calls 5

isLocalFileMethod · 0.80
typeMethod · 0.45
isRunningMethod · 0.45
addActionMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected