Previously, such names were visible only on so-called "extended" completion,
activated when the hotkey for the basic completion was hit twice. The main reason
was that collecting such variants from indexes was a slow process, and we
didn't want to harm the responsiveness of completion for basic names.
Now it becomes possible thanks to a number of performance optimizations:
* Instead of using three separate indexes for classes, functions and variables,
we use one -- PyExportedModuleAttributeIndex. By definition, it includes only top-level
"importable" names, so we additionally save time by not filtering out irrelevant
entries. Also, it doesn't contain private definitions starting with an underscore.
It might bother some users, but given that the previous completion was used
extremely rarely, and the new one is going to be visible everywhere, it seems
that pruning unlikely entries as much as possible is a fare tradeoff. In the future,
we might enable them back on the "extended" completion if there is a demand.
Also, this index binds its keys to the project (`traceKeyHashToVirtualFileMapping`),
further eliminating useless index lookups.
* Thanks to the recent fixes in the platform (IJPL-265), it's now possible to
simultaneously iterate over all keys in an index and request values for a given key
without deadlocks, which is much faster than eagerly fetching all keys first.
* While scanning through all matching entries from indexes, we terminate
the lookup if the number of items exceeds the size of the lookup list.
We can further reduce this number by adjusting the "ide.completion.variant.limit"
registry value.
* Calculating expensive "canonical" import paths (e.g. "pkg.private.Name" is importable as
"pkg.Name") is offloaded to a background thread thanks to the `withExpensiveRenderer` API.
We still calculate these paths synchronously, though, for names whose raw qualified names
contain components starting with an underscore to decide whether these private names are
publicly re-exported and, hence, should be displayed.
The rest of the work has been put into reducing the number of entries on the list, e.g.
* The prefix under caret is now matched from the beginning of a name, e.g. `Bar<caret>`
matches `BarBaz`, but not `FooBar`.
* We don't suggest imported names clashing with those already available in scope.
* Some kinds of definitions are not suggested in specific contexts, e.g.
functions and variables are not suggested inside patterns and type hints.
* Nothing is suggested at the top-level of a class body, where dangling
reference expressions or calls are not normally expected.
Additionally, we don't suggest names from .pyi stubs at the moment, because
it pollutes the suggestion list with entries coming from the stubs for
third-party packages in Typeshed. We should probably enable them back once
we are able to properly disable Typeshed entries for not installed packages.
Some legacy forms of completion are left in the extended mode. In particular,
qualified names of classes are offered inside string literals only in this mode.
Also, module and package names are suggested only in the extended mode, because
top-level packages and modules are already suggested for the basic completion
by PyModuleNameCompletionContributor.
A few tests in PyClassNameCompletionTest were updated or removed entirely because
* we no longer suggest private names
* we no longer suggest names from private modules not re-exported in a public module
* we no longer suggest names clashing with those already available in scope
* prefix matching policy was changed to start at the beginning of an identifier
The whole feature can be disabled with the option "Suggest importable classes,
functions and variables in basic completion" in settings.
GitOrigin-RevId: 0787d42ce337b73b01a60f0bb7aa434fee43e659
Make it possible to expand/collapse overloads by clicking the action link in the bottom component or calling Parameter Info window on the same place for the second time.
GitOrigin-RevId: a65de4124b4530dd9cc5f16b0a709e3a6489071c
* decapitalized and removed CamelCase for pytest
(cherry picked from commit ca898978f81986f67539a66b39737d9e8de419a2)
IJ-CR-126190
GitOrigin-RevId: 3f3e79be0a598f2f0750143507435bca576267a7
Icons removed from SDK package (no need to have a separate class for it), ultimate icons moved out of community module.
There are only 3 icon packages in community:
* `PythonParserIcons`
* `PythonPsiApiIcons`
* `PythonIcons` (aka `intellij.python.community.impl`)
Latter two have `.json` mapper to replace old icons with new one for New UI which is included into corresponding `.xml` file.
GitOrigin-RevId: 0438ad4485b5a82a89c81ec63ae6e575d5bb52de
* It doesn't work with Py3 in PyCharm
* Used by almost nobody according to our stats.
* Prevents us from splitting system into modules: AppEngine depends on yaml, but many parts of code use it directly. It is easier to remove it than to fix it
PY-60565 Remove GAE from supported project types
PY-66032 Fleet PluginException fleet.backend.python plugin
PY-65959 FUS: Class com.intellij.python.appengine.facet.AppEngineFacet must not be requested from main classloader of Pythonid plugin
Also, things like EA-1006421
GitOrigin-RevId: 5733832cfdc4d3560ee9301985d5e7dea7d13367
* corrected notification text
* changed help id for more precise linking
(cherry picked from commit b466ce466ce6d878e71862646f6088c631f2fde5)
IJ-MR-123213
GitOrigin-RevId: 09336eaa1f20a799b40d38c66e60cb53a5a1fc85
- DataView and PlotView are now separate toolwindows, new icon for DataView
- DataView in PyCharm opens in ToolWindow, in DataSpell in Editor
- In PyCharm DataView we have 2 view options (new and old tables)
- Old tables got new color schema
- New tables got coloring possibility and the same color schema
- A number of UI related classes are new on Kotlin DSL
- A number of actions properly registered in xml
- Code in this commit are not perfect and a lot of things should be refactored and the first thing - ds-tables and python-scientific modules should be rearranged, a number of useless extension points should be removed.
- fixed a number of Disposable problems
- Small UI fixes in toolbars
GitOrigin-RevId: c924338acc52420d44cc4cdad647fff19121332a
- python distributions are available for selection as base interpreter
- sdks are installed and registered with modal progress after creating base dir for project
- new ui for sdk combobox, supporting path selection and custom rendering
- same combobox used for all python environment selection
GitOrigin-RevId: de2ea95247eab93f17f94cc580a41b13471bb49f
[pycharm] PY-15346. Changed the error message to follow the platform.
[pycharm] PY-15346. Add validation for move module members refactoring.
If no members are selected to be moved, an error message will pop up, indicating that at least one member should be selected.
Merge-request: IJ-MR-112620
Merged-by: Sergey Karpov <sergey.karpov@jetbrains.com>
GitOrigin-RevId: c0d5b785b4374cef190335b130bbf6c8012cfded