Commit Graph

462 Commits

Author SHA1 Message Date
Nikolay Chashnikov
5c6c62d06e [java] move "Redundant ScheduledForRemoval annotation" inspection from DevKit to Java plugin (IDEA-288544)
The inspection may be useful in not only plugin projects (IJ-CR-20718).

GitOrigin-RevId: ec44c7485b25bba14384fda8adf3ea3f0be6fbd9
2022-02-16 14:03:16 +00:00
Anna Kozlova
1ef2831f17 [deprecated] add option to ignore deprecated for removal inside project (IDEA-288824)
GitOrigin-RevId: 8153518d17436a6675bf154184debdf1f88ec542
2022-02-15 17:27:39 +00:00
Nikolay Chashnikov
abc373560d [API] replace ApiStatus.ScheduledForRemoval annotation by 'forRemoval' attribute (IDEA-288466)
Since we don't want to specify planned removal date anymore, there is no need to use a separate annotation.

GitOrigin-RevId: a047c55475e0f4752a2842577e094fb041c6c05b
2022-02-11 15:12:14 +00:00
Tagir Valeev
32442ebe48 [java-inspections] IDEA-288528 Add a quick-fix to correct typeuse nullability annotation
GitOrigin-RevId: ac4d271bc6e43306532d201e74fcf6e9f7b2e6ae
2022-02-11 08:30:20 +00:00
Anna Kozlova
c2899bebcb [java] enumerate implicitly final vars covered by 'local can be final' option (IDEA-288152)
GitOrigin-RevId: 2698ad787f7bdedb80f6fcdbb7498218f4a27430
2022-02-09 14:02:18 +00:00
Andrey.Cherkasov
b49876697c [java-highlighting] QuickFixFactory#createReceiverParameterTypeFix: rename parameters and add Javadoc
GitOrigin-RevId: ac094acae400806999cbe6b434d8abe6d2a3e388
2022-02-08 04:33:50 +00:00
Andrey.Cherkasov
7ce1003bd9 [java-highlighting] Provide fix for "The receiver name does not match the enclosing class type"
IDEA-273225

GitOrigin-RevId: aac09cbfcb60a1757c7b142ac888979148d4e7cc
2022-02-08 04:33:49 +00:00
Nikita Eshkeev
401963fa86 [java][api usage] IDEA-286618 Update API list for java 18
Add api18.txt that contains all the new API that was introduced for Java 18

GitOrigin-RevId: 836880a9442056cab76208c9afe60e3f1331ab4a
2022-02-02 22:58:59 +00:00
Tagir Valeev
453a00c310 [java-inspections] IDEA-287483 Suggest explicit type for uninitialized 'var', based on the first assignment
GitOrigin-RevId: 80fa9ecf09130d04c41d27ad40897ef24183e4e1
2022-01-28 10:05:00 +00:00
Bart van Helvert
b5858b2899 [java] Fix error message when resource can't be found when loading forbidden language API
GitOrigin-RevId: 4d54927d414f148982aef116983124b77c811414
2022-01-14 11:14:20 +00:00
Yuriy Artamonov
1fac219246 [uast] UastModificationTracker is no longer experimental
GitOrigin-RevId: 620a76d69af0b8bf205577a9eb04d04c38ab3dd0
2022-01-13 12:32:05 +00:00
Tagir Valeev
2d08b71a4e [java-inspections] IDEA-285964 Replacement for 'Expression can be replaced with Double.compare()' sometimes breaks the code
Option is added to disable the inspection when semantics change is possible

GitOrigin-RevId: 97e5576582b65c3ba0cb3122d6274a37e271386d
2022-01-10 08:52:07 +00:00
Tagir Valeev
34192fbc95 [java-dfa] IDEA-285470 DFA: The reason of an Integer variable being always non-null after a ternary operator isn't very clear
GitOrigin-RevId: 476eb0cd257bd8bc77cf728bb65a559fdae229e4
2021-12-23 05:38:28 +00:00
Bas Leijdekkers
ed2c73e98c more consistent Java inspection names
GitOrigin-RevId: 5c958dfd8b5f55e9e5bede82be5015c3299dd16e
2021-12-20 10:55:14 +00:00
Tagir Valeev
7367405b46 [java-highlighting] IDEA-284864 Improve reporting of always false while/for loops
GitOrigin-RevId: 9e7403383296cfa3c9478d8e635e592d31ba0518
2021-12-14 13:26:42 +00:00
Bart van Helvert
e48a6f2573 [java] Move 'forbiddenApi' API to LanguageLevelUtil
Decouples Java15APIUsageInspection from other inspections and completion

GitOrigin-RevId: ae37f8f01514e2e557acac9757b11cba11bcdbb5
2021-11-25 09:26:02 +00:00
Tagir Valeev
ed69cc6401 [java-inspections] IDEA-282262 Add 'Find the cause' action to 'Redundant operation on empty container' inspection
GitOrigin-RevId: 79f33120532750b5e93ffa3d7ce40c2345d17e39
2021-11-10 14:26:03 +00:00
Bas Leijdekkers
c057a9a100 minor javadoc
GitOrigin-RevId: 017bb1f23a9e9d7a1116deee9a4778529205f488
2021-11-03 17:23:05 +00:00
Bas Leijdekkers
9c6a876508 fix inspection name (IDEA-176097)
GitOrigin-RevId: ab670a3feb3a9a114f26ee90210dffb0801c73cb
2021-11-02 00:24:46 +00:00
Roman Ivanov
5589c90455 [java] better wording and update copyright in JavaModuleSystem
GitOrigin-RevId: e93cb0fa11971b8ffe6b3b26a22fa2a779cbf6b0
2021-10-28 10:29:40 +00:00
Roman Ivanov
5351966a00 [java] docs for JavaModuleSystem
GitOrigin-RevId: 7f27c09bf51273d2b9e2e48b7d49b4a286378101
2021-10-26 16:55:48 +00:00
Artemiy Sartakov
b107d4cb10 JvmElementActionsFactory: support type annotations
GitOrigin-RevId: b8baeedd0cf34006cc840526936898ddf1bed8cf
2021-10-19 16:24:59 +00:00
Andrey.Cherkasov
1149cfe7e4 QuickFixFactory: remove unused method
GitOrigin-RevId: 7b41db5c13a0b401e5d3df1b40673c2b509e5525
2021-10-19 08:43:27 +00:00
Bas Leijdekkers
37e358746c [global inspections] add more initialization checks
GitOrigin-RevId: 4979a1854485bae2b619cf14d2be292ca704ff69
2021-10-18 23:34:36 +00:00
Andrey.Cherkasov
23fbe72cac [java-highlighting] Provide fixes for unexpected primitive type pattern: fixes after review (IJ-CR-15006)
GitOrigin-RevId: 7d13a79dbf52273c15f6d24b4957a68d8e1e9715
2021-10-18 20:45:04 +00:00
Ilyas Selimov
6b74c12eab [java] - unused declaration rework for functional expressions
GitOrigin-RevId: e2f2188edf79fddd902c038bdfdea072eed01bfe
2021-10-11 05:51:42 +00:00
Andrey.Cherkasov
cc9c5fe107 [java-highlighting] Provide fixes for unexpected primitive type pattern
IDEA-279711

GitOrigin-RevId: 58d634c764bf9ab92d0821d3e456ab4e267b2eb9
2021-10-06 20:58:25 +00:00
Andrey.Cherkasov
c38121fc35 [java-highlighting] Provide fix "Move switch branch '...' before '...'" for "Label is dominated by a preceding case label" error
IDEA-272296

GitOrigin-RevId: 70c062f7d125c9b6116bd7e141da920f667f7c54
2021-10-05 22:24:08 +00:00
Nikita Eshkeev
357a0a4493 [java-analysis-api] Check for PCE before running visitor
The `PsiElementVisitor#visitElement` checks if the progress is cancelled, and all methods of the class are delegating its calls to it by default. The `AbstractBaseJavaLocalInspectionTool.buildVisitor` method defines a visitor that doesn't check if the progress is canceled which can cause freezes.

This patch adds calls to super methods of the visitor to implicitly check for PCE.

GitOrigin-RevId: ca718c4660f8f80adc5f9775dc6e1930a98b283f
2021-10-01 00:09:31 +00:00
Anna Kozlova
9d66a4baed [java] unused parameter: prioritize safe delete, cleanup
no need to suppress as unused parameter as unused parameter and unused declaration inspections were merged

GitOrigin-RevId: d536353aebcaf024ebbb6f4ca65c5df5d2a6569e
2021-09-30 20:00:20 +00:00
Aleksey Pivovarov
aa0a99d1e0 ui: fix incorrect encoding in bundled strings
GitOrigin-RevId: b945291d452eb90037a5b6721eefc96a7bfc7481
2021-09-30 17:12:53 +00:00
Andrey.Cherkasov
7815b148f2 [java-highlighting] Provide fixes for the "Duplicate attribute" error (IDEA-216119)
GitOrigin-RevId: ae3db3461abcfa2578b50657ec99dc51b0bbd699
2021-09-28 08:12:25 +00:00
Andrey.Cherkasov
8bb8d7ca5d [java-highlighting] Provide the fix for the "*annotation* not applicable to *target*" error (IDEA-216251)
GitOrigin-RevId: ed6eb867457c4b3413156366be89a076c639ccf3
2021-09-24 22:05:56 +00:00
Tagir Valeev
528416102b [java-dfa] Support explanation for constructor contracts; ArrayBlockingQueueContract constructor contracts
GitOrigin-RevId: 641b8569630c8f22d0bfa806f3cd5a54c3290ba4
2021-09-14 15:25:04 +00:00
Andrey.Cherkasov
44fdc4df4b [java-highlighting] Provide the quick-fix which adds missing branches if the type of the selector expression is a sealed class
(IDEA-272573)

GitOrigin-RevId: 1dd3ea56db19a1a6073066b984040903f51e83df
2021-09-14 05:12:24 +00:00
Nikolay Chashnikov
a90508fbca [java] API cleanup: remove deprecated API (IDEA-271555)
GitOrigin-RevId: 78ca994b689a03aba22eee5e05385bc726e03e85
2021-09-10 18:08:28 +00:00
Bas Leijdekkers
47abe1caec IG: use api to retrieve RefPackage
GitOrigin-RevId: bbaf550311442a4f43eb77f0e3b0aae73f6959a3
2021-09-09 23:03:05 +00:00
Roman Ivanov
77bc216dbd [java] a bit better docs for ChangeVariableTypeQuickFixProvider
GitOrigin-RevId: 9cada214edb45d776b9096da10147426fbc4c45f
2021-09-09 08:39:24 +00:00
Roman Ivanov
9136e4d24a [java] docs for ChangeVariableTypeQuickFixProvider
GitOrigin-RevId: 9fc3e93c1b159c2b4bf6eb3a10afd56ca607e5e8
2021-09-09 07:29:54 +00:00
Anna Kozlova
c90e44b570 [java] remove html from properties
GitOrigin-RevId: 4af618f65397de31d2cb8f72c6ff10f2d82d4e1c
2021-09-08 16:42:15 +00:00
Tagir Valeev
5bdf9bb98a [java-dfa] IDEA-277611 Enhance enum support in Java DFA (ordinal support)
GitOrigin-RevId: 0e294d5b9e886ae786d80070bd5c30f6da085680
2021-09-08 14:55:03 +00:00
Ilyas Selimov
6e19d89001 IDEA-277338 - fixed the description for malformed ref expressions which can be replaced with type pattern in switch, added the quick-fix
GitOrigin-RevId: c34d26c8dd7f3dfb079adeb49811d64e1bd093fa
2021-09-08 13:10:24 +00:00
Anna Kozlova
1f0f1acfbc [java] warn on non-instantiatable intersection types (IDEA-277529)
extend for any context

GitOrigin-RevId: d6f499348c8278bcb58951900ebf116440719082
2021-09-07 07:14:24 +00:00
Ilyas Selimov
4590cb7fea IDEA-169223 - added an option to be able to highlight unused parameters apart from hierarchy and quick fix to replace parameter name to "ignored"
GitOrigin-RevId: 4ffc252043c5c1532ec123c146e199e5ce950328
2021-09-03 14:57:20 +00:00
Bart van Helvert
d8e10a2d8d [jvm] IJ-CR-13060 Field request improvements
GitOrigin-RevId: e8320346568e01f48adab6237be2d166a2168036
2021-09-03 12:51:23 +00:00
Bart van Helvert
1c768b5e57 [jvm] Support annotations in field requests
GitOrigin-RevId: f15b1ff94a3b283a58db59ccccd3f1f781680f64
2021-08-31 15:59:28 +00:00
Bart van Helvert
ab4c7671ed [jvm] IJ-13060 JvmValue API improvements
GitOrigin-RevId: 1337891adc9d8476e84b59e689a86956d811c144
2021-08-31 15:59:26 +00:00
Bart van Helvert
194bc227e3 [jvm] Replace field Psi initializer by JvmValue
GitOrigin-RevId: ee9671fb3d5e377aab1a2da717f05127ab62ea18
2021-08-27 08:51:17 +00:00
Bart van Helvert
ecf1637c92 [jvm] Introduce JvmValue
GitOrigin-RevId: 2698b4916c21fbd083ceff4232963a6b29ad28ec
2021-08-27 08:51:14 +00:00
Bart van Helvert
19f5679512 [jvm] Reintroduce CreateFieldRequest#isConstant doc
GitOrigin-RevId: 508cefbf52ed63a71a7caa5d06edd1d954b7bd18
2021-08-27 08:51:11 +00:00