| 165 | K_PLUGIN_FACTORY_WITH_JSON(KDevQuickOpenFactory, "kdevquickopen.json", registerPlugin<QuickOpenPlugin>(); ) |
| 166 | |
| 167 | Declaration * cursorDeclaration() { |
| 168 | KTextEditor::View* view = ICore::self()->documentController()->activeTextDocumentView(); |
| 169 | if (!view) { |
| 170 | return nullptr; |
| 171 | } |
| 172 | |
| 173 | KDevelop::DUChainReadLocker lock(DUChain::lock()); |
| 174 | |
| 175 | return DUChainUtils::declarationForDefinition(DUChainUtils::itemUnderCursor(view->document()->url(), KTextEditor::Cursor(view->cursorPosition())).declaration); |
| 176 | } |
| 177 | |
| 178 | ///The first definition that belongs to a context that surrounds the current cursor |
| 179 | Declaration* cursorContextDeclaration() |
no test coverage detected