| 766 | } |
| 767 | |
| 768 | Declaration* ContextBrowserPlugin::findDeclaration(View* view, const KTextEditor::Cursor& position, bool mouseHighlight) |
| 769 | { |
| 770 | Q_UNUSED(mouseHighlight); |
| 771 | ENSURE_CHAIN_READ_LOCKED |
| 772 | |
| 773 | Declaration* foundDeclaration = nullptr; |
| 774 | if (m_useDeclaration.data()) { |
| 775 | foundDeclaration = m_useDeclaration.data(); |
| 776 | } else { |
| 777 | //If we haven't found a special language object, search for a use/declaration and eventually highlight it |
| 778 | foundDeclaration = |
| 779 | DUChainUtils::declarationForDefinition(DUChainUtils::itemUnderCursor( |
| 780 | view->document()->url(), position).declaration); |
| 781 | if (foundDeclaration && foundDeclaration->kind() == Declaration::Alias) { |
| 782 | auto* alias = dynamic_cast<AliasDeclaration*>(foundDeclaration); |
| 783 | Q_ASSERT(alias); |
| 784 | foundDeclaration = alias->aliasedDeclaration().declaration(); |
| 785 | } |
| 786 | } |
| 787 | return foundDeclaration; |
| 788 | } |
| 789 | |
| 790 | ContextBrowserView* ContextBrowserPlugin::browserViewForWidget(QWidget* widget) const |
| 791 | { |
nothing calls this directly
no test coverage detected