| 512 | } |
| 513 | |
| 514 | ContextMenuExtension 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 |
| 538 | void DebugController::restartDebugger() { |
nothing calls this directly
no test coverage detected