You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python scope crawler force all Named psi elements to by in autocompletion/resolve
Resolve/completion implemented via com.jetbrains.python.psi.resolve.PyResolveUtil.scopeCrawlUp() method which delegates to com.jetbrains.python.codeInsight.dataflow.scope.impl.ScopeImpl.collectDeclarations(). Method collectDeclarations() contains python visitor which adds all PsiNameIdentifierOwner and PsiNamedElements into autocompletion.
I'd like to customize this ScopeImpl method and provide my own impl filtering out my rule-like psi elements.
At the moment we have to replace PyReferenceImpl with fake reference to remove SmkRuleLike elements. It is also not very convenient because PyReferenceExpressionImpl.getReference() has large piece of code selecting different type of references (e.g references for import, qualifed reference, etc) and if nothing interested was found finally returns basic default PyReferenceImpl(). We'd like to replace this default choice and do not copy all advanced implementation for choosing suitable refernce type.
The text was updated successfully, but these errors were encountered:
Python scope crawler force all Named psi elements to by in autocompletion/resolve
Resolve/completion implemented via
com.jetbrains.python.psi.resolve.PyResolveUtil.scopeCrawlUp()
method which delegates tocom.jetbrains.python.codeInsight.dataflow.scope.impl.ScopeImpl.collectDeclarations()
. MethodcollectDeclarations()
contains python visitor which adds allPsiNameIdentifierOwner
andPsiNamedElements
into autocompletion.I'd like to customize this
ScopeImpl
method and provide my own impl filtering out my rule-like psi elements.At the moment we have to replace
PyReferenceImpl
with fake reference to removeSmkRuleLike
elements. It is also not very convenient becausePyReferenceExpressionImpl.getReference()
has large piece of code selecting different type of references (e.g references for import, qualifed reference, etc) and if nothing interested was found finally returns basic defaultPyReferenceImpl()
. We'd like to replace this default choice and do not copy all advanced implementation for choosing suitable refernce type.The text was updated successfully, but these errors were encountered: