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

Method doShowDocumentation

kdevplatform/shell/documentationcontroller.cpp:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132
133void 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
148KDevelop::ContextMenuExtension KDevelop::DocumentationController::contextMenuExtension(Context* context, QWidget* parent)
149{

Callers

nothing calls this directly

Calls 7

usefulDeclarationFunction · 0.85
documentControllerMethod · 0.80
CursorClass · 0.50
urlMethod · 0.45
documentMethod · 0.45
cursorPositionMethod · 0.45

Tested by

no test coverage detected