Nikolay Chashnikov
70676eed64
[java] API cleanup: remove unused deprecated API (IJPL-503)
...
GitOrigin-RevId: 36db2165d4a4bb133b7d63db944f6c8fe3490fa8
2024-05-16 18:00:17 +00:00
Tagir Valeev
8b83a30705
[java-inspections] RedundantThrowsDeclaration: do not report when method contains unresolved calls
...
Helps IDEA-353117 Error highlighting in incomplete project model
GitOrigin-RevId: ac7e3931d54ed2ac24c34adf074b8dd09dd7cda9
2024-05-16 17:49:36 +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
Bas Leijdekkers
106130b6f8
[java] better quick fix text (IDEA-353386)
...
GitOrigin-RevId: ebc64c441f2140181ad4e996005a45b19936b7d3
2024-05-14 10:29:57 +00:00
Bas Leijdekkers
0a8f0ae1c8
[java] better error message for type parameter outside bounds when the type parameter is not a concrete class (IDEA-353386)
...
GitOrigin-RevId: 6fcb1f8c2180ed319cdf7030de9c38b302e8e2d4
2024-05-14 10:29:53 +00:00
Mikhail Pyltsin
de02a19083
[java-highlighting] IDEA-352727 Incomplete model with lombok
...
GitOrigin-RevId: ea0f6f9cf44d704d4ae7e45fa3ba262c1496ffa4
2024-05-13 16:29:12 +00:00
Tagir Valeev
f6abeeb22f
[java-inspections] Rename 'if' statement with identical branches inspection to avoid confusion
...
GitOrigin-RevId: 9bb40bf9b593744130c17c5b0cc14d7c67740729
2024-05-13 13:49:05 +00:00
Alexandr Suhinin
360db06c21
[extract method] fix the flaky parameter name suggestion
...
GitOrigin-RevId: 1f278179d51e1dac3cb2992a3ec85c98ac208b31
2024-05-10 11:27:40 +00:00
Bas Leijdekkers
153827d95f
Java: handle @Repeatable annotations better in “Unused declaration” inspection
...
GitOrigin-RevId: 677f2c52ac069497147398dce1b42709e78ff445
2024-05-09 12:47:21 +00:00
Bas Leijdekkers
33881c73d1
java: remove accidental debug statements
...
GitOrigin-RevId: 62561e5ed313f76b35f235c328e6d0014df9b03d
2024-05-09 12:47:21 +00:00
Tagir Valeev
0e644d03a3
[java-highlighting] Incomplete model (IDEA-353117) improvements
...
Annotations; casts; modules; fix accidental negation
GitOrigin-RevId: 5fee6394cd39b066c1c05b1af93f4fdc9d554b82
2024-05-08 19:27:19 +00:00
Tagir Valeev
deb33bbc1d
[java-highlighting] IDEA-353117 Error highlighting in the incomplete project model
...
First draft
GitOrigin-RevId: e9dbfd1d6c42fe92f43686e465c11201b07cf3d4
2024-05-07 18:33:41 +00:00
Tagir Valeev
0b56515ada
[java-highlighting] Provide "Delete annotation" fix on incorrect Override annotation
...
GitOrigin-RevId: 1127734bee15be0478b4b96bc19fa7cdb6ea7131
2024-05-07 18:33:41 +00:00
Mikhail Pyltsin
c50d80250d
[java-highlighting] IJ-CR-132828 IDEA-352588 Support JEP 455: highlighting for switch with primitives
...
- chars print as themselves without a conversion
GitOrigin-RevId: beee890cd3fca0d4ae907645f76e9f28f173ad09
2024-05-04 17:18:12 +00:00
Bas Leijdekkers
980dd5790c
java: allow using the "Unused declaration" editor inspection in batch mode (IDEA-248182)
...
hidden behind registry key: batch.inspections.use.local.unused.declaration.as.global
GitOrigin-RevId: 535a45e8e6fa9e9901b981d9ac2234dee3b26695
2024-05-03 16:06:52 +00:00
Bas Leijdekkers
734fd63f37
Java: don't consider constructors used when the class is used externally (IDEA-206602)
...
for global "Unused declaration" inspection
GitOrigin-RevId: e671cef5b81a2e148ec747e91e876959c0481d8d
2024-05-03 16:06:52 +00:00
Bas Leijdekkers
02f130cf0e
java: RefClass optimization
...
GitOrigin-RevId: 24d7d819d06f154547f6a406d0fc84abdf4e4377
2024-05-03 16:06:52 +00:00
Mikhail Pyltsin
386ddcd575
[java-dfa] IJ-CR-132826 Support JEP 455: IDEA-352186 dfa for primitives in patterns
...
- refactoring
GitOrigin-RevId: 64bd95f5bb49fec96ed807bad2d892f5cf89b83a
2024-05-01 21:37:21 +00:00
Mikhail Pyltsin
f27595c831
[java-highlighting] IJ-CR-132825 IDEA-352187 Support JEP 455: highlighting for instanceof with primitives
...
- use `HighlightUtil.checkFeature` for PRIMITIVE_TYPES_IN_PATTERNS
- simplify tests
- add javadocs a bit
GitOrigin-RevId: 61019896534a11e1c7e2f281054d49a32a8ab8e6
2024-05-01 21:37:16 +00:00
Alexey Kudravtsev
3102effabf
make highlight visitors run concurrently; fix tests, get rid of HighlightInfoProcessors to fix IJPL-149030 HighlightVisitors should run in parallel
...
GitOrigin-RevId: 8a77dd409a575d3eaf28d6935ffeb87fce35dbd4
2024-05-01 11:53:23 +00:00
Tagir Valeev
860bc0e5e7
[java-intentions] DefineParamsDefaultValueAction: add cast by default when ambiguous overloads are present
...
GitOrigin-RevId: 10d5c9f66fa5bef5ab5e5be71987d14757fd07e2
2024-04-30 16:09:51 +00:00
Tagir Valeev
ec42e3be57
[java-inspections] Do not report redundant cast if any of labels is incompatible with the selector expression
...
Fixes IDEA-352510 False positive 'redundant cast' warning in switch
GitOrigin-RevId: b31e6f906bebb9de15c82439006502cc8e01f76f
2024-04-30 15:38:08 +00:00
Mikhail Pyltsin
45160db0df
[java-highlighting] IDEA-352588 Support JEP 455: highlighting for switch with primitives
...
GitOrigin-RevId: 06636352b202037ec3400b2f9763e101d8ed6042
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
8416740b8c
[java-dfa] Support JEP 455: IDEA-352186 dfa for primitives in patterns
...
GitOrigin-RevId: 2033b095f35f02222aa40f43d37e07b0019c4324
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
0f5c405185
[java-highlighting] IDEA-352188 Support JEP 455: change error messages for records
...
GitOrigin-RevId: a6e9fe75500155ca9e77514eca8d00f5e4e94e51
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
c8995f3cc8
[java-highlighting] IDEA-352187 Support JEP 455: highlighting for instanceof with primitives
...
GitOrigin-RevId: cbd688d0945b03bffb05af85825c610889383fc4
2024-04-29 21:17:42 +00:00
Tagir Valeev
8ee089b9b2
[java-highlighting] Do not show error on override if there's an unresolved superclass
...
GitOrigin-RevId: 03bd2f1e2a303f8a36ac33c81ad9ccd64c3b5084
2024-04-26 14:23:18 +00:00
Bas Leijdekkers
732fea2829
java: minor cleanup
...
GitOrigin-RevId: a05f9dd3a29db329db26eb402c08e3182819fe92
2024-04-25 13:50:00 +00:00
Bas Leijdekkers
cfbb00fa01
java: improve some inspection texts
...
GitOrigin-RevId: 5a0670e84850599d8107f206b76eee1f8f84de17
2024-04-25 13:49:54 +00:00
Bas Leijdekkers
57b1788fa5
java: track java usages of annotation methods in Unused Declaration inspection (IDEA-256632)
...
psi hack because UAST lacks annotation property references
GitOrigin-RevId: 9d5f2fd8e9d55584be60ca529512dd0714fb551d
2024-04-25 13:49:49 +00:00
Bas Leijdekkers
45cb0ab7d0
java: small cleanup
...
GitOrigin-RevId: 91d9a5fff0f0b9def8d204b4bbce9ff740115db4
2024-04-25 13:49:43 +00:00
Bas Leijdekkers
5a7449d17c
java: fix global unused declaration inspection suppression (IDEA-256471)
...
GitOrigin-RevId: 5764b1db0c2d1acd5fb4574af04a3510ccb26448
2024-04-25 13:49:38 +00:00
Bas Leijdekkers
a5ab84ef3d
java: cleanup read actions in global references
...
GitOrigin-RevId: 6774854349186713bb18da82938bd2439d862afb
2024-04-25 13:49:32 +00:00
Tagir Valeev
55390abe52
[java-intentions] Do not start action from the java file
...
It could be a class file without sources. In this case, non-physical copy is impossible. Anyway we are not going to change it, so it's a waste of resources to copy it.
GitOrigin-RevId: 2ac06bf10d0b3c2fff9acd213bc16c611563f8a8
2024-04-25 09:18:50 +00:00
Tagir Valeev
896ebf2dfe
[java-intentions] SuppressAllForClassFix: preserve comments
...
GitOrigin-RevId: 42da370c5b7fef5f2471df4b7d6868bbd9af3631
2024-04-23 15:04:42 +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
Bas Leijdekkers
3b492a9147
java: don't report class as used when "non-java usages" disabled and usage is external from e.g. xml (IDEA-294996)
...
GitOrigin-RevId: 8d18431026be14fec7af4072b2395c90a0de5669
2024-04-22 23:27:54 +00:00
Bas Leijdekkers
c95f7d842f
java: seal hierarchy
...
GitOrigin-RevId: 252e4b6e0ffbf6f31599d832580ad70f473deef1
2024-04-22 23:27:25 +00:00
Bas Leijdekkers
eef685aeb4
java: cleanup
...
GitOrigin-RevId: d71f79074c641e4a05e32c1f5b38f77776beb6f2
2024-04-22 23:27:21 +00:00
Bas Leijdekkers
34d1d3a30f
java: report unused utility classes with unused methods as unused (IDEA-217378)
...
for "Unused declaration" inspection in batch mode
GitOrigin-RevId: f19b13dd262f0059adc4c08237e620ec8256e013
2024-04-22 23:27:18 +00:00
Tagir Valeev
0387148c7d
[java-intentions] MoveMembersIntoClassFix: simplify using PsiBasedModCommandAction
...
GitOrigin-RevId: 5b26de32a62f8a03e877a04b602283f69b4ab6dd
2024-04-22 19:34:13 +00:00
Mikhail Pyltsin
c68043df18
[java-inspection] S IDEA-350713 consider reference in guards as effectively final for UnnecessaryLocalVariableInspection
...
- improvements for lambda
GitOrigin-RevId: 1b1520ffa259e314df0e718cf92f5457d7e23744
2024-04-22 16:21:35 +00:00
Tagir Valeev
2ab30a5915
[java-dfa] Handle exceptions from implicit toString in string concatenation
...
Fixes IDEA-352207 Incorrect unreachable code warning due to exception handling from implicit toString
GitOrigin-RevId: a79c89eaa5ec6a06fea72985c21244980d0fbcbb
2024-04-22 11:00:51 +00:00
Yuriy Artamonov
ed4b509b66
[java] IDEA-341622 Better cache NullableNotNullManager#findEffectiveNullabilityInfo for library methods
...
GitOrigin-RevId: ecc23faa48a12ae14ad91be62d0a2216eca74e7a
2024-04-21 17:28:15 +00:00
Tagir Valeev
854a0fdff9
[java-analysis] ArgumentFixerActionFactory: avoid copyTopLevelCall when possible
...
GitOrigin-RevId: d7422215b715ce26ada14b5486ed5243afb63473
2024-04-19 17:42:22 +00:00
Tagir Valeev
053d59f113
[java-psi] Move JavaLexer utility methods to PsiUtil to make them accessible from java-psi-api
...
GitOrigin-RevId: 88a728c1d021f703dc9f882e1f9213cd8477ed7a
2024-04-19 17:41:51 +00:00
Tagir Valeev
2f7b700aff
[java-intention] AddTypeCastFix.createCastExpression: remove reformat+shortening
...
Done anyway in the quickfix. Unnecessary and time-consuming during quickfix creation
GitOrigin-RevId: 2c279bbcef53838eef71a493d2a62b84af1ad978
2024-04-19 09:51:56 +00:00
Tagir Valeev
ceb6e8e97f
[java-dfa] TypeConstraints.normalizeClassType: avoid unnecessary raw type creation
...
GitOrigin-RevId: 4ca61a4bb38cd2f109003c230ec60304c641b0dd
2024-04-19 09:51:53 +00:00
Mikhail Pyltsin
977556d83a
[java-inspection] IDEA-350713 consider reference in guards as effectively final for UnnecessaryLocalVariableInspection
...
GitOrigin-RevId: b86300af52688491abe9a8c537092082ea44a7cb
2024-04-18 14:52:48 +00:00
Mikhail Pyltsin
74e210570e
[java] Pattern variable can be used mass cleanup
...
GitOrigin-RevId: 46452d7711435b63fca78af3a6f634bcec862139
2024-04-18 14:03:54 +00:00