Commit Graph

457234 Commits

Author SHA1 Message Date
Ilia Zakoulov
a7b3aaec00 PY-76629: Do not resolve bundled stubs when the package is not installed
The implementation is very similar to the PyTypeShed,
it should be merged into more general solution.

GitOrigin-RevId: 1449a774e93206349f17f264c27e2a7877d79b19
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
948779f507 PY-76629: PY-76714: Handle empty string of bundled stubs path
findPathStringInHelpers might return an empty string,
that will be equal to the home path,
that will lead to indexing of the home directory.

GitOrigin-RevId: e800896a4c0631844a7b7a3a79334c3853a30c32
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
ab53444089 PY-76629: Get rid of Django skeleton tests
GitOrigin-RevId: e96b82a3bcba484a5321c54cd15ff755dd7e276d
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
6439b63a2d PY-76629: Get rid of django skeletons
GitOrigin-RevId: 3554062045a5226a95720ae3577af2313a8ce5ff
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
4e6eefa61e PY-76629: Refactor completeBasicAllCarets to make it more understandable.
With two charToType it is more clear to understand the behaviour of the `completeBasicAllCarets`.

GitOrigin-RevId: a87af2ffdfea7b9d3c9332dacd9a36f1a1346fa7
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
91f27d8587 PY-76629: Suppress PyProtectedMemberInspection if a member is defined in .pyi
Protected member should not be highlighted as a warning if it resolves to .pyi file.
We assume that everything in .pyi file is a public API.

GitOrigin-RevId: c8275f3e48e3cd69b1676de9b78606f28ea224c8
2024-10-28 14:57:57 +00:00
Ilia Zakoulov
214f894da3 PY-76629: Introduce new argument typeCharIfOnlyOneCompletion for completeBasicAllCarets.
There are a few tests that provides `charToTypeAfterCompletion = "\t"` to complete the first variant.
It makes tests "ditry" - somewhere in tests you have to check that "\t" is present after completion,
somewhere "\t" is not present because it completed the first variant.
This argument allows to avoid adding unnecessary `charToTypeAfterCompletion`
when there is only one completion variant that is already completed.

GitOrigin-RevId: a11c407f6033a8181a9eb8cb37e00f0320d26005
2024-10-28 14:57:56 +00:00
Mikhail Golubev
d69f93c593 PY-76629: Fix DjangoViewNameCompletionTest.testViewNameCompletionInMethods
There were two underlying problems in Kotlin code:
```
run { DjangoFQNamesProvider.ACCEPTS_VIEW_NAME.isNameMatches(this) } != null
```
returned true regardless of the result of `isNameMatches(this)` call.
As a result, we used to suggest Django view names for *all* functions called
"reverse", "redirect" or "reverse_lazy".

Secondly, in FQNamesProviderExtKt.isNameMatches:
```
return getQualifiedNames().any {
  return it.firstComponent == elementQualifiedName.firstComponent &&
         it.lastComponent == elementQualifiedName.lastComponent
}
```
always returned the result of comparison with the first qualified name, ignoring the rest
due to non-local return from the inline `any`.

Finally, DjangoUrlViewProvider.isReverseFunction expected a PyFunctionType as the type
of reverse/redirect/reverse_lazy, but since these functions have overloads in .pyi
stubs we started to infer a union type of PyFunctionTypes for them, breaking the reference
provider. In general, it's better to perform a name resolution instead of type inference
to detect a fully qualified name for a reference.

GitOrigin-RevId: 69949b1b0e65f00557536cf16127279a83ea4f9d
2024-10-28 14:57:56 +00:00
Mikhail Golubev
20b2e20d26 PY-76629 PY-39761 Don't type check __class_getitem__ arguments inside type hints
GitOrigin-RevId: 060a2952d49777bff9853a2d5bc4d257271e559e
2024-10-28 14:57:56 +00:00
Aleksei Kniazev
732cd5275a PY-76629: [python] moved bundled django-stubs to helpers-pro package
GitOrigin-RevId: 24543c7c6249bd7ae8eac0cb6140754b5126858c
2024-10-28 14:57:56 +00:00
Aleksei Kniazev
f985a175df PY-76629: [python] bundle django-stubs, add them to the interpreter path and turn off stub suppressor
GitOrigin-RevId: 044f50f973193d54ea361d3c9b2d64ee3b83974a
2024-10-28 14:57:56 +00:00
Gregory.Shrago
d0d015c29c IJPL-162835 "Open project windows" popup keeps focus
(cherry picked from commit 92c95c7713cf5e5d5fac8065b474db72ef2559f7)

IJ-CR-147855

GitOrigin-RevId: d16f68881627168fbe81c1d8ad938ae7f8205af2
2024-10-28 14:41:15 +00:00
Vera Petrenkova
e14b11fb91 IJPL-165056 Improve enum naming in FUS for Windows Defender
(cherry picked from commit 95150c6a6990db75b4a52d3ff08575f3af93866c)

GitOrigin-RevId: 793db9b98ca3bb4f7afaa22f3d1ae5fc9a91b79c
2024-10-28 14:41:07 +00:00
Vera Petrenkova
f718f8b45b IJPL-165056 improve FUS collection for Windows Defender exclusions in Trusted locations
(cherry picked from commit 20f3f841b57be063d5d36299239ecf21f966674a)

GitOrigin-RevId: 0c9add594af8b57d3aa55521f7b03d4fba6e3e62
2024-10-28 14:41:07 +00:00
Vera Petrenkova
f45c3df3a8 IJPL-165056 Add FUS for Windows Defender exclusions in Trusted locations
(cherry picked from commit 1434325b8096893fe668f0e01e2360cef4d8c551)

GitOrigin-RevId: 86b86d595cedc45c2289b5378e3b6d322ba19e1e
2024-10-28 14:41:07 +00:00
Kirill.Karnaukhov
05210b8dee [inline-completion] IJPL-161906: propagate intellij.platform.inline.completion to the platform main
(cherry picked from commit 44f9a3649df3cd074fbf8d43a1145ca7f0a95e2f)

IJ-MR-147762

GitOrigin-RevId: cea1b5a9a3d512a9ad65d6e4ca4324d053b18d7a
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
c6fb9a7efe [inline-completion] IJPL-161906: add docs for InlineCompletionFilteringEventListener
(cherry picked from commit 0f2733053df1523237ddb17a979f806379bc5973)

IJ-MR-147762

GitOrigin-RevId: 11c5a03fafe229b07fd1efa42e04d0536dc18206
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
d4c591aed8 [inline-completion] IJPL-161906: use FinishType and EffectType in RPC calls directly
(cherry picked from commit 0b78a6551922465f9f41f63d2cbdab1bee94a77c)

IJ-MR-147762

GitOrigin-RevId: 6142cdef5cff7590d525997b5fedd34072b691a7
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
9076a2e253 [inline-completion] IJPL-161906: make FrontendInlineCompletionHandler shared
(cherry picked from commit a14fc54fac3b56d7370fe64ea9f63a12c38f081b)

IJ-MR-147762

GitOrigin-RevId: e0140ab89f1fd9d5f75938572f53c57999a9c505
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
af3d6f0506 [inline-completion] IJPL-161906: document BackendInlineCompletionHandler
(cherry picked from commit 2fcd5ab743686e31141b99f10c42c141e4c7b8fb)

IJ-MR-147762

GitOrigin-RevId: 869bea5cd7d5b8f793c58e746281d12138777ca0
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
c6b33c9ec5 [inline-completion] IJPL-161906: do not register all the inline completion listeners on backend
(cherry picked from commit 7f45dc74717ce54565a3eb79a07a5a622af17075)

IJ-MR-147762

GitOrigin-RevId: b4e71aa97550cc47b8155c8466f09ea654e81673
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
ffaf9c1a5c [inline-completion] IJPL-161906: end session when all elements are empty
(cherry picked from commit 22a3fdeb36919f63710e26adafc1dd84d4242614)

IJ-MR-147762

GitOrigin-RevId: ff9c8ad42a0bb782bfc2fe2cd3c64cfd9e21ebfc
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
4c2d3a99d2 [inline-completion] IJPL-161906: do not log FrontendInlineCompletionProvider
(cherry picked from commit 92cc8fc52b44836b09e235120fbe0574451db87f)

IJ-MR-147762

GitOrigin-RevId: 47e7ab9154d773bbc83d72b809fe7aa1dd4a4680
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
d1c6f91174 [inline-completion] IJPL-161906: make feature flag require restart
(cherry picked from commit fe8fb087d0f42adb9e1235c11107d97b2afc67b9)

IJ-MR-147762

GitOrigin-RevId: 76163d3d93514e8e9b6f5fca8996e3493c3792d6
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
22fba279bf [inline-completion] IJPL-161906: support 'switch variants' actions
(cherry picked from commit 43efaf041fcdd4d8da240d99ee594d82d6dff97f)

IJ-MR-147762

GitOrigin-RevId: edc3416f027db3781929ea3df7035832654a09dc
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
b6da335113 [inline-completion] IJPL-161906: support 'virtual line ending' element
(cherry picked from commit 14b2ae43fd0b0b5b3d76a3bfa58db9ee5ca974b0)

IJ-MR-147762

GitOrigin-RevId: 8b5451c3bdefe986cbbef152be3ccc9147bcb2a2
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
2ae85bffdc [inline-completion] IJPL-161906: support 'inline shortcut hint' element
(cherry picked from commit 75e23acede488ac6cc44680699a30c04745da326)

IJ-MR-147762

GitOrigin-RevId: d2214712c2fbe180498c4bba13d175dab1dd371d
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
3dd22640ca [inline-completion] IJPL-161906: properly render backend provider name and show tooltip actions from backend
(cherry picked from commit ad475acfd3114acff288f33afcdf2f3ce005e984)

IJ-MR-147762

GitOrigin-RevId: 4659e28e7ec8fe694581cc119ffa14a1db99feb3
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
0d0a9876ee [inline-completion] IJPL-161906: refactor InlineCompletionSessionId and do some TODOs
(cherry picked from commit 3f1f068c5101b6e07c92e7e66138e362161f378c)

IJ-MR-147762

GitOrigin-RevId: 631e5434ecb8baa7a507d577df25c4dbabad9bb1
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
9f96a9d81a [inline-completion] IJPL-161906: forbid too broad customization of suggestion updaters in RemDev
(cherry picked from commit 036b9d981d5f7e98cb100e67f38e7121b9fde2b8)

IJ-MR-147762

GitOrigin-RevId: 12d736b99f083b0240373d7a45d9220a578cdc86
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
e6b322b087 [inline-completion] IJPL-161906: check locality of a client instead of AppMode
(cherry picked from commit 8b096daa1788cdacb3fef2986e0c6f39abcb56e8)

IJ-MR-147762

GitOrigin-RevId: 395af99862f4b3e659d6e2ec2143ed44eaed4eae
2024-10-28 14:25:23 +00:00
Kirill.Karnaukhov
b752386d9c [inline-completion] IJPL-161906: test event listeners
(cherry picked from commit e8448da9d7d51da97c550860da24640914b33dfa)

IJ-MR-147762

GitOrigin-RevId: d82442976e2a06242488e22710d81e180ae7206f
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
77430c0e6c [inline-completion] IJPL-161906: initialize the right number of variants when using backend provider
(cherry picked from commit 2f8f2f86262ebdf2069adc2073706aad9a68a919)

IJ-MR-147762

GitOrigin-RevId: 08a988217f12fd68f3ec71d1e4ed3a2b5a1cf977
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
a7772128b7 [inline-completion] IJPL-161906: fix ApiCheckTest
(cherry picked from commit a4315003b7e57e9d52320190ddfabe2025541ca0)

IJ-MR-147762

GitOrigin-RevId: 083f8bfb58380aa196ab7d6462f6131a3d94aebb
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
e914cabe71 [inline-completion] IJPL-161906: properly register EP for InlineCompletionHandlerInitializer
(cherry picked from commit 9a52632fe8b2088a8c79deb575ea70050278c82d)

IJ-MR-147762

GitOrigin-RevId: 67c8eead5020325c007192c21d8c2d341f4cd78f
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
8a2df01f9b [inline-completion] IJPL-161906: fix tests for previous implementation
(cherry picked from commit 13aaf9f47552c723287575f94597bba9b0387743)

IJ-MR-147762

GitOrigin-RevId: 507d0f8377759bc9df4617805cae278b68a0db5d
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
1f354e50ef [inline-completion] IJPL-161906: support RPC for manual call events
(cherry picked from commit 81b61f5eb1f920ff1bada5c4fccce69921c8995e)

IJ-MR-147762

GitOrigin-RevId: 9eaec1769f9f8968c034658a651dd6e10f60897e
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
4070446f12 [inline-completion] IJPL-161906: support for partial accept
(cherry picked from commit cf14fd6ed0f238b66843853ae33f52359b8e18cc)

IJ-MR-147762

GitOrigin-RevId: 54c8d14567878a5f6ee59d8458aaad21c6ad5011
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
47cc3463a4 [inline-completion] IJPL-161906: support for synchronizing of 'hide' and 'insert'
(cherry picked from commit 7a2dd67869abb668dc2ec8ed9d59c7be6411a316)

IJ-MR-147762

GitOrigin-RevId: c1afbf62118fae69c1736088bd134c7386703742
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
074e9c1257 [inline-completion] IJPL-161906: support for SuggestionInserted and TemplateInserted events
(cherry picked from commit a647cb979a02a0b31d7ae447840b83a3ada4e044)

IJ-MR-147762

GitOrigin-RevId: dbab727719bad06dec72fbfbe5052f1a5f0a2f9c
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
508718fd1d [inline-completion] IJPL-161906: support for 'insert' and 'call' actions
(cherry picked from commit 1229e5dee4c8318880365c25deaca38df58caace)

IJ-MR-147762

GitOrigin-RevId: 4c99c775d129aa9b8387d60b39f6beee5734a727
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
e70b5f063c [inline-completion] IJPL-161906: initial implementation of synchronizing between frontend and backend
(cherry picked from commit ed1d3fe06b3f0437270b3c7726d231951db4b29e)

IJ-MR-147762

GitOrigin-RevId: 0210c433d1bcf89ab096fd20525a1f04d27907a0
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
390b0a378f [inline-completion] IJPL-161906: create a feature flag for new implementation
(cherry picked from commit dab6314153ee2f68138338f3b5a0ad7a8b15599f)

IJ-MR-147762

GitOrigin-RevId: 9199d30b132ca349421a8b8146f47d71b9e03b78
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
4a17b59bbf [inline-completion] IJPL-161906: use different InlineCompletionHandler for frontend and backend
(cherry picked from commit 3da8be95ad2d5d62c919eb1f2d439ae0899ff355)

IJ-MR-147762

GitOrigin-RevId: ae8315d479bb2b04a47eb24e24042549d23b6d21
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
1e75c0dea0 [inline-completion] IJPL-161906: allow customizing InlineCompletionHandler
(cherry picked from commit 81d630eaa7e8cc27aa092ba452d356865e481e93)

IJ-MR-147762

GitOrigin-RevId: 83be38696843f3e79856ea9cbf3ebdbe687aa5e7
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
97e64148c4 [inline-completion] IJPL-161906: implement RPC classes and common utilities
(cherry picked from commit 2b394db3b95ab0b132b69a79ba38d619f63d546c)

IJ-MR-147762

GitOrigin-RevId: afb152b83ac6a4506041d8bdafa54e609b05fddb
2024-10-28 14:25:22 +00:00
Kirill.Karnaukhov
346478159d [inline-completion] IJPL-161906: initialize a separate module for inline completion
(cherry picked from commit cf723012025c16869f992702b62c24f6e139a0b8)

IJ-MR-147762

GitOrigin-RevId: 47da1fd9225971db378c767940351fc7206367c1
2024-10-28 14:25:22 +00:00
Maksim Zuev
ed521e7d53 [debugger] Rename hot swap -> HotSwap
(cherry picked from commit 15a648ee4cd01ec9dc638214e3f3cd30a72c70c9)

IJ-CR-147819

GitOrigin-RevId: 1f62fe7c588175b9ba89d50daa909231aca5557a
2024-10-28 12:57:54 +00:00
Maksim Zuev
3a6c8fbeb9 [debugger] IDEA-361426 Hot swap button: limit the number of local history searches
* skip them when the number of modified files is large


(cherry picked from commit 7566075ccabd139f43adb4c8067203b40b4beedf)

IJ-CR-147818

GitOrigin-RevId: 0e7d7efb7ff0c8651518d51b55568bc95896209d
2024-10-28 12:55:53 +00:00
Yuriy Artamonov
703444c35a [ui] IJPL-162113 Context actions bulb incorrectly appears above caret line
(cherry picked from commit c10379a1a9380d7238d512d07fd771a574a6ac1d)

IJ-CR-147880

GitOrigin-RevId: bd49b928922c46541359fa640b48530b15bafdc0
2024-10-28 12:30:28 +00:00