Commit Graph

112 Commits

Author SHA1 Message Date
Yann Cébron
6e1285e760 plugin descriptors: remove obsolete suppression comments for 'PluginXmlValidity' inspection
GitOrigin-RevId: 25a17cf82be4c35d4e12472e392aea15b55ea105
2024-07-16 18:55:00 +00:00
Vladimir Koshelev
2ca8342b13 [python] restore pep8 information level after plugin split PY-73129
GitOrigin-RevId: 53fb0cf4c7efe139694d34f1707cdb8305881e03
2024-07-02 18:12:23 +00:00
Mikhail Golubev
52850e21d8 PY-62208 Include importable names in basic completion results
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
2024-07-02 14:08:48 +00:00
Daniil Kalinin
d47bd34358 PY-58497 Refactor parameter info logic for Python
Show type hints only for the highlighted parameter

GitOrigin-RevId: f55d8ecc27dcbca5e6c24c5ca347ea3995e69ca8
2024-07-02 09:57:32 +00:00
Aleksandr Sorotskii
b71858d628 PY-73001 Log popular tools and build system requirements mentioned in pyproject.toml
GitOrigin-RevId: 8a54afcc73246ff4d2667229345aa1778dc6a2af
2024-06-25 19:53:37 +00:00
Vladimir Koshelev
2c8d9f7ca1 [python] fix jumps on backspace when lines start with a lot of indents
GitOrigin-RevId: 3ee4005dc0b85f007d4b895367af7efcdf5fbaab
2024-06-25 12:24:22 +00:00
Egor.Eliseev
56241ab394 PY-73411 Pycharm performance tests failed
Merge-request: IJ-MR-137368
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 23a7e9d443606b1a9a028c5e3275c6c408c0d796
2024-06-20 21:51:17 +00:00
Egor.Eliseev
0c73c9eff9 PY-72274 separating content for python core/pro plugins
1. Delete `intellij.python.community.impl.xml` (move content to `PythonCore` plugin). It is necessary to fix incorrect dependencies: `PythonCore`, `Pythonid` include the same module.
2. Fixed dependencies: if some plugin/module needs Python core functionality, then it should depend on `PythonCore`.


Co-authored-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com>

Merge-request: IJ-MR-136158
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: ce9ed4c17f601ee1ca2b6cf608f4e30fdac1d879
2024-06-19 21:39:24 +00:00
Vladimir Krivosheev
4d288109b4 IJPL-149476 PythonPsi.xml expected in the main plugin
GitOrigin-RevId: 7f532cc471c7b7b0253cbde9f73fa1db45738ddf
2024-05-15 21:10:53 +00:00
Ilya.Kazakevich
d7c00ac3da PY-70729: Move com.jetbrains.extensions deprecated package to the separate module.
This package is only used by third party plugins. We can't leave it inside another v2 module due to package inconsistency.

See errors like https://youtrack.jetbrains.com/issue/PY-70729/Class-com.jetbrains.python.psi.PyElementType-must-not-be-requested-from-main-classloader-of-Pythonid-plugin#focus=Comments-27-9494155.0-0

So we move it to the separate v2 module which will be removed soon

GitOrigin-RevId: 418ef1a59bb5e63dbc368a936437408c6510cc23
2024-03-19 00:34:37 +00:00
Ilya.Kazakevich
61d3b04a34 [python] actions were missing localization bundle
GitOrigin-RevId: 28a2c44d05cd4901ed05bcddacb17fe739d648a0
2024-03-18 13:35:48 +00:00
Ilya.Kazakevich
30aafec791 [python]: rename module python rider to move it out of community.impl since this name is already used and might lead to clash.
GitOrigin-RevId: 44de4d39d098845235e079171a78e78d2f4f3209
2024-03-07 22:34:34 +00:00
Ilya.Kazakevich
37c7118b1a [python]: rename module to move it out of community.impl since this name is already used and might lead to clash.
`intellij.python.community.impl.community_only` -> `intellij.python.community.communityOnly`

GitOrigin-RevId: 070222708f66ba5f58b9716040186ec11d984e5d
2024-03-07 19:20:06 +00:00
Ilya.Kazakevich
763c2e8597 [python] only share content between Community, Prof and Fleet. dependencies must be copied.
`dependencies` tag join is not supported, hence `plugin.xml` must declare all its dependencies in one file

GitOrigin-RevId: c1347feb7f995b211522c3f1408f9f576215f784
2024-02-28 16:12:03 +00:00
Ilya.Kazakevich
71467fb86a [python]: Make org.toml.lang requirement for Python plugin.
Python support depends on TOML (see `intellij.python.community.impl.xml` `<dependencies>`), and a Python plugin is useless without this module.

GitOrigin-RevId: 979376338c699c24e34b76f2084a8c8cc8065371
2024-02-27 22:29:45 +00:00
Ilya.Kazakevich
98b99c3717 DS-6282: Module missing when build from sources.
`intellij.python.community.impl.community_only` must be on the classpath of PyCharm Community and DS.

It has been done for dev builds, but not for sources.

GitOrigin-RevId: 13da57550c978098fabed0e08437d5aca5b5b230
2024-02-23 22:58:05 +00:00
Ilya.Kazakevich
9d4751f238 [python, ds, jupyter]: Migrate Python support to V2
Layout:

  JPS modules
  `intellij.python.community`
  `intellij.python.community.impl`
  `intellij.python.parser`
  `intellij.python.psi`
  `intellij.python.psi.impl`
  `intellij.python.ast`
  use package `com.jetbrains.python`
  and go to `intellij.python.community.impl` v2 module

  JPS module
  `intellij.python`
  uses package `com.intellij.python.pro`
  and goes to `intellij.python/pro` v2 module

  Both v2 modules (along with lots of others) come with
  `PythonId` (prof) or `PythonCore` (community) plugins

  DS bundles  `intellij.python.community.impl`

  Idea and other Mini IDEs get `PythonCore` or `PythonId` plugin that bundle modules for Idea and mini IDEs

GitOrigin-RevId: 98f418c52d90d51b9adf3250c561f2c36c767e2d
2024-01-22 20:26:58 +00:00
Ilya.Kazakevich
b533e29ce0 [python] get rid of classes registered in wrong modules
You must register class in the same v2 module class sits

GitOrigin-RevId: c7fcccd27c2fcaa3d9391d1173f61ad43fe2b076
2024-01-17 04:59:01 +00:00
Ilya.Kazakevich
5e4dbef015 [python] Move plugin-specific classes to the correct package
GitOrigin-RevId: 14efb7be0fd8f9614a1849c9345bcbf319f76cb9
2024-01-15 23:49:32 +00:00
Ilya.Kazakevich
3aa9e0f5f5 FL-24174: NCDFE JavaPsiFacade thrown from PyJavaImportResolver on Fleet backend.
`PyJavaImportResolver` is a v1 module which is included only if `com.intellij.modules.idea`.
The comment says:

> Java-specific dependencies are actually IntelliJ IDEA specific dependencies

But this is *NOT* true.

`JavaPsiFacade` is only guaranteed to be available if `com.intellij.java` module is set.

Hence, we change dependency

GitOrigin-RevId: 7c39e37f3a023e747e40cffabff848138e7b9394
2024-01-13 01:34:17 +00:00
Ilya.Kazakevich
f7f85f7c3a Remove python-core-plugin.xml: it consists of only one line and can be embedded
GitOrigin-RevId: fcfcfab10f544ea4bf786e4e49c28cf7e86d7ae5
2024-01-05 21:41:34 +00:00
Ilya.Kazakevich
ab9ea210a6 Merge ReST plugin with ReST Python module, convert module to v2
Nobody uses it except Python

GitOrigin-RevId: 4da3e7da0dcd86d454972b2ef68d2581c7fe5cdb
2024-01-03 16:35:59 +00:00
Ilya.Kazakevich
6a308b21a0 Migrate python copyright to v2
GitOrigin-RevId: bb3d02627319556681d4a192d83df4a2bfed21e1
2023-12-21 23:10:56 +00:00
Ilya.Kazakevich
19ed89fec2 Migrate python intelliLang to v2
GitOrigin-RevId: ffcac639cf73ac332731101939b5bdc906f47372
2023-12-21 21:23:27 +00:00
Ilya.Kazakevich
5903ec85c4 Migrate python terminal to v2
GitOrigin-RevId: 690d4ead522e2153b89d1ab09ed2026237173160
2023-12-21 21:23:23 +00:00
Ilya.Kazakevich
28372d5d89 Migrate python grazie to v2
GitOrigin-RevId: 945df1be286e054a763039b7e6ccf647ef753a84
2023-12-21 21:23:20 +00:00
Ilya.Kazakevich
a0ff363aab Migrate python markdown to v2
GitOrigin-RevId: fb7cc9c3ae6cd79d4d71e94e98ad1a1ae3c03bc5
2023-12-21 19:59:43 +00:00
Ilya.Kazakevich
50f0e2820c Migrate python feature trainer to v2
GitOrigin-RevId: 369e795edac8f6b04634fc7ede78dff431d0bc21
2023-12-21 19:50:08 +00:00
Bernhard Geisberger
61550843c9 [fleet] Python SDK library might be created before listener invocation
GitOrigin-RevId: d1ff30bb2f6c3d2764ca7cc0c22e34af2b4fd6a6
2023-12-19 02:01:31 +00:00
Andrey Cherkasov
06342a71b3 [python] Make extension classes final
GitOrigin-RevId: d650b5e733d806a06911f942cfd1dec70197b061
2023-12-13 20:02:09 +00:00
Vladimir Koshelev
c70c571af1 [python] initial support for ".env" files PY-5543
GitOrigin-RevId: 7dde72daf89f1a0f856d685a6c1c5d799b8c5eb9
2023-10-10 08:27:59 +00:00
Vladislav
bbc7164ab9 RUST-11915 Show python interpreter settings in RustRover
Similar to d05cbf7f49
 + c78b497938044009238095bdbf8fba913215d1d2

GitOrigin-RevId: cd86586528e084650db78f4d19e28eec76c5dc34
2023-09-19 03:45:16 +00:00
Daniil Ovchinnikov
97f0a7fd3b migrate usages of ModalityState.NON_MODAL to ModalityState.nonModal
GitOrigin-RevId: fb4855bfa90dbf384fed24871e4b28ab803847bb
2023-06-09 21:58:50 +00:00
Pavel Porvatov
b89bd59e4a Using selected() method when possible
GitOrigin-RevId: 337ce4959abc631cef05aa95661b0bd92be35f5b
2023-04-05 15:19:16 +00:00
Elizaveta Shashkova
308f9110d7 PY-58889 New UI for Python Run configurations
Partial implementation of PY-44688

GitOrigin-RevId: 686c48a6f2649dfebcd079f414cce19559374032
2023-02-21 16:51:46 +00:00
Alexey Kudravtsev
eadeade0de mark several methods Unmodifiable to highlight more probelms
GitOrigin-RevId: 18e5e68e451ffef4333c057e33d03f865deeeb65
2023-02-21 04:13:14 +00:00
Dmitriy.Panov
be237eccff IJI-1023 plugins validation with org.jetbrains.intellij.plugins:structure-intellij library
GitOrigin-RevId: f81477dcc2f57a032181fd7eb9ea3085e1f6b579
2023-02-07 11:00:50 +00:00
Vladimir Krivosheev
57764d700b mark classes final
GitOrigin-RevId: 6414b6f2119c82c7567987dd30b35cab5491d9e2
2022-12-30 06:58:01 +00:00
andrey.matveev
70d6a4eb79 PY-55360 Use sdk instead of sdkHomePath to allow select interpreter in docker compose
(cherry picked from commit 2ae371ce70be9490ddb14b6981366e06a41ddb5d)

IJ-MR-96284

GitOrigin-RevId: 832cadd71e1a0d47852e44854b2ead217342b7e4
2022-11-14 18:55:08 +00:00
Pavel Porvatov
28b43ff791 IDEA-305403 Remove usages and deprecate HideableDecorator component
- PyPluginCommonOptionsForm

GitOrigin-RevId: b8806490c5138a7acb07a5def3300a1cabb2a230
2022-11-11 22:14:10 +00:00
Alex Plate
8a6e198815 [Workspace Model] Move facet initialization under EDT
GitOrigin-RevId: 7c2c2f9d81e1ace49ab8c4c4787899c4821a7763
2022-09-07 11:58:57 +00:00
Konstantin Bulenkov
b185bd5b1d fix write action assertion
GitOrigin-RevId: 6845fb3975d10244610ab41d63dcc6582780ed8e
2022-07-12 16:18:56 +00:00
Konstantin Bulenkov
06094c3c88 IDEA-296882 [Pyton] Can't open a project with python file
GitOrigin-RevId: ca91ee5f1918aad0fd99c1bd317e87b6f06df51e
2022-06-27 12:44:03 +00:00
Tatiana Tulupenko
2ba71d4533 Move iconMapper to the correct xml
GitOrigin-RevId: b168aaa7d366f3e5f40398ee2902c161159578f2
2022-06-16 12:08:20 +00:00
Tatiana Tulupenko
4b94b45212 Cleanup: remove empty body
GitOrigin-RevId: f90c99fe0790013579e2aa6bf1e2552efee6d22d
2022-06-15 10:57:19 +00:00
Tatiana Tulupenko
8bba03620d [ExpUI] Add Python console tool window icon
GitOrigin-RevId: 97626ec87bdbaec5bfe1509648d7e69f06a19dc3
2022-06-14 20:43:06 +00:00
Elizaveta Shashkova
af1356d36c PY-54597 [action-update-thread] Set ActionUpdateThread for com.jetbrains.python.*
GitOrigin-RevId: 991229338ee8f91d7f9b49794fe1268bf78c2897
2022-06-14 10:15:05 +00:00
Daniil Ovchinnikov
d207feb0c1 deprecate ModifiableModelsProvider$SERVICE
GitOrigin-RevId: b1c511255b9583e42667b46b5baaf812559f1b4c
2022-05-17 22:44:49 +00:00
Andrey Vlasovskikh
7c12918f1e Fixed the paths of a project library created by a Python facet not reflecting the changes in the paths of its SDK
GitOrigin-RevId: 5be04264da6b8c1cfa71384d40318284261cc545
2021-11-08 22:43:23 +00:00
Lada Gagina
18d0c28655 PY-50160 Implement the redesigned dialog for package installation failures
IJ-CR-13328

GitOrigin-RevId: 2cfa6c468411391772639441f0d2aeda4fddc435
2021-10-19 15:30:24 +00:00