| 591 | } |
| 592 | |
| 593 | void QuickOpenPlugin::quickOpenDeclaration() |
| 594 | { |
| 595 | if (jumpToSpecialObject()) { |
| 596 | return; |
| 597 | } |
| 598 | |
| 599 | KDevelop::DUChainReadLocker lock(DUChain::lock()); |
| 600 | Declaration* decl = cursorDeclaration(); |
| 601 | |
| 602 | if (!decl) { |
| 603 | qCDebug(PLUGIN_QUICKOPEN) << "Found no declaration for cursor, cannot jump"; |
| 604 | return; |
| 605 | } |
| 606 | decl->activateSpecialization(); |
| 607 | |
| 608 | IndexedString u = decl->url(); |
| 609 | KTextEditor::Cursor c = decl->rangeInCurrentRevision().start(); |
| 610 | |
| 611 | if (u.isEmpty()) { |
| 612 | qCDebug(PLUGIN_QUICKOPEN) << "Got empty url for declaration" << decl->toString(); |
| 613 | return; |
| 614 | } |
| 615 | |
| 616 | lock.unlock(); |
| 617 | core()->documentController()->openDocument(u.toUrl(), c); |
| 618 | } |
| 619 | |
| 620 | QWidget* QuickOpenPlugin::specialObjectNavigationWidget() const |
| 621 | { |
nothing calls this directly
no test coverage detected