Commit Graph

5895 Commits

Author SHA1 Message Date
Tagir Valeev
e02fbb2cfc [java-analysis] IDEA-375444 Speedup retrieving package-level nullity annotations
(cherry picked from commit 7be077c9a1a6b7fade1833689567b5947e2c77de)

IJ-CR-168171

GitOrigin-RevId: 01c5b38d7e028585b94d1596c0de8c7c323a2fa3
2025-07-11 10:25:52 +00:00
Tagir Valeev
fdd611f5ff [java-analysis] Pass nullability in PsiConditionalExpressionImpl::getType and in PsiCorrectedClassType
Fixes IDEA-375416 False-positive nullability report on lambda with ternary and null in one branch


(cherry picked from commit 5679bb57205cb4d49b9e87cbc4b8236c30aced67)

IJ-CR-168101

GitOrigin-RevId: 51f05c39d83d6e626c8e6f92984acd8b8026ef6e
2025-07-04 11:36:42 +00:00
Tagir Valeev
39d0278c3d [java-psi] PsiClassReferenceType: cache nullability
Should improve IDEA-374524 [regression] Degradation in spring-boot global inspections
Should improve IDEA-374525 [regression] Degradation in global inspections 12.06.25


(cherry picked from commit 5ab80c425e88d7a4954396ff104800732cec7097)

IJ-CR-166721

GitOrigin-RevId: d78d483c709751e5ea36bba32359f2042f59577b
2025-06-24 16:02:52 +00:00
Tagir Valeev
0ce7df963f [java-psi] Do not recompute PsiImmediateClassType nullability when possible
Should improve IDEA-374524 [regression] Degradation in spring-boot global inspections
Should improve IDEA-374525 [regression] Degradation in global inspections 12.06.25


(cherry picked from commit 63c1cec5bf3e1205ef3fa42655185f3c05c7dc23)

IJ-CR-166721

GitOrigin-RevId: 4da47800dec39841d308c8cc3fae2be62bf5a6fc
2025-06-24 16:02:52 +00:00
Tagir Valeev
94f84681ac [java-inspections] Redundant cast: do not report if there's a change in compilation errors within the parents
Fixes IDEA-372049 Erroneous RedundantCast inspection on varargs with nested calls
Fixes IDEA-361212 Redundant cast false positive: method call type changes

GitOrigin-RevId: d999fccd9a491445502e48bbab3f0b828ca98f6a
2025-06-16 18:45:28 +00:00
Vladimir Krivosheev
ef0323d07c IJ-MR-162467 don't export intellij.platform.core
GitOrigin-RevId: 05f350c1c087be1bf9b46d8bdac5345a65f55958
2025-06-13 21:52:48 +00:00
Louis Vignier
bcec85aa4f [javadoc] Mark links as data elements
#IDEA-365686 Fixed

GitOrigin-RevId: 791da00a46f9d0982ed939feb132737ad48746c8
2025-06-13 15:12:12 +00:00
Tagir Valeev
6cb3ca0045 [java-inspections] CreateLocalFromUsageFix: remove external annotations
Fixes IDEA-367190 NotNull annotation when creating local variable references library which is not in the project
Also: do not resolve reference for writing to a package

GitOrigin-RevId: 31f996515323e250d487bf9b7d343f101d788907
2025-06-12 16:51:42 +00:00
Tagir Valeev
4466a6556b [java-analysis] Use type nullability in DFA
Fixes IDEA-372347 Java type inference should respect nullability
Fixes IDEA-368244 Unexpected warnings when using @Nullable generic type bounds in @NullMarked context
Fixes IDEA-372223 Nullability inference for generic parameters
Fixes IDEA-367232 'Argument might be null' warning on JSpecify nullable enum

GitOrigin-RevId: 12745f82e22fadb35e23ad73f330501146c86b86
2025-06-12 12:11:23 +00:00
Nikolay Chashnikov
c2d557e204 [java] API cleanup: mark for removal deprecated unused API (IJPL-178044)
GitOrigin-RevId: 2aa137195af375b84adec0b7c350d6ae256eef53
2025-06-04 12:36:57 +00:00
Bart van Helvert
751be636a6 [core] Fix missing elements JavaCoreApplicationEnvironment
They caused UAST tests to fail locally. #IDEA-373647 Fixed

GitOrigin-RevId: fbc6bc6af2922761930469b7aa63f30b4754ec55
2025-06-04 11:59:04 +00:00
Vladimir Krivosheev
6cfd9eb094 remove last usages of ContainerUtil.newConcurrentSet
GitOrigin-RevId: ca4bb9daac9522d2460eaa339d012fa35cf65658
2025-06-04 09:09:58 +00:00
Louis Vignier
02149e6864 [javadoc] Support inline code in link labels
Introduce the DOC_MARKDOWN_REFERENCE_LABEL container element to support complex labels (comment data + inline code).

#IDEA-364475 Fixed

GitOrigin-RevId: a04680040c38223b88c63fd8df19be1c9593923c
2025-06-03 17:09:36 +00:00
Tagir Valeev
77f4733098 [java-psi] Do not inherit container annotation for top-level type of local variables
Part of IDEA-372347 Java type inference should respect nullability

GitOrigin-RevId: cc454107d11fff972970c720a526d6714aab85fb
2025-05-30 18:51:30 +00:00
Tagir Valeev
d50aac1df7 [java-psi] When instantiating generic type, take into account nullability source
Part of IDEA-372347 Java type inference should respect nullability

GitOrigin-RevId: cf25c2089eb8d53e1d40af01e58cc2c6615e9e81
2025-05-30 18:51:30 +00:00
Tagir Valeev
f987efc8a9 [java-psi] More substitutor work
WIP IDEA-372347 Java type inference should respect nullability

GitOrigin-RevId: ee69607739669d13aac13d535b3d789d2d9cd8cc
2025-05-30 18:51:30 +00:00
Nikolay Chashnikov
527e6577b9 [java] API cleanup: remove unused deprecated API scheduled for removal (IJPL-178044)
GitOrigin-RevId: d40c483b7b18fd193da4345ae9c8c472f355d47e
2025-05-28 23:37:49 +00:00
Tagir Valeev
cd1f1d9379 [java-psi] Substitution fix for nullability
WIP IDEA-372347 Java type inference should respect nullability

GitOrigin-RevId: a059f8847e1b7fb3800db6c10ada606edb023dfa
2025-05-27 18:12:36 +00:00
Tagir Valeev
786c11b372 [java-psi] PsiType#getNullability; initial implementation and tests
First step for IDEA-372347 Java type inference should respect nullability

GitOrigin-RevId: 47faf55e657ce6f15680c6183478b42a562a763f
2025-05-27 15:44:38 +00:00
Mikhail Filippov
40e854e522 IJPL-188826 bump Kotlin language version to 2.2
GitOrigin-RevId: 61c9fecae6a713d7e328e74b83186bc5d2f6bf66
2025-05-26 13:41:54 +00:00
Bart van Helvert
f6fa40b579 [java] LanguageLevel#values to LanguageLevel#entries
GitOrigin-RevId: 041c228279bb548f82c72297b308022a92030056
2025-05-25 12:11:04 +00:00
Bart van Helvert
400db98edf [java] Use JavaRelease in CoreLanguageLevelProjectExtension
#IDEA-369013

GitOrigin-RevId: e7ac9bc8ed38be27b3355e357c36a1ccfab0203e
2025-05-23 18:21:15 +00:00
Tagir Valeev
9bed95b431 [java-psi] PsiElementFinderImpl.getClasses: sort by name first
Sorting by scope might be slow and appears sometimes in profiles
May improve IJPL-181700 com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.runVisitor holds read lock for 700ms during typing processing

GitOrigin-RevId: 9342af5afa24a730711f25b2010f51aff54f85ef
2025-05-21 16:57:40 +00:00
Alexey Kudravtsev
6d1f55f160 cleanup: rename file to psiFile to distinguish from VirtualFile
GitOrigin-RevId: e718eac8ba2d2177787ae941d8525b3c154d10fc
2025-05-16 02:54:06 +00:00
Tagir Valeev
37ddc93765 [java-psi] PsiPackageImpl.getFiles: include individual files (IDEA-368975)
GitOrigin-RevId: c1247ab86ff0ab008ddd0d29174ce68b035496d9
2025-05-15 15:54:39 +00:00
Tagir Valeev
745eef9189 [java-psi] Support single-source file roots in various places (IDEA-368975)
GitOrigin-RevId: 2045de1f99ece67fe63a09f131664511167baf4a
2025-05-15 15:54:39 +00:00
Vladimir Krivosheev
6fa704d95d IJI-2602 fix super-class visibility
GitOrigin-RevId: 6ba76539d1e6b5e50227ce3d8cd1452f5f284e48
2025-05-14 10:39:04 +00:00
Vladimir Krivosheev
3a3013b232 IJPL-149126 fix method visibility (part 3)
GitOrigin-RevId: 3b9ce49a6a02034fd20698d26aea8f28b92f582b
2025-05-13 18:15:51 +00:00
Tagir Valeev
351c544efb [java-psi] PsiElementFinderImpl#processClasses: annotations
GitOrigin-RevId: 0fc8e9aad4c16ee3457672a37c756550259b437f
2025-05-13 14:04:47 +00:00
Tagir Valeev
2e85308268 [java] Add @NlsSafe
GitOrigin-RevId: ceeb1f5b7d19c8670951579a4bbaeaac0c06b40a
2025-05-13 14:04:47 +00:00
Louis Vignier
e9778dc4f4 [javadoc] Fix module links
IJ-CR-162377

GitOrigin-RevId: 79c67feda12b50374b9fee7a386115e7c5692480
2025-05-09 09:13:38 +00:00
Louis Vignier
e14ae0356b [javadoc] Rename DIV_TOKEN to SLASH
IJ-CR-159259

GitOrigin-RevId: 9c25fead8e96712d6d5f341494072b18999eec8a
2025-05-08 11:35:47 +00:00
Louis Vignier
3fb1e43d0d [javadoc] Fix target for links containing modules
#IDEA-370363 Fixed

GitOrigin-RevId: 4d315abe60cb933413d2d42d1a742d67f6721c12
2025-05-08 11:35:47 +00:00
Mikhail Pyltsin
38f373ab40 [java] IDEA-362896 JavaReferenceAdjuster.process executed on EDT slows down typing event processing
GitOrigin-RevId: cb0ac1e0396eb34272b17cea4a6835dcd67997b1
2025-05-06 19:49:35 +00:00
Ruslan Cheremin
a8938c42d0 [indexes] IJPL-181002, IDEA-327594: comments and TODOs
GitOrigin-RevId: 5704dcb47ac1ec33cbaebb710de1b277f790d521
2025-05-03 21:06:35 +00:00
Nikolay Chashnikov
420223fa77 [java] get rid of references to package-private members of intellij.java.* modules from other modules (IJPL-149126)
Visibility of some members changed to 'public' (with '@ApiStatus.Internal' annotation if needed), in some cases additional accessor methods are introduced to give access to protected members from classes which don't inherit from the containing classes.

GitOrigin-RevId: cb844c559e28bb8c3c5b293794e313918caaa16b
2025-05-02 08:05:38 +00:00
Tagir Valeev
6be41039b5 [java-psi] Single-file root class resolution: more Javadoc (IDEA-371097)
GitOrigin-RevId: 2d7d39ce662db10211716119d0ea5d98fc68299e
2025-04-30 15:03:19 +00:00
Tagir Valeev
8db8de2627 [java-psi] Basic support of single-file root class resolution
Fixes IDEA-371097 Class resolution does not work in single-file source roots mode

GitOrigin-RevId: cd0c150bbaf78771f2aceceb586cebd2250f6958
2025-04-30 11:17:10 +00:00
Andrey Zaytsev
b863723666 [platform] pull PsiManagerImpl used methods up to PsiManagerEx, remove downcasts to PsiManagerImpl
GitOrigin-RevId: 1c2e322a5a6f0fa61a2fb3194e1953c4c8e2640c
2025-04-30 00:08:35 +00:00
Bas Leijdekkers
f93991ab92 Java: fix implicit class' use scope (IDEA-371297)
GitOrigin-RevId: 1165c265bbb527d6474b5c10888ad8c7a683706f
2025-04-28 11:12:48 +00:00
Mikhail Pyltsin
61aa4fe474 [java] IJ-CR-159341 IDEA-370304 "Go to Declaration and Usages" seems to leak memory in both IntelliJ 2024.2 and 2024.3 (a lot of memory used by java PSI)
- move `USE_WEAK_FILE_SCOPE` to `GlobalSearchScope`

GitOrigin-RevId: 1e049676158a010d82ac528a15328ea717ba4681
2025-04-24 20:10:20 +00:00
Dmitry Batkovich
4934be49fd IJPL-185110 move java MethodSuperSearcher from java.psi.impl to java.indexing.impl
GitOrigin-RevId: 10f7eb068e7b009fc789289ce08795bb55b4c8a1
2025-04-24 00:13:01 +00:00
Mikhail Pyltsin
9b9c5fd3e2 [java] IDEA-365317 fix tests after refactorings (91abdd2d6f95d7940ec19ca573d9bbc76609f9eb)
GitOrigin-RevId: 2ca31243de2668ae475f3aace78c36cddb5edbf9
2025-04-22 18:28:04 +00:00
Dmitry Batkovich
6cb820f47c java: properly set language level on frontend:
* avoid memory leak when references to java files can't be GC-ed until project closed
* use global language level instead of per-project (the same as monolithic mode does)

GitOrigin-RevId: 4681d7f809661ee98bd7c2de8918dd4311f52977
2025-04-17 13:10:08 +00:00
Mikhail Pyltsin
00af2400fd [java] IDEA-370304 "Go to Declaration and Usages" seems to leak memory in both IntelliJ 2024.2 and 2024.3 (a lot of memory used by java PSI)
- use weak file scope

GitOrigin-RevId: f4d24ffa9ef29af589916f2e6da217b0bcbe7007
2025-04-16 17:12:41 +00:00
Mikhail Pyltsin
cc23f59407 Revert "[java] IDEA-370304 "Go to Declaration and Usages" seems to leak memory in both IntelliJ 2024.2 and 2024.3 (a lot of memory used by java PSI)"
This reverts commit a2377256f51e5867440aa22bf5b87bba33edcc91.

GitOrigin-RevId: 0ec2dc179a861c0499e386e87cd17257747de59d
2025-04-16 17:12:41 +00:00
Mikhail Pyltsin
4b49e84846 Revert "[java] IDEA-370304 "Go to Declaration and Usages" seems to leak memory in both IntelliJ 2024.2 and 2024.3 (a lot of memory used by java PSI)"
This reverts commit 104f02bbec697ff4ed6bc5ae02b17b01114d104e.

GitOrigin-RevId: 8e86099fc163fa80a405db360c901c0b5b3e58b1
2025-04-16 17:12:41 +00:00
Dmitry Batkovich
80f39095c8 java: move java psi to frontend (and drop a lot of almost duplicated code)
GitOrigin-RevId: 91abdd2d6f95d7940ec19ca573d9bbc76609f9eb
2025-04-15 20:14:56 +00:00
Dmitry Batkovich
11f92f1ce9 java: move decompiler EP declaration to intellij.java.psi.impl.xml
GitOrigin-RevId: e1182c73b2f5347393c8ba0864debad415801301
2025-04-15 20:14:56 +00:00
Mikhail Pyltsin
304ae1ace9 [java] IDEA-370304 "Go to Declaration and Usages" seems to leak memory in both IntelliJ 2024.2 and 2024.3 (a lot of memory used by java PSI)
- simplify api

GitOrigin-RevId: 104f02bbec697ff4ed6bc5ae02b17b01114d104e
2025-04-15 19:42:40 +00:00