| 1427 | } |
| 1428 | |
| 1429 | void 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 | |
| 1458 | void ContextBrowserPlugin::actionTriggered() |
| 1459 | { |
nothing calls this directly
no test coverage detected