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

Method setDeclaration

plugins/contextbrowser/contextbrowserview.cpp:324–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void ContextBrowserView::setDeclaration(KDevelop::Declaration* decl, KDevelop::TopDUContext* topContext, bool force)
325{
326 m_lastUsedTopContext = IndexedTopDUContext(topContext);
327
328 if (isLocked() && (!m_navigationWidget.data() || !isVisible())) {
329 // Automatically remove the locked state if the view is not visible or the widget was deleted,
330 // because the locked state has side-effects on other navigation functionality.
331 m_autoLocked = false;
332 m_lockAction->setChecked(false);
333 }
334
335 if (m_navigationWidgetDeclaration == decl->id() && !force)
336 return;
337
338 m_navigationWidgetDeclaration = decl->id();
339
340 if (!isLocked() && (isVisible() || force)) { // NO-OP if tool view is hidden, for performance reasons
341 updateMainWidget(createWidget(decl, topContext));
342 }
343}
344
345KDevelop::IndexedDeclaration ContextBrowserView::lockedDeclaration() const
346{

Callers 15

showUsesDelayedMethod · 0.45
updateForViewMethod · 0.45
createTypeMethod · 0.45
setDeclInCtxtDataMethod · 0.45
setDeclTypeMethod · 0.45
setIdTypeDeclMethod · 0.45
declareFunctionMethod · 0.45
visitMethod · 0.45
declareComponentMethod · 0.45
declareMethodMethod · 0.45

Calls 3

IndexedTopDUContextClass · 0.50
dataMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected