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

Function cursorDeclaration

plugins/contextbrowser/contextbrowser.cpp:107–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107DeclarationPointer cursorDeclaration()
108{
109 KTextEditor::View* view = ICore::self()->documentController()->activeTextDocumentView();
110 if (!view) {
111 return DeclarationPointer();
112 }
113
114 DUChainReadLocker lock;
115
116 Declaration* decl =
117 DUChainUtils::declarationForDefinition(DUChainUtils::itemUnderCursor(view->document()->url(),
118 KTextEditor::Cursor(
119 view->cursorPosition())).declaration);
120 return DeclarationPointer(decl);
121}
122}
123
124class ContextBrowserViewFactory

Callers 1

findUsesMethod · 0.70

Calls 6

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

Tested by

no test coverage detected