| 337 | } |
| 338 | |
| 339 | KDevelop::ContextMenuExtension ContextBrowserPlugin::contextMenuExtension(KDevelop::Context* context, QWidget* parent) |
| 340 | { |
| 341 | KDevelop::ContextMenuExtension menuExt = KDevelop::IPlugin::contextMenuExtension(context, parent); |
| 342 | |
| 343 | auto* codeContext = dynamic_cast<KDevelop::DeclarationContext*>(context); |
| 344 | |
| 345 | if (!codeContext) |
| 346 | return menuExt; |
| 347 | |
| 348 | DUChainReadLocker lock(DUChain::lock()); |
| 349 | |
| 350 | if (!codeContext->declaration().data()) |
| 351 | return menuExt; |
| 352 | |
| 353 | menuExt.addAction(KDevelop::ContextMenuExtension::NavigationGroup, m_findUses); |
| 354 | |
| 355 | return menuExt; |
| 356 | } |
| 357 | |
| 358 | void ContextBrowserPlugin::showUses(const DeclarationPointer& declaration) |
| 359 | { |
nothing calls this directly
no test coverage detected