PY-44026 Add a specialized index for fast qualified name lookup

The new stub-based index maps names of all "public" top-level definitions
to the corresponding PSI elements. Fully qualified names are matched by
both definition's short name and an already typed reference qualifier, i.e.
"foo.bar.MyClass" matches "foo.My" and "bar.My" but not "foo.bar". Qualified
names are initially restored directly from VFS without any normalization or
canonization to improve performance, but then properly canonized before
displaying them among completion suggestions.

GitOrigin-RevId: 768ef6d51e535e8102fca0693c7a51db400fc783
This commit is contained in:
Mikhail Golubev
2021-02-17 15:56:22 +00:00
committed by intellij-monorepo-bot
parent 800b75adac
commit e07b409cb8
6 changed files with 230 additions and 0 deletions
@@ -20,6 +20,7 @@
<stubIndex implementation="com.jetbrains.python.psi.stubs.PyVariableNameIndex"/>
<stubIndex implementation="com.jetbrains.python.psi.stubs.PyDecoratorStubIndex"/>
<stubIndex implementation="com.jetbrains.python.psi.stubs.PyClassAttributesIndex"/>
<stubIndex implementation="com.jetbrains.python.psi.stubs.PyExportedModuleAttributeIndex"/>
<fileBasedIndex implementation="com.jetbrains.python.psi.stubs.PyModuleNameIndex"/>
<fileBasedIndex implementation="com.jetbrains.python.psi.stubs.PySetuptoolsNamespaceIndex"/>