Mikhail Pyltsin
14ed29db53
IJ-CR-167991 [java] IDEA-375376 Support JVM Runners for new instance main methods
...
-small refactoring
(cherry picked from commit 90f8ebc2feae64cb504e0ada6a5625bd25d0b6c9)
(cherry picked from commit 3077e1b9185fb214707c9ce20644ec0faa8b0de4)
IJ-MR-169535
GitOrigin-RevId: 46ff90b6d78ace4f4246c6c3c2e5482686d0926e
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
1945d7ab58
[kotlin][java-highlighting] KTIJ-34788 IDEA-372969 False negative: Instance 'main' method should be highlighted as unused
...
- check if it is java for instance main methods
(cherry picked from commit b848579f6fad413393198c974154e96288b83937)
(cherry picked from commit 010adcbaaa9db45b5f7a00e8b3b0a3edd7c323ee)
IJ-MR-169535
GitOrigin-RevId: ec7215f97f93a469ca366e812c15888337fbedc0
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
0af3e03979
[java] IDEA-375376 Support JVM Runners for new instance main methods
...
- deprecate `JvmMainMethodUtil`
- add some support for instance methods for JVM
(cherry picked from commit 52da3f1fd67a553028f85e43180dfd6bed43fa3f)
(cherry picked from commit bb847b99cc0fad51f079976f02095d931138b4a8)
IJ-MR-169535
GitOrigin-RevId: 4b36704b41640a3f5adf8cc2f80eb07b52b7622e
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
94cb552a54
[java] IJ-CR-167751 IDEA-375307 Incorrect run gutter with no-default constructors
...
-rename parameters and methods
(cherry picked from commit 199faa2f639410457bb7422f1dcca74541899c39)
(cherry picked from commit 232abbd0961d06ba7e805842483bec6157e17927)
IJ-MR-169535
GitOrigin-RevId: fd7aa2b17674e3afea790d2657b35008c6ddc6e5
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
b753c47e97
[java] IDEA-375307 Incorrect run gutter with no-default constructors
...
(cherry picked from commit e81e7325bfc55308677c713a5649fca83228bae8)
(cherry picked from commit e7b285c3acb7cfd8286d7c008f3833992819a15b)
IJ-MR-169535
GitOrigin-RevId: 2c3b886f0c8d76a63776edce7adc181a84d16674
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
008fe59e19
[java] IDEA-375307 Incorrect run gutter with no-default constructors
...
(cherry picked from commit 686cacbd3dde12095f91f97e0c6246b84ebba792)
(cherry picked from commit 6ab0f507738a059a1bd0f94f7b24ff7cb101edc6)
IJ-MR-169535
GitOrigin-RevId: 6a8ec869cef4eb34b2591c5ea3cca5b8a1c44e0b
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
5fa62ff23e
[java] IDEA-374935 Wrong gutter for static inherited main method
...
(cherry picked from commit 1772d147ecd72520f81c1a9a567844a5779728cc)
(cherry picked from commit e7b73610078623fabd153da669e974f295b96420)
IJ-MR-169535
GitOrigin-RevId: 7887998c7f50daea5769198bef236f160a3a530a
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
50d43c5da8
[java-inspections] IDEA-374922 Highlight the second main method as unused (part of IDEA-372969 WIP)
...
(cherry picked from commit 11bc0dcd62d29f94270781ea5a79f4665575d0a9)
(cherry picked from commit 03652b1251e91b2245979593f2fb47f734da8c68)
IJ-MR-169535
GitOrigin-RevId: cd310f32c68c96d1cdb5cb81d67952c56c571933
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
768015e43e
[java] IDEA-373074 Improve SOUT templates for java 25
...
-delete todos
(cherry picked from commit 58071de495b345061cc5d17aea25780330d9d9ac)
(cherry picked from commit f4d63ca7f8931f3f2da6765faebdfd6be9fee05a)
IJ-MR-169535
GitOrigin-RevId: be01748fc122544b3a8b75a2416d465f711e247b
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
845ea744cc
[java] IDEA-373074 Improve SOUT templates for java 25
...
(cherry picked from commit 688a0f2ccefaa6f3f9b51c8528fa11e61d0798b0)
(cherry picked from commit e7979c1d2177b555cf816a20bb76720703f2e84a)
IJ-MR-169535
GitOrigin-RevId: 7cebb5b39a388c2c53e7f338f30669856bdd4c2a
2025-08-04 12:58:49 +00:00
Bas Leijdekkers
39ae7a117c
Java: fix type inference for switch expressions (IDEA-311533)
...
(cherry picked from commit 153bc92d71655760c10d5b7e42d3600310845f42)
IJ-CR-169493
GitOrigin-RevId: abb04fd700cb2bbf746bbd644117854929ef36b8
2025-07-25 10:26:32 +00:00
Tagir Valeev
a0fec72e48
[java-analysis] IDEA-375799 Container nullability annotation on the method has no effect on method return type
...
(cherry picked from commit f7cead47f32b2befeabe116a6c2df87682cb1cd2)
IJ-CR-169010
GitOrigin-RevId: 036988a6259830532f2174c60c39996d71efe819
2025-07-22 16:38:53 +00:00
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
ec0da951fe
[java-analysis] Remove old algorithm for determining type nullability
...
Now, new one could be used which is more correct
Fixes IDEA-375493 Nullability of generic type with several bounds depends on bounds order
(cherry picked from commit 24e8aab73704d9b2b5ea7e47215bfeeadaed2f26)
IJ-CR-168211
GitOrigin-RevId: 0e1c558d93eeaba4054da535520411df8ac7b24f
2025-07-07 17:49:49 +00:00
Tagir Valeev
eabc1a5902
[java-analysis] IDEA-375487 Nullability doesn't work for captured wildcard type
...
(cherry picked from commit ff31ea679c0497709d0141a3ecfbf988600872e3)
IJ-CR-168211
GitOrigin-RevId: c8c22fcb6a61fe816280f0dbe434f75199b3d850
2025-07-07 17:49:49 +00:00
Tagir Valeev
46136163d4
[java-analysis] IDEA-375470 Type parameter with nullable bound within NullMarked scope should be nullable
...
(cherry picked from commit c8c264ab40180c7982ac8d5d886841323578348b)
IJ-CR-168211
GitOrigin-RevId: d06dde36cfd09c0ca2b1d921537e2bb73f371871
2025-07-07 17:49:49 +00:00
Tagir Valeev
704ded1064
[java-psi] NullabilitySource: fix merging several multi-source nullabilities
...
IDEA-374838 Java code analysis stucks in resolve due to deeply nested TypeNullability objects
(cherry picked from commit 9274431af458ec6a997878eca8647947a48f5251)
IJ-CR-166631
GitOrigin-RevId: faaa24e9c6e0242d08bd0897d5b9c70bae1154ec
2025-06-24 12:37:32 +00:00
Tagir Valeev
4aa0af0eac
[java-psi] ContextNullabilityInfo: more javadoc
...
(cherry picked from commit e666b63d135a44dbe13e7a5949c268759488132f)
IJ-CR-165909
GitOrigin-RevId: 03ce629a67f932bc0dad7cd5b693cb69b80721ba
2025-06-23 15:39:54 +00:00
Tagir Valeev
ddf84964a0
[java-psi] Cache container nullability
...
Should improve IDEA-374524 [regression] Degradation in spring-boot global inspections
Should improve IDEA-374525 [regression] Degradation in global inspections 12.06.25
GitOrigin-RevId: d3ad7ec223fa8cb53034f68b38be260283e8b3a9
2025-06-16 15:03:39 +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
Tagir Valeev
bd8664ff95
[java-psi] PsiWildcardType: postpone base nullability initialization
...
Should fix KTIJ-34528 StackOverflowError from FirKotlinUastResolveProviderService
GitOrigin-RevId: d3bca1c6ba50eb3b1063d2f9decd04c1660c8f02
2025-06-13 14:29:26 +00:00
Tagir Valeev
b56c24001e
[java-inspections] Report incompatible instantiation
...
Fixes 'nice to have' parts of IDEA-372223 Nullability inference for generic parameters
GitOrigin-RevId: fe9490c352ee417b8a4146076632ef42790a4d25
2025-06-12 12:11:23 +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
Tagir Valeev
9565341708
[java-psi] Support annotations directly on wildcards
...
Usually, they are not allowed, but let's read them
Part of IDEA-372347 Java type inference should respect nullability
GitOrigin-RevId: 8bb222c158e2e62e185f0a57d6608462b2c89883
2025-06-10 16:25:11 +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
c04b0db6ca
[java-psi] NullabilitySource: fix package support
...
Part of IDEA-372347 Java type inference should respect nullability
GitOrigin-RevId: 5cac76b4684e3b22e17822c58264be1640e15beb
2025-06-02 15:35:47 +00:00
Tagir Valeev
33488fe4c6
[java-psi] PsiEllipsisType#withNullability
...
Part of IDEA-372347 Java type inference should respect nullability
GitOrigin-RevId: b612892b0c932d06118615231fd1980ebc386717
2025-05-30 18:51:30 +00:00
Tagir Valeev
28463a9345
[java-psi] JavaTypeNullabilityUtil: robust against no nullability manager
...
GitOrigin-RevId: a3d8c80c9b915e541817509b47b238b9413f1b90
2025-05-30 18:51:30 +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
89d988603c
[java-psi] getVariableTypeByExpressionType, eliminateWildcards, captureToplevelWildcards: support nullability
...
Part of IDEA-372347 Java type inference should respect nullability
GitOrigin-RevId: e032baa0122a1009acbd81c061635459d1dc6d6a
2025-05-30 18:51:30 +00:00
Tagir Valeev
5259525948
[java-psi] NullabilityAnnotationInfo: equals/hashCode
...
GitOrigin-RevId: c9f6edf9c1f4a45f04a8ca1ded4a86fa6e68045d
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
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
Bartek Pacia
f419dbbb08
[java-inspection] IDEA-251700 ClassCanBeRecord: support converting classes with many constructors
...
#IDEA-251700 fixed
Merge-request: IJ-MR-160901
Merged-by: Bartek Pacia <bartek.pacia@jetbrains.com >
GitOrigin-RevId: f0a1224846e203a3dc6638270d665354dcf14fb4
2025-05-27 06:53: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
d1e0622170
[java] Migrate LanguageLevelProjectExtension to JavaRelease API
...
#IDEA-369013
GitOrigin-RevId: 6e31c3c0f8c8680641efbcd631fc11d60706507c
2025-05-22 17:00:06 +00:00
Tagir Valeev
8344605e41
[java-psi] LambdaUtil.getFunctionalInterfaceType: force returning null type for variables with inferred type
...
Otherwise, we may have a chicken-egg problem, when the inferred type is computed using its initializer and the initializer type is computed using the variable type which is not computed yet
Fixes IDEA-371650 [Java] test problem com.intellij.java.codeInsight.daemon.LightAdvLVTIHighlightingTest.testSimpleAvailability: Non-idempotent computation
GitOrigin-RevId: 69f4608ea9ba6ce98cda8c02acdc51134d4c5552
2025-05-21 16:57:40 +00:00
Tagir Valeev
1d9df9dd02
[java] PackageIndex: a separate method for getPackageName not only by directory but also by file (IDEA-368975)
...
GitOrigin-RevId: b1d18ecde7b5d9759e3edd196d3b7baf0d49da00
2025-05-19 15:56:41 +00:00
Tagir Valeev
74800bc0b5
[java-dfa] Support annotation nicknames in getAnnotationNullability()
...
Fixes IDEA-372080 Invalid null check for array with @Nullable
Also: do not attempt to fill nicknames in dumb mode
GitOrigin-RevId: 7955160a958d9891d382ef2736d4c72fe926dbbf
2025-05-15 16:11:33 +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
Mikhail Pyltsin
66b1e9b6e5
[java-import] IDEA-369199 Preserve module imports even if they are not used
...
- fixed inconsistency
GitOrigin-RevId: 610b42d224f7733de0ca9e250ffc1dfcff5d75fd
2025-05-14 20:29:11 +00:00
joe
75ecbf846d
[ByteCodeViewer] IDEA-372346 Fix local classes not working
...
Allow local classes to work with bytecode viewer.
Add a method in ClassUtil that takes into account anonymous and local classes
and move duplicated logic into that method.
Presumably, everything that used JavaAnonymousClassesHelper wanted local classes too.
Also deprecate ClassUtil#getJVMClassName
#IDEA-372346 fixed
closes https://github.com/JetBrains/intellij-community/pull/3044
GitOrigin-RevId: 7d300719c079d3de5a7cb589d50431326526faa0
2025-05-14 12:21:07 +00:00
Tagir Valeev
4ba9d7ecc8
[java-psi] Fix package scope for single-file source roots
...
Should fix IDEA-372529 Use scope is wrong for single-file sources
GitOrigin-RevId: c6189758cd5039d09dd9a37bdac003f7b4633edb
2025-05-13 14:04:48 +00:00
Tagir Valeev
07de0e9422
[java] PackageIndex: improve Javadoc
...
GitOrigin-RevId: 289a268166b4ba316e62534ccaa2de43a4f0b358
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
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
Bart van Helvert
f68d8e35de
[java] Move the highest released language level API to Java PSI module
...
#IDEA-369013
GitOrigin-RevId: 1217e1da916f391eb61e499d9b487a7113d5c1df
2025-04-30 15:06:53 +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