Commit Graph

695 Commits

Author SHA1 Message Date
Tagir Valeev
59325634ab [java-inspections] IDEA-356832 Inspections ignore redundant Class::cast method call
GitOrigin-RevId: 390a19d69020bc91f1395e6c4d23f14992ca396b
2024-08-28 17:54:26 +00:00
Mikhail Pyltsin
cb37003541 [java-inspections] IDEA-357323 Propose case null during adding all cases
GitOrigin-RevId: 6d7ffccc28d64ed0f52db0235c41796d1d81284e
2024-08-09 11:00:42 +00:00
Aleksey Dobrynin
44e14f0283 [java, highlighting, import-module] Check access module names for Module Import Declarations DEA-356710
GitOrigin-RevId: 819c182488bd0b4aeffb8518373da35aabf311ca
2024-07-31 17:00:00 +00:00
Mikhail Pyltsin
0b30038602 [java-highlighting] IDEA-356470 Support jep 455. Generate true and false cases for boolean selector
GitOrigin-RevId: fbd879f172639f3db1b0d9c12f98fcb3868fa1a9
2024-07-18 20:11:33 +00:00
Nikolay Chashnikov
273f3a0aa9 [analysis] API cleanup: provide default implementation of deprecated RefManagerExtension::getLanguage and eliminate its usages (IDEA-355906)
GitOrigin-RevId: 05b2559ed353deb0baa5754fcef6074791e9cb5e
2024-07-17 10:04:59 +00:00
Tagir Valeev
d52f6c789f [java-dfa] IDEA-355908 Add new mutation contract option: io
GitOrigin-RevId: 206fae268d8444d475a4feac6ebc5ef96ffc57bb
2024-07-04 21:05:23 +00:00
Tagir Valeev
b023c1d252 [java-highlighting] error.unnamed.variable.brackets: proof-reading
GitOrigin-RevId: b30031e9d76de357434f48e71b099cf27d4b90e4
2024-07-03 17:42:16 +00:00
Bas Leijdekkers
14315c7ca4 [java] introduce language level for Java 23
GitOrigin-RevId: d64d154c243f5c1810bf08790a1df44a6ac948cb
2024-07-03 10:13:47 +00:00
Bas Leijdekkers
994cd7442a [java] all language levels except experimental should have an api list
GitOrigin-RevId: 078af83fe56039aa5a87cedade2981be4a93bd7a
2024-07-03 10:13:47 +00:00
Bas Leijdekkers
eda10a8961 Java: update api list for java 22
GitOrigin-RevId: 21e13a522e2e70337d7e49dc79cce796e1f4bf8b
2024-07-03 10:13:47 +00:00
Bas Leijdekkers
6916b6b005 Java: better error message when there are more arguments than parameters (IDEA-336129)
GitOrigin-RevId: a17a5f0f3878b9baf211737a614d1aa1a5103d31
2024-06-28 17:14:56 +00:00
Bas Leijdekkers
d1f0e0880a Update "Unused declaration" messages for increased clarity
GitOrigin-RevId: 8bb4dd31d51f3cc4fb63c36579bd3078f6f622f7
2024-06-21 09:13:05 +00:00
Tagir Valeev
522f2ab43e [i18n] Fix internationalization warnings
GitOrigin-RevId: 7b4a959cf215d79d86d6d9a7727f0fc054097517
2024-06-18 13:46:50 +00:00
Tagir Valeev
567e0b0d05 [java-intentions] IDEA-270206 Nullability annotation at type parameter/wildcard: add a quick-fix to move it to the bound
GitOrigin-RevId: e8e56c2d27a77414045064c784f48ff712ad0d2d
2024-06-14 16:05:02 +00:00
Vladimir Krivosheev
cf88750587 UastMetaLanguage - do not use static init
GitOrigin-RevId: 6573f40b8c9091977178b5b9efcacc0b07dc0084
2024-06-14 13:10:28 +00:00
Vladimir Krivosheev
6334491a93 refactor UastMetaLanguage
GitOrigin-RevId: c619a349e34f476351deeba9f92c7019c6919601
2024-06-14 13:10:28 +00:00
Vladimir Krivosheev
bfbfabca59 Rename .java to .kt
GitOrigin-RevId: 2d45cdc76b86c2e788bf42913c5ab24ae07729ce
2024-06-14 13:10:28 +00:00
Bas Leijdekkers
7225738dae inspections: more clear presentation for unused declarations
GitOrigin-RevId: c60846f8be2cc4e33fa525e6bc39123b3d1e89b3
2024-06-04 00:44:50 +00:00
Tagir Valeev
3b688121d2 [java] IDEA-353981 'Rename to ignored' fix: ModCommand, allow 'fix all' action
GitOrigin-RevId: 83676caca1d4a0f6308d649efd92d6f58845b57e
2024-05-23 19:00:36 +00:00
Bas Leijdekkers
f668f5a02e [java] javadoc
GitOrigin-RevId: 079f44c6020a1eeb86126e93e08697aca5a7658c
2024-05-23 12:46:43 +00:00
Tagir Valeev
8fad668268 [java-inspection] IDEA-345669 Report value compared to itself with == or !=
GitOrigin-RevId: 601c0bb6c5beddaace52d3b094506d2229195d37
2024-05-15 15:55:21 +00:00
Tagir Valeev
ee495db972 [java-intentions] MoveMembersIntoClassFix: improve and revive property test
After implicit classes, out-of-class member is parsed. If it was mistakenly put out of the class, it may have many unrelated compilation errors. E.g. extra Override annotation, unresolved reference (to another member of the class), etc. These errors were masking the 'Move member to class' action, because its scope was larger (the whole method).
Now, we put 'feature not available' error specifically to the method/field name identifier, so it's almost always available. Also, action name is more friendly now, and JavaOutOfClassDefinitionPropertyTest is tuned: caret position and language level set correctly.

GitOrigin-RevId: 39917d11fb216be4db3f6fbc9e984ca7378f7302
2024-04-23 10:35:24 +00:00
Tagir Valeev
a3e3ed8591 [java-highlighting] Remove extra space
GitOrigin-RevId: 98a9c2395ef5f9605d39029dfe5e695d76c4237e
2024-04-23 09:43:59 +00:00
Tagir Valeev
11097530d4 [java-intentions] Remove outdated MoveMemberIntoClassFix.java
Superseded by MoveMemberIntoClassFix.java

GitOrigin-RevId: cc3a29aa7089f91ff5c13a61e722c0ad3843985e
2024-04-22 19:34:03 +00:00
Tagir Valeev
f943967aec [java-inspections] Minor fixes for IDEA-346242 Add 'minimal java version' clause automatically to inspection descriptions
1. Add features to assertion inspections
2. Remove redundant feature message from HTML descriptions
3. Display Java 1.3 and Java 1.4 version properly
4. Display several features when necessary

GitOrigin-RevId: 133b46152ad8376a37aa4fd847bedf38d45f3135
2024-04-05 10:20:31 +00:00
Bas Leijdekkers
9e22b48c16 [java] show containing file name of implicit classes in batch inspection results (IJ-CR-130524)
GitOrigin-RevId: 280b18e1a50ed18db8dfcc79ce95dc2d9669f9df
2024-04-03 14:14:27 +00:00
Tagir Valeev
15c815e7e2 [java-analysis] LanguageLevelUtil: cosmetic, javadoc
GitOrigin-RevId: f3fe627da3d6a72b94d88e2bb3bd945ad9d148ae
2024-04-03 09:29:41 +00:00
Bart van Helvert
fdbb442f08 [java] Fix getForbiddenApi doc
GitOrigin-RevId: 8db2036887fba88a69dd61b09761ca07422a15f4
2024-04-02 13:11:17 +00:00
Bart van Helvert
ee73aef512 [java] Only log when API file can't be found for non-highest language level
Makes it possible to add API files for language levels higher than the current HIGHEST like preview levels.

GitOrigin-RevId: 0b6b572609238d5015ca2361fb8ab59df35d088f
2024-04-02 13:11:12 +00:00
Bas Leijdekkers
ab2af3d314 [java] don't show implicit classes as "anonymous" in batch inspection results (IDEA-334425)
GitOrigin-RevId: 1c636b01743409c25ef084faca47f34b0127ff4d
2024-04-01 10:52:12 +00:00
Bart van Helvert
c5bc52d9fd [java] Don't do forbidden API check for highest language level
For the highest language level, no API should be forbidden. #IDEA-349722 Fixed

GitOrigin-RevId: 4819e096b798d4cc4b328cc85671a7180851b219
2024-03-28 15:54:54 +00:00
Alexey Kudravtsev
bd069c730f do not perform double conversion KtType<->JvmType, to avoid losing some type info in tricky cases (part of KTIJ-28926 K2: Create Function From Usage Fix)
GitOrigin-RevId: 1c86e6c4ef2c3ba3dbcff8caca906eac57d083aa
2024-03-28 14:43:53 +00:00
Tagir Valeev
6c6697d422 [java-inspections] CreateFieldFromParameterAction: ModCommand
Otherwise, it's hard to make it compatible with new-style unused inspection (IDEA-349083)
Also: remove empty line in constructor body automatically

GitOrigin-RevId: ab1cd08352d9f0168b86acc1d4b87cb89cfe7d69
2024-03-22 12:27:40 +00:00
Evgenii Zakharchenko
67fdd7d602 [ultimate] IDEA-348085 Spring bean autoinjection via completion: scroll jumps to the bottom
KTIJ-28883 Do not suggest a live template for Kotlin quick fix if there are no available variables

GitOrigin-RevId: 2cfc8120c17665774de31a3ee483aa0c0ec195ba
2024-03-21 14:17:29 +00:00
Alexey Kudravtsev
f294fccb79 K2: implement "create function from usage" for members (part of KTIJ-28926 K2: Create Function From Usage Fix)
- support "fir" version for dependency files in test data for AbstractQuickFixMultiFileTest
- support generation of @Nullable/@NotNull in java method signatures
- support nullability in generated java types (ExpectedTypeWithNullability)
- support implicit receivers in generation (see computeImplicitReceiverType)
- suggest creating new function in case of too many/too few arguments (K2CreateFromUsageQuickFixesRegistrar)

GitOrigin-RevId: d1adac9e7a4f5caeb2300e80c953e95a0c339dcf
2024-03-18 18:06:15 +00:00
Tagir Valeev
193b2cb477 [java-inspections] Experimental ModCommand-based DeletePrivateMethodFix for unused inspection
GitOrigin-RevId: efd9306505048695f1aa1de1851383e170b0c1ca
2024-03-12 16:55:18 +00:00
Evgenii Zakharchenko
c2db9ae649 [ultimate] IDEA-346716 Spring beans auto-injection via completion: scroll jumps to the top
GitOrigin-RevId: 84e1685d43d9c54e5d7452647a227e3532be47b6
2024-03-01 19:19:54 +00:00
Tagir Valeev
d89c17fc59 [kotlin-dfa] Move inspection.data.flow.warn.when.reading.a.value.guaranteed.to.be.constant to JavaAnalysisBundle
Preparatory step for KTIJ-28908 Convert "Constant conditions" inspection to K2

GitOrigin-RevId: 68798782d260f8245947423efd936ae82bde841c
2024-02-24 12:22:09 +00:00
Evgenii Zakharchenko
4deae98f45 [ultimate] IDEA-346716 Spring beans auto-injection via completion: scroll jumps to the top
KTIJ-28883 Do not suggest a live template for Kotlin quick fix if there are no available variables

GitOrigin-RevId: 65642a313c337517083830878b72a8b678230233
2024-02-22 22:38:26 +00:00
Aleksey Dobrynin
1b565a13b9 [java, quickfix] Refactor module access checking method and improve module naming. IJ-CR-125003
GitOrigin-RevId: 078deb60a0fbf497020fe73bd99e170171a30381
2024-02-16 11:31:20 +00:00
Tagir Valeev
64327f79d6 [java-inspections] IDEA-346242 Add 'minimal java version' clause automatically to inspection descriptions, based on the required feature(s)
GitOrigin-RevId: 50a25148d4d36c46e9552b3123d1ef966b40a2c2
2024-02-15 15:28:00 +00:00
Tagir Valeev
47a98d4500 [java] LanguageLevel#feature method; javadoc
GitOrigin-RevId: f3c57f7101b3ce7369c66b97411c897bdcd46d24
2024-02-15 13:23:21 +00:00
Tagir Valeev
2aa52eea2d [java] IDEA-345517 Feature-based support of unsupported preview language levels
GitOrigin-RevId: 3037d36588c239d6236ba64a7df2bf2a3b51cba4
2024-02-12 19:12:39 +00:00
Tagir Valeev
a7674dca70 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Create JavaLanguageFeature; move HighlightingFeature functionality there; move preview highlighting related utilities to new PreviewFeatureUtil class

GitOrigin-RevId: 116bcc9feb6fb40a0bd6a25ba10c2f35b41ffea6
2024-02-08 10:07:12 +00:00
Alexey Kudravtsev
8dc9393675 cleanup: get rid of mutable stuff (part of KTIJ-26893 K2: Create*FromUsageFix fix)
GitOrigin-RevId: 9504fa61ca4d88d2b01f837d0d00ca7d4768f93f
2024-02-06 22:38:17 +00:00
Alexey Kudravtsev
18b384f5d9 fix typos and incorrect links in javadoc
GitOrigin-RevId: 25daa667902e8ffac4612306b6c6e2019873ae2b
2024-02-06 22:38:12 +00:00
Dmitriy.Panov
103eee0118 Revert "fix typos and incorrect links in javadoc"
This reverts commit b0a6236002781f491a71059c7d96ee625717bfa0.

GitOrigin-RevId: 8d1bcb419b22ab480f7a5f3d10fef0edd1582dba
2024-02-05 23:42:36 +01:00
Dmitriy.Panov
0bace9e4a0 Revert "cleanup: get rid of mutable stuff (part of KTIJ-26893 K2: Create*FromUsageFix fix)"
This reverts commit c9d8c5845babc20e58a38f0dc2d83363ff7378d3.

GitOrigin-RevId: 1fd74bfc8c347e5ed633f662f2e19978d25c7d64
2024-02-05 23:42:35 +01:00
Alexey Kudravtsev
7a79a8bf2a cleanup: get rid of mutable stuff (part of KTIJ-26893 K2: Create*FromUsageFix fix)
GitOrigin-RevId: c9d8c5845babc20e58a38f0dc2d83363ff7378d3
2024-02-05 19:01:06 +00:00
Alexey Kudravtsev
c77511e324 fix typos and incorrect links in javadoc
GitOrigin-RevId: b0a6236002781f491a71059c7d96ee625717bfa0
2024-02-05 19:01:01 +00:00