Commit Graph

7254 Commits

Author SHA1 Message Date
Bas Leijdekkers
5d6f4a3258 Java: update "Mismatched query and update of 'StringBuilder'" inspection for String Templates (IDEA-336330)
GitOrigin-RevId: 5eb30ccc1e84effaf5eb7d3767f64017b3a338a4
2023-10-26 15:59:38 +00:00
Tagir Valeev
aa5bf3dc40 [java-inspections] Deprecate DelegatingFix; inline the last use
GitOrigin-RevId: 5bf504029be0cd4b714c088089307682490852c4
2023-10-26 10:47:38 +00:00
Tagir Valeev
d78da72a81 [spring] ImplicitSubclassInspection: call isAvailable() before getText() for nested actions
GitOrigin-RevId: 7db8a387e68e7a0006f48a61e925c63a1ad79cbb
2023-10-26 10:47:31 +00:00
Tagir Valeev
a63fb8d702 [java-inspections] Deduplicate ignore-if-annotated quick-fixes
AddToIgnoreIfAnnotatedByListQuickFix utility class is merged into SpecialAnnotationsUtilBase

GitOrigin-RevId: 545c536945fc64edc0976061f64d6d55349d74d2
2023-10-26 10:47:28 +00:00
Tagir Valeev
8876ffa871 [java-intentions] ReplaceAssignmentFromVoidWithStatementIntentionAction: ModCommand
GitOrigin-RevId: 3b6f52eeecdc50d39c5aecb9afa6db08d493c150
2023-10-26 10:47:18 +00:00
Tagir Valeev
114902f128 [java-intentions] ModifierFix: ModCommand
GitOrigin-RevId: dbc1dbc87573d6e54f650b501f074238a1150831
2023-10-26 10:47:14 +00:00
Tagir Valeev
b59721ab73 [java-inspections] CreateTypeParameterFromUsageFix: mod-command
Part of IDEA-322693 Migrate as much as possible Java intentions and quick-fixes to ModCommand API

GitOrigin-RevId: 898bf526ac0700c29641e09ffccd10bf2a7ab3f1
2023-10-24 17:00:37 +00:00
Tagir Valeev
f94d4a27d9 [java-inspections] AddExceptionToThrowsFix, AddRuntimeExceptionToThrowsAction: mod-command
Part of IDEA-322693 Migrate as much as possible Java intentions and quick-fixes to ModCommand API

GitOrigin-RevId: 4ae648a956c9a33b5649aa6ffff99a6fa9a18f71
2023-10-24 16:54:37 +00:00
Tagir Valeev
943bacb4c0 [java-inspections] AnnotateMethodFix: mod-command
Now, works for in-code annotations only (but may work in batch). Was used for MissingOverrideAnnotationInspection and NullableStuffInspectionBase. The later uses old code now, as external annotations could be desired there.

Part of IDEA-322693 Migrate as much as possible Java intentions and quick-fixes to ModCommand API

GitOrigin-RevId: f580467c5e64782a629bbe7a48b7f95686f6b83c
2023-10-24 16:54:33 +00:00
Alexandr Suhinin
19b2569764 [code vision] IDEA-328184: exclude html files from code vision search (avoid JS resolves in nested scripts)
GitOrigin-RevId: 6587a4b06022f4aebfd8c7dd7f345d7db20c7373
2023-10-23 08:37:23 +00:00
Piotr Tomiak
9a6abea858 WEB-63466 Html: update usages of HtmlHighlightingLexer; merge XHtmlLexer and XHtmlHighlightingLexer
GitOrigin-RevId: 8a8c371d074ad3c2138cec6e6cdf437f2c2ce26d
2023-10-21 15:39:48 +00:00
Piotr Tomiak
37732a794b WEB-63466 Simplify API of HtmlHighlightingLexer - remove style file param
GitOrigin-RevId: 7ce9512294c22d71b8be0af7c6cbf633b4f8c15a
2023-10-21 15:39:41 +00:00
Nikolay Chashnikov
9690329708 [java] mark for removal API which was deprecated in 2023.1 or earlier and has no external usages (IDEA-322162)
GitOrigin-RevId: 4083651196e728cad7d9c82e6f5cbf6b5ce82336
2023-10-20 22:20:55 +00:00
Tagir Valeev
679de5d46d [java-inspections] ConstantExpression inspection proof-reading
GitOrigin-RevId: 5e97937a479a98dd302757d3539703353dc253cc
2023-10-20 19:12:58 +00:00
Tagir Valeev
51854f80b3 "Method can be static" fix massive application
GitOrigin-RevId: ed296b85922a6814d5c6057b5cbc720f0c546e41
2023-10-20 19:12:56 +00:00
Alexey Kudravtsev
4d18b83ba9 psi: optimizations: avoid empty array allocation to reduce garbage
GitOrigin-RevId: 519fe8a3aad043b702e7b33719a4f4e9989aa0f5
2023-10-20 13:29:24 +00:00
Tagir Valeev
cfe932f905 [java-analysis] PurityAnalysis: react on cancel, just for the case
GitOrigin-RevId: 3ec46f987d148e5fea0e9a4e87dfbeb6fb78ac99
2023-10-16 20:19:33 +00:00
Tagir Valeev
12acf56932 [java-analysis] IDEA-335037 Bytecode inference: wrong equals() implementation for quantum effects
GitOrigin-RevId: 349111d8a084ac09e4486589c93d8f28ac6e6897
2023-10-16 20:19:30 +00:00
Roman Ivanov
426dfe92a6 do highlighting when the file name of the unnamed class is not a vaild identifier IDEA-333231
GitOrigin-RevId: 25df95741ad34a814e8e61bd0928a01b98589ce6
2023-10-12 17:37:47 +00:00
Mikhail Pyltsin
299b7e468b [java-highlighting] IDEA-334683 (EA-921945) anonymous classes and local classes must not inherit sealed classes
- fix for completion
- fix for error highlighting

GitOrigin-RevId: 337131aab1bc7473711ffc078175b5adba34f30d
2023-10-12 11:53:56 +00:00
Georgii Ustinov
cbdda56f99 IDEA-332957 GuavaInspection false positive review refactor
GitOrigin-RevId: 32b819439b341b8b3170ae304304c339cfc9e753
2023-10-12 08:57:53 +00:00
Tagir Valeev
06f2667cb0 [java-inspections] ExpressionUtils#getEffectiveQualifier: do not fail on unnamed classes
Fixes EA-916298 - IAE: LightClassReference.$$$reportNull$$$0

GitOrigin-RevId: 09b89897bf241d001bb14c70836964257c70a60d
2023-10-11 20:59:50 +00:00
Tagir Valeev
4edb11398e [java] JavaCodeStyleManagerImpl: cleanup
GitOrigin-RevId: 3c8b0d7b44d664ad6cae6899e200a6048d381fea
2023-10-11 20:59:37 +00:00
Yann Cébron
2b5ef8b70e [java] SuppressManagerImpl: split into Service and EP
GitOrigin-RevId: 0a85fbd2e3594f5f99114f512abcaae1cdc1bee6
2023-10-11 18:06:15 +00:00
Tagir Valeev
be47fc15f3 [java-dfa] EA-910575 - ISE: MethodCallInstruction.getMethodResultValue (Class.getName)
GitOrigin-RevId: 1ec3f7f8538ccb9b542f448a09568cc2cdff0a1f
2023-10-10 19:52:47 +00:00
Georgii Ustinov
7520f2516c Guava inspection predicate false positive #IDEA-332957 fixed
GitOrigin-RevId: aa2b1ab1baa9d97b42bb359eac5f30efd3f47ddb
2023-10-10 16:12:28 +00:00
Nikolay Chashnikov
d1182e7d0a [project model] API: deprecate ModuleExtension::dispose method
This is needed to eventually get rid necessity to implement Disposable in RootModelBridgeImpl (IDEA-334277).

GitOrigin-RevId: e61b3b63dad97fdabf7da7d0e8898df053476d42
2023-10-09 10:40:00 +00:00
Bas Leijdekkers
d9047d7a2b Java: remove conditional lexing (lex string templates in lower language levels)
GitOrigin-RevId: f10cdb96bbd89b6a70fb9dac6bc83ce7e29c1a83
2023-10-07 19:14:25 +00:00
Alexander Lobas
1035b29274 IDEA-287157 Editor and gutter balloons: update layout, insets, colors
GitOrigin-RevId: 7753503766bee41b540f9e6e3ed7e39d4caf46b5
2023-10-06 21:19:12 +00:00
Nikolay Chashnikov
97e876d874 cleanup: reorder import statements for workspace model classes (IDEA-320676)
Workspace model classes were moved to different packages, but the order of import statements wasn't changed, so we have many files with unsorted imports. They are often become sorted when other changes are made in these files, and such unrelated modifications complicate reviewing and may cause merge conflicts.

GitOrigin-RevId: 827744c328ddb2ac3d08ce0bcb8f8e1bb30ac4e9
2023-10-06 11:31:33 +00:00
Tagir Valeev
5350663c17 [java-analysis] HardCodedPurity: getClass() is pure, regardless of the qualifier class
In recent JDKs, it could be compiled with different qualifier

GitOrigin-RevId: 69dc411cfce6ad815aa1da823c149991e06057eb
2023-10-06 10:48:31 +00:00
Roman Ivanov
f7563d24a1 ensure that main method has proper signature IDEA-333318
GitOrigin-RevId: f324e646e922af24a2382073770ca195af52dc70
2023-10-04 22:33:30 +00:00
Roman Ivanov
7770d195fc check that main method has name "main"
GitOrigin-RevId: 3c49ec2ed2bbbc0cfce37cb3e399ab83cab93f7e
2023-10-04 22:33:29 +00:00
Roman Ivanov
eba6e0d551 [java, inspection] make global unused symbol inspection not report main methods for unnamed classes IDEA-333152
GitOrigin-RevId: 597ef591bebf0ee6968e08a05dd989aadc8bdd53
2023-10-04 22:33:23 +00:00
Tagir Valeev
f7ce6d8f5a [java-inspections] IDEA-333847 'Add constructor parameter' suggests to add one more initialisation event if it's already exists
GitOrigin-RevId: 70a6d88a89f9ead29a46f61dae3a2de6302fba17
2023-10-04 10:48:19 +00:00
Tagir Valeev
0d63633751 [java-inspections] CodeBlockSurrounder and StatementExtractor: support templates
GitOrigin-RevId: 3a998d7117ef6e94a7727a3f37d110905cc0c1bf
2023-09-29 17:40:46 +00:00
Bas Leijdekkers
e336feedca Java: PsiFragment now extends PsiJavaToken
GitOrigin-RevId: 68857d1d90efd7546413bb45d932e3a5c864b0fc
2023-09-28 13:52:53 +00:00
Tagir Valeev
d7160411f2 [java-dfa] IDEA-333294 Support Unit 5.8 assertInstanceOf in dataflow
GitOrigin-RevId: 5a772af8968128e8a95465d2ab5a42cb09006d3a
2023-09-28 10:30:00 +00:00
Mikhail Pyltsin
0f76470f19 [java-inspections] IDEA-333452 Duplicate branch on switch. Improve work with comments
- now it can be suppressed properly
- show info level if the branches have different comments

GitOrigin-RevId: 5f1c5c0a67165b949b894d2d81c53800ad3b4b22
2023-09-27 19:37:38 +00:00
Tagir Valeev
d79850455f [java-dfa] IDEA-332978 Nullability warning is not displayed in instanceof with pattern operand
GitOrigin-RevId: e0ea0bb2fae6eb9119310c8f7be56a05298733f8
2023-09-27 16:12:24 +00:00
Georgii Ustinov
751962686d [Java. Tests. JUnit] IDEA-318937 False positive 'Java | Test frameworks | Misordered 'assertEquals()' arguments'.
GitOrigin-RevId: e50be17593b3dffec389a314b3c9e4849ccedd6e
2023-09-27 15:45:55 +00:00
Mikhail Pyltsin
64f85584d7 [java-inspections] IDEA-333228 "Mismatched query and update of 'StringBuilder'" false positive for j21 repeat
- added support for `repeat`

GitOrigin-RevId: 8ef3d63147f13a5688f1ff15b725f4096f1f3c82
2023-09-27 14:14:25 +00:00
Tagir Valeev
eb85741b25 [java-inspections] CreateConstructorParameterFromFieldFix: rewrite to ModCommand, using trackDeclaration()
Also fixes IDEA-329769 'Add constructor parameter' hint and action discrepancy

GitOrigin-RevId: f897347600bfdfd2ebf7a4de0209e5887323f091
2023-09-27 11:27:13 +00:00
Aleksey Dobrynin
3fee19a680 [java, inspections, fix] IDEA-322244 IJ-CR-114846
- remove unnecessary "findClass"
- change JavaMethod to PsiMethod
- extract code about "usInstanceOf" exists into a separate method

GitOrigin-RevId: 47bd538a141bd715d32b3d534c5f7d761133db34
2023-09-27 10:09:59 +00:00
Bas Leijdekkers
080e330081 Java: don't report qualifiers that can't correctly be removed (IJ-CR-115426)
GitOrigin-RevId: 1808481bb3026980189dc467d24efe3a716e0177
2023-09-26 17:04:16 +00:00
Alexey Kudravtsev
5cff4c69cf make visitor thread-safe to fix occasional CME
GitOrigin-RevId: 907bbf8b211ac146527dc329c23816f9b8ae2828
2023-09-26 17:03:42 +00:00
Aleksey Dobrynin
bd9d8a17de [java, inspections, fix] IDEA-322244 IJ-CR-114846
fix searching scope of the JUnit library

GitOrigin-RevId: 2be822937602bc7d866dc0f733321dd3e5b371b6
2023-09-25 16:53:00 +00:00
SirYwell
53ec26e0de Java: fix considering all methods as public in interfaces (IDEA-332954)
for "'public' method with 'boolean' parameter" inspection
close #2574

GitOrigin-RevId: 9dcccb3279e924058a1d0cba5413b8dea31c3aad
2023-09-22 18:20:33 +00:00
Georgii Ustinov
883f800574 [Code Analysis. Inspection] IDEA-234302 System.getProperty(str) inspection implementation. Review Refactor
GitOrigin-RevId: e793b2306586a3ea6e12691b5d887fe1cf0b2913
2023-09-22 13:59:38 +00:00
Georgii Ustinov
0382910261 [Code Analysis. Inspection] IDEA-234302 System.getProperty(str) inspection implementation.
Call to System.getProperty(str) could be simplified for certain predefined constants. Implementation includes inspection and quickfix.

GitOrigin-RevId: 8b7edf6c4a6849062535ded1c49e733b8fed05a8
2023-09-21 19:51:28 +00:00