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

Method highlightUse

kdevplatform/language/highlighting/codehighlighting.cpp:474–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474void CodeHighlightingInstance::highlightUse(DUContext* context, int index, const QColor& color)
475{
476 Declaration* decl = context->topContext()->usedDeclarationForIndex(context->uses()[index].m_declarationIndex);
477
478 auto type = typeForDeclaration(decl, context);
479
480 if (type != CodeHighlightingType::Error
481 || ICore::self()->languageController()->completionSettings()->highlightSemanticProblems()) {
482 HighlightedRange h;
483 h.range = context->uses()[index].m_range;
484 h.attribute = m_highlighting->attributeForType(type, CodeHighlightingContext::Reference, color);
485 m_highlight.push_back(h);
486 }
487}
488
489void CodeHighlightingInstance::highlightUses(DUContext* context)
490{

Callers

nothing calls this directly

Calls 8

completionSettingsMethod · 0.80
languageControllerMethod · 0.80
attributeForTypeMethod · 0.80
topContextMethod · 0.45
usesMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected