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

Method findInClassBrowser

plugins/classbrowser/classbrowserplugin.cpp:119–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void ClassBrowserPlugin::findInClassBrowser()
120{
121 ICore::self()->uiController()->findToolView(i18nc("@title:window", "Classes"), m_factory, KDevelop::IUiController::CreateAndRaise);
122
123 Q_ASSERT(qobject_cast<QAction*>(sender()));
124
125 if (m_activeClassTree == nullptr)
126 return;
127
128 DUChainReadLocker readLock(DUChain::lock());
129
130 auto* a = static_cast<QAction*>(sender());
131
132 Q_ASSERT(a->data().canConvert<DUChainBasePointer>());
133
134 DeclarationPointer decl = qvariant_cast<DUChainBasePointer>(a->data()).dynamicCast<Declaration>();
135 if (decl)
136 m_activeClassTree->highlightIdentifier(decl->qualifiedIdentifier());
137}
138
139void ClassBrowserPlugin::showDefinition(const DeclarationPointer& declaration)
140{

Callers

nothing calls this directly

Calls 5

findToolViewMethod · 0.80
uiControllerMethod · 0.80
highlightIdentifierMethod · 0.80
dataMethod · 0.45
qualifiedIdentifierMethod · 0.45

Tested by

no test coverage detected