Commit Graph

17427 Commits

Author SHA1 Message Date
Bas Leijdekkers
9a906a8753 Java: inner class accessing local variable or parameter can't be static (IDEA-375602)
(cherry picked from commit 1b16d1388c09d51009b288ede89e73d156364619)

IJ-CR-168593

GitOrigin-RevId: 7ff7cfa95cdc674c5b1d32a572eec0b95bbfb58d
2025-08-11 15:06:55 +00:00
Mikhail Pyltsin
42f33aa5f9 IJ-MR-171281 [java-inspection] IJ-CR-170128 IDEA-376232 JEP 512: 'safe delete' for 'args' in main method in the compact source file at the first place in the list of suggested quick-fixes
- fix conflicts

GitOrigin-RevId: 23eacf462635c4ed0068fffb51d6abcab305ffc8
2025-08-04 17:39:34 +00:00
Mikhail Pyltsin
7b4509504b [java-inspection] IDEA-376232 JEP 512: 'safe delete' for 'args' in main method in the compact source file at the first place in the list of suggested quick-fixes
- return ordered quick-fixes unused inspections

(cherry picked from commit b4abe529ad318430466b3e3e9d39dd2d12916a3e)

GitOrigin-RevId: 58d37e7cf5fac5425e4b15aa27cd7c5a6a69e175
2025-08-04 17:39:33 +00:00
Mikhail Pyltsin
601316af28 [java] IDEA-375577 Experiment with 'Compact source file' as a separate action
- always show compacts in list
- add default name

(cherry picked from commit ecd72181f4e0d846389df26210b481e358260261)


(cherry picked from commit fbf4436c7f217e4f51c61a68eb19119f1dbc393e)

IJ-MR-169535

GitOrigin-RevId: 8ce010a88de6f52400181b025cffe1b5818797e5
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
3e2d137fdf [java] IJ-CR-167924 IDEA-371865 Inspection to convert 'System.out'<->'IO'
- add array case

(cherry picked from commit fb6b84584ef3778f9b03216d3df57bfea1433b84)


(cherry picked from commit 75d20e2763b7b7506ccab939805cd9d18aa3d745)

IJ-MR-169535

GitOrigin-RevId: 8268a8491f2be9eedca68f0d75f71ac61e6f7795
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
d3b08c4011 [java] IJ-CR-167924 IDEA-371865 Inspection to convert 'System.out'<->'IO'
- add case for several qualifiers

(cherry picked from commit e422d2f595e29a3ff3f56f01dbbc6fa7c52d9e8d)


(cherry picked from commit 9c9de1fd8fb36723bec6c894426267aa03742be6)

IJ-MR-169535

GitOrigin-RevId: 988ca7a3fa9775dac4aee1468f8a2ba26907bfe4
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
b29c793883 [java] IDEA-375577 Experiment with 'Compact source file' as a separate action
- move caret inside body
- move action under Java

(cherry picked from commit b8dddfd9711b4f3b251ec935b781518f64716bbf)


(cherry picked from commit 678f25cae5f8b3c2887a897ef76da2fb187d5ce9)

IJ-MR-169535

GitOrigin-RevId: 9a6e0bb40e686589e2a33bff1d833bbdcd6dea52
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
cae5987ba6 [java] IJ-CR-167924 IDEA-371865 Inspection to convert 'System.out'<->'IO'
- extract "java.lang.IO"
- tests for allowUnresolved
- more reliable works with varargs

(cherry picked from commit 8376baaa86afa3806cb096cffd42e9ed0db0d451)


(cherry picked from commit 78c8b1aed86c1414989a5a83b9e7d54ca5ed83e0)

IJ-MR-169535

GitOrigin-RevId: 704e1b94c19dbf07d5371b8989164070db2cd860
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
13a06ddd5f [java] IDEA-375577 Experiment with 'Compact source file' as a separate action
(cherry picked from commit 448f88ce96042ed144d922ca80aeb0bfcfde8be6)


(cherry picked from commit d904019061229c07fe5df4ed717069ec06e0fd06)

IJ-MR-169535

GitOrigin-RevId: 3bacb8104f0bde46fc4185cfa7743786d5111298
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
fdab4d3999 [java] IDEA-371865 Inspection to convert 'System.out'<->'IO'
- fixes for comments
- simplified replacement
- support char[]
- support ImplicitArrayToStringInspection

(cherry picked from commit 49f9f829821a498259aa53ebb12cd0b0007f1238)


(cherry picked from commit 5f4445631fa55911d98477066d3821423c37ec11)

IJ-MR-169535

GitOrigin-RevId: cf93370312fc5fbe632eb73ca8840d157732da50
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
6786371e60 [java] IDEA-374935 IJ-CR-167494 Wrong gutter for static inherited main method
- more reliable test

(cherry picked from commit 5e2fbe6611e016d4384ff1bb17e7c069f1b2fcbd)


(cherry picked from commit d4895371ffa6c3fc089d3a7ad51126cace1d5450)

IJ-MR-169535

GitOrigin-RevId: b530d44ecfadd2feb612b265bc469cdd2587890d
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
adbee4d116 [java] IDEA-371865 Inspection to convert 'System.out'<->'IO'
(cherry picked from commit fdb87ffc06388bd022224000c7b4e8d9e2013e9d)


(cherry picked from commit 0b859951fc41c73a63773e00059af72f7975a0c5)

IJ-MR-169535

GitOrigin-RevId: 93fb176f7dabaa17a663e4d5c8a9d634eecf2100
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
c9b0e755ce [java-highlighting] IDEA-372969 Support JEP 512: Compact Source Files and Instance Main Methods
- set language levels for features
- fix tests
- new tests for new language levels

(cherry picked from commit 5259088ac10962f8f9373fbea29e01adb2bf7333)


(cherry picked from commit 4940a2ab6b683285d979c8aa0f86cbb775e9059d)

IJ-MR-169535

GitOrigin-RevId: 38e23b3294a45eacc56947e43c2b6d93c80da9cb
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
08cc5dd193 [java-highlighting] WIP IDEA-372968 Support JEP 511: Module Import Declarations
- test for quick-fix "increase language level"
- fix templates

(cherry picked from commit 37009091dc826c81d496e90cdb3a2c3b2da147c3)


(cherry picked from commit c0f3ed9451db84ec02e4e3af118f82f5bc4d7fdf)

IJ-MR-169535

GitOrigin-RevId: 7e4152035b0502b6229747ef55056b5cd613359a
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
a20e0b6340 [java-highlighting] IDEA-369743 Incorrect proposed language level for fixes for "statements before super"
(cherry picked from commit 94aaaa37713d2df34c939298d3bc1be721e7ac38)


(cherry picked from commit 864adf41e4b630de48aebd9719b39e24777aa890)

IJ-MR-169535

GitOrigin-RevId: 88137eae05c26682b1a373a59cea99d25aea0577
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
983e07a608 [java-highlighting] WIP IDEA-372968 Support JEP 511: Module Import Declarations
- normalize definition of language features
- add comments

(cherry picked from commit f91cb0acfef04c7203d129190b9e95b46550ab7d)


(cherry picked from commit 8694a595305b8a4e25f292a22c7d477bd1c4d113)

IJ-MR-169535

GitOrigin-RevId: 4f3f9c938ec2889ebdd182a1905a69e369259b28
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
b42574277b [java-inspections] WIP IDEA-374760 Move implicit classes inspections to Java 25 migration aids category
- move to java 25 folder
- update tests and fix error with incorrect resolve with new language levels
- IO.println will be updated later

(cherry picked from commit 93985096433766e33178da6048ce4554063841a2)


(cherry picked from commit 1245b45c8ef5860d2b27441666bd6eb4eea8df75)

IJ-MR-169535

GitOrigin-RevId: 416752bfd6663f4ebd684ec1a7273900c73b155d
2025-08-04 12:58:50 +00:00
Mikhail Pyltsin
26de6fc1df [java-highlighting] WIP IDEA-372969 Support JEP 512: Compact Source Files and Instance Main Methods
- update language levels partially
- fix tests

(cherry picked from commit 8d7b599772eda8dfd999bee9f816ec2609be4adb)


(cherry picked from commit 98a507ba78b8fc496651b5800fc3936c9c87b689)

IJ-MR-169535

GitOrigin-RevId: 898e8b4dfc303eb60da6cfff5d756304c461c424
2025-08-04 12:58:49 +00:00
Mikhail Pyltsin
2111b032dc [java-highlighting] WIP IDEA-372968 Support JEP 511: Module Import Declarations
- nothing changed in jep, more tests

(cherry picked from commit 03e655a19855acdfe1f7983b25c6aa7158b73393)


(cherry picked from commit fab1d353a464fd4585aa86ef7fe7595f01793aa5)

IJ-MR-169535

GitOrigin-RevId: 1c0782d7c341c0f9e2ff1b3704f13e5e94dadcb7
2025-08-04 12:58:49 +00:00
Mikhail Pyltsin
88d9028b60 [java] IDEA-374214 Support JEP 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
- there aren't changes, just new tests for java 25 and java 25 preview

(cherry picked from commit 1d73ea675b90c8e3380152ecbad6853431400e2d)


(cherry picked from commit eaa5a77e47e7b9ff4b423d1080c4e0b5c399fd69)

IJ-MR-169535

GitOrigin-RevId: 448392699fa88bee2d06bf0b4949f5d33405c986
2025-08-04 12:58:49 +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
Bartek Pacia
ecfb4551aa [java] IDEA-372997 Add tests for availability of Structured Concurrency templates
(cherry picked from commit c60edd41d08a99bdb6bf79baaacbd9bca2bdc28b)


(cherry picked from commit 5f2baebff482d5fe659dc608047fbbbe9a39de7e)

IJ-MR-169535

GitOrigin-RevId: 57676d655d39fec188c1524cd5c521835b849070
2025-08-04 12:58:49 +00:00
Bas Leijdekkers
9d345bbb34 Java: report local class instantiation from a different static context (IDEA-372971)
(cherry picked from commit 6bc936ee3dd849db2db187b03edac58f4c9b2c73)


(cherry picked from commit 18853b7d75a40f6a8761489a5655602be915a1ba)

IJ-MR-169535

GitOrigin-RevId: 058ac27f8f0ef5c605c962e596711dafb1eeb5fc
2025-08-04 12:58:49 +00:00
Bas Leijdekkers
b40bf5fa17 Java: enable Flexibile Constructor Bodies in non-preview language level 25 (IDEA-372971)
(cherry picked from commit c0b12174a7dc60cfdf662d7d6d3bc576e734e4d4)


(cherry picked from commit 2eedee3626d857d5ed3f0de3598b104440e0be02)

IJ-MR-169535

GitOrigin-RevId: 4e32bfa0b1344ea6e8cdc613bbc3c015f70c7912
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
Mikhail Pyltsin
a8d0a77229 [command-completion] IDEA-375804 Impossible to find CommandCompletionType
(cherry picked from commit 168553d5b5bce830d4a231115f4c5b734eacf788)

IJ-CR-168918

GitOrigin-RevId: aa56e2e8ebd4e84438e64f8a24528c3385b8c17a
2025-07-14 14:13:24 +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
Mikhail Pyltsin
f313f02b1d [command-completion] IDEA-375693 Command completion. Java. Impossible to rename parameters
(cherry picked from commit f010d3e3bf3e7450e3ef7e592ef24042a8e27ac7)

IJ-CR-168714

GitOrigin-RevId: d10eba3bde92ae26fdea6d71b2b895b0d381c7d5
2025-07-10 14:33:40 +00:00
Mikhail Pyltsin
b94a54ed9d [command-completion] IDEA-375658 Incorrect matching for first letters with empty lines
(cherry picked from commit c6c39ae18912643e50e6e14e6a044e3b9c5fa696)

IJ-CR-168585

GitOrigin-RevId: 93c49cefe6ae900a7363ae16e60405401bd03e8c
2025-07-10 12:08:07 +00:00
Mikhail Pyltsin
df71eaf677 [command-completion] IDEA-374653 Don't return the text of command completion after 2 x ctrl+z
(cherry picked from commit b95df5fdf71ae8af1e3f431918b00ad07b0b7d43)

IJ-CR-168586

GitOrigin-RevId: 6bc258ae8dc2d937fd469c057d6bf57491d5733d
2025-07-09 16:07:23 +00:00
Vojtech Balik
8a19e2350d [formatter] IJPL-192081 add tests that "Reformat Code" action is enabled
Test cases in ReformatCodeActionTest now also assert the action is available before performing reformatting and checking results.


(cherry picked from commit e182aa7bb8b8f998f0e7f80f198d308cfdd0e13e)

IJ-CR-168122

GitOrigin-RevId: e8706a0ea858d6e80c9de1e3ac88bfa9907ef7d8
2025-07-09 11:11:23 +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
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
Mikhail Pyltsin
33c6b4bdde [java-completion] IDEA-374745 Incorrect 'args' completion for instance main method
(cherry picked from commit a3ce9daf401e5569b7471b44bd6453394a64b1ef)

IJ-CR-166422

GitOrigin-RevId: 81c19c9d446229f87a4a7cbf9aa5facdbf956a62
2025-07-02 18:41:00 +00:00
Sergei Vorobyov
642501051d [DependencySubstitution] fix: don't deduplicate same library coordinates
The same library coordinates can be associated fo different LibraryEntity instances that points on the same logical libraries. For example Maven and Gradle creates LibraryEntity with different ids, for the same library, because Maven adds the "Maven:" prefix for a library name, Gradle adds "Gradle:".

### Issues
  * IDEA-374892 Library dependencies aren't substituted with different names and same coordinates
  * IDEA-370483 Maven performance degradation related to library dependency substitution


(cherry picked from commit 2c89f84c1374c5d9373eb590df74565713f13de4)

IJ-CR-167051

GitOrigin-RevId: f0a9432e576cd1ab50f991c5c83ea8cb8020c77b
2025-06-26 22:00:28 +00:00
Tagir Valeev
e79d3d8824 [java-highlighting] IDEA-374968 Red code in ConcurrentSkipListMap.java
(cherry picked from commit cfb9b5cbf965190668e9cb4cb9ed102f26fcd3f7)

IJ-CR-166980

GitOrigin-RevId: 529629a073d5107bd13a12203f0528b49e3b5613
2025-06-26 14:43:03 +00:00
Tagir Valeev
070236d4d2 [java-refactoring] Shorter message for collision popup
Improves IJPL-190894 A renaming warning is truncated in inline popup


(cherry picked from commit 9a596dac199cf536722fb2d394e8ca532e5cecf4)

IJ-CR-166110

GitOrigin-RevId: 4e6bffec3aed60f976298c53c46313fb66e27a61
2025-06-23 22:15:25 +00:00
Ruslan Cheremin
b3870481f5 [vfs][monitoring] add shard# to indexing-diagnostics html report
(cherry picked from commit 5c618308d630306f3f76b895ccdd129187501745)

IJ-CR-166100

GitOrigin-RevId: 38b88f0c3b1056dead7a2e18bca1e0c5ea771f1b
2025-06-19 13:55:01 +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
Alexey Kudravtsev
d065c9a3fe IJPL-183776 unknown identifier blinks from red to white to red as you type
GitOrigin-RevId: 1d1b9d4a8f56a0cb85bdbc0ba74f6304c1a4ee41
2025-06-16 15:59:09 +00:00
Alexey Kudravtsev
eac34fc409 fix tests running locally (avoid unrelated pass factories like TypeScriptDirtyTrackingFactory influence tests)
GitOrigin-RevId: 2d1d9853c9aab387b2a1a6bc6e807413cb71053f
2025-06-16 15:59:09 +00:00