| 131 | |
| 132 | |
| 133 | void KDevelop::DocumentationController::doShowDocumentation() |
| 134 | { |
| 135 | KTextEditor::View* view = ICore::self()->documentController()->activeTextDocumentView(); |
| 136 | if(!view) |
| 137 | return; |
| 138 | |
| 139 | KDevelop::DUChainReadLocker lock( DUChain::lock() ); |
| 140 | |
| 141 | Declaration* decl = usefulDeclaration(DUChainUtils::itemUnderCursor(view->document()->url(), KTextEditor::Cursor(view->cursorPosition())).declaration); |
| 142 | auto documentation = documentationForDeclaration(decl); |
| 143 | if (documentation) { |
| 144 | showDocumentation(documentation); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | KDevelop::ContextMenuExtension KDevelop::DocumentationController::contextMenuExtension(Context* context, QWidget* parent) |
| 149 | { |
nothing calls this directly
no test coverage detected