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

Method encounterObjectAtLocation

plugins/qmljs/duchain/expressionvisitor.cpp:403–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403void ExpressionVisitor::encounterObjectAtLocation(const QmlJS::AST::SourceLocation& location)
404{
405 DUChainReadLocker lock;
406
407 // Find the anonymous declaration corresponding to the function. This is
408 // the owner of the current context (function expressions create new contexts)
409 Declaration* dec = QmlJS::getOwnerOfContext(m_context->topContext()->findContextAt(
410 CursorInRevision(location.startLine-1, location.startColumn)
411 ));
412
413 if (dec && dec->abstractType()) {
414 encounterLvalue(DeclarationPointer(dec));
415 } else {
416 encounterNothing();
417 }
418}
419
420void ExpressionVisitor::instantiateCurrentDeclaration()
421{

Callers

nothing calls this directly

Calls 5

getOwnerOfContextFunction · 0.85
findContextAtMethod · 0.80
CursorInRevisionClass · 0.50
topContextMethod · 0.45
abstractTypeMethod · 0.45

Tested by

no test coverage detected