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

Method updateDeclarationListBox

plugins/contextbrowser/contextbrowser.cpp:1429–1456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1427}
1428
1429void ContextBrowserPlugin::updateDeclarationListBox(DUContext* context)
1430{
1431 if (!context || !context->owner()) {
1432 qCDebug(PLUGIN_CONTEXTBROWSER) << "not updating box";
1433 m_listUrl = IndexedString(); ///@todo Compute the context in the document here
1434 if (m_outlineLine)
1435 m_outlineLine->clear();
1436 return;
1437 }
1438
1439 Declaration* decl = context->owner();
1440
1441 m_listUrl = context->url();
1442
1443 Declaration* specialDecl = SpecializationStore::self().applySpecialization(decl, decl->topContext());
1444
1445 FunctionType::Ptr function = specialDecl->type<FunctionType>();
1446 QString text = specialDecl->qualifiedIdentifier().toString();
1447 if (function)
1448 text += function->partToString(KDevelop::FunctionType::SignatureArguments);
1449
1450 if (m_outlineLine && !m_outlineLine->hasFocus()) {
1451 m_outlineLine->setText(text);
1452 m_outlineLine->setCursorPosition(0);
1453 }
1454
1455 qCDebug(PLUGIN_CONTEXTBROWSER) << "updated" << text;
1456}
1457
1458void ContextBrowserPlugin::actionTriggered()
1459{

Callers

nothing calls this directly

Calls 11

applySpecializationMethod · 0.80
partToStringMethod · 0.80
IndexedStringClass · 0.50
ownerMethod · 0.45
clearMethod · 0.45
urlMethod · 0.45
topContextMethod · 0.45
toStringMethod · 0.45
qualifiedIdentifierMethod · 0.45
setTextMethod · 0.45
setCursorPositionMethod · 0.45

Tested by

no test coverage detected