| 105 | } |
| 106 | |
| 107 | DeclarationPointer 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 | |
| 124 | class ContextBrowserViewFactory |
no test coverage detected