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
33ca32a1bc
[java-intentions] ReplaceImplementsWithStaticImportAction: ModCommand
...
GitOrigin-RevId: 53f1e33ee88b8336a3cd20d55bd640cfbc88c580
2023-10-26 10:47:21 +00:00
Eugene Zhuravlev
8fcc1c08cc
correctly search for overridden/overriding package-local members
...
GitOrigin-RevId: e6aabe4198d345ccce6bc9f64d28a95ca2755ef8
2023-10-25 17:15:19 +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
Tagir Valeev
093ca478fd
[java-completion] Deduplicate chained items with different class qualifier
...
They are basically the same
Improvement for IDEA-334398
GitOrigin-RevId: 1d29fed1c229ed3d41c89902dfe578ab1610f989
2023-10-20 19:12:59 +00:00
Mikhail Pyltsin
852b99222d
[java-inspections] IDEA-335728 Duplicate branches can't be merge in switch
...
- added condition for available feature
GitOrigin-RevId: a8ae325cdd2843a932bf03fc535505a41865a9fb
2023-10-20 14:12:37 +00:00
Eugene Zhuravlev
2c149d06ef
JPS mappings for incremental compilation refactoring: for overridden method analysis, search for non-abstract methods using exact match (with return type), like it is in bytecode
...
GitOrigin-RevId: f77752af33fab766b2863c408ea0cfdea96a21b5
2023-10-20 08:51:17 +00:00
Tagir Valeev
db535a5a08
[java-completion] JavaNoVariantsDelegator: avoid redundant chains of nested classes
...
Fixes IDEA-334398 Code completion of nested types suggests confusing levels of nesting
GitOrigin-RevId: 206fc2b9f4a6501720b7bc95e79d981b20450823
2023-10-18 14:10:34 +00:00
Tagir Valeev
e4d46e812c
[java-analysis] Support container annotations on JPMS module
...
Fixes IDEA-323691 JSpecify's NullMarked not considered when Java module is annotated
GitOrigin-RevId: d84fe78d9e2f0c4a2bbe7471855310762e833ba4
2023-10-17 17:54:20 +00:00
Tagir Valeev
116aeed551
[xml] HtmlUtil#getStartTag: support tags with digits, like <h2>
...
GitOrigin-RevId: c3997423c38ade8a759aa086bc7d788c18e834b8
2023-10-16 20:19:26 +00:00
Mikhail Pyltsin
4f73147727
[java-inspections] IDEA-335008 Fix case when case has null and default
...
- fix cases with additional default
GitOrigin-RevId: f0770e912fc36f988d2814dcdbf1721a9ba626c2
2023-10-16 16:57:45 +00:00
Tagir Valeev
ea2e768ce2
[java-inspections] RawUseOfParameterizedTypeInspection: handle null expected type
...
Fixes EA-923716 - AE: BasicJavaParserUtil.parseFragment
GitOrigin-RevId: 37fd5e8d2e6504ca924ac09f6316548530a4952c
2023-10-16 10:08:10 +00:00
Tagir Valeev
ce933b41d7
[java-intentions] ReplaceOctalEscapeWithUnicodeEscapeIntention: process incomplete selection
...
GitOrigin-RevId: 6c63a90d74389f01d82e78308e6e9926c38f16a7
2023-10-16 10:08:08 +00:00
Tagir Valeev
3fb3c93d3d
[java-refactoring] Test for EA-882906 fix
...
GitOrigin-RevId: 085064379eed4ac2c1c0022724ac1fb4f71b5d15
2023-10-12 18:24:24 +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
Tagir Valeev
1dc70e5402
[java-tests] Delete JAVA_10 project descriptor
...
GitOrigin-RevId: 25d94de269120449ac282a15dc6bdcd379dcb7b7
2023-10-12 16:48:27 +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
Tagir Valeev
a627dcfb93
[java-intentions] ReplaceOctalEscapeWithUnicodeEscapeIntention: fix when selection ends with a slash
...
GitOrigin-RevId: ddf7e5f5c0ac0802ec4134c5941629b47a8497de
2023-10-11 21:29:52 +00:00
Tagir Valeev
98247b9ca9
[java-intentions] ReplaceOctalEscapeWithUnicodeEscapeIntention: fix when octal escape goes to the end of selection
...
GitOrigin-RevId: 23a3603f361585e8b2b30ed65f18b03833d68453
2023-10-11 21:29:49 +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
3364cdab8b
[java-inspections] Avoid incorrect PSI when string.substring().equals(primitive) is used
...
Fixes EA-914287 - IOE: JavaParserUtil.parseFragment
GitOrigin-RevId: 2f368fa188e7f478f2306008f722c2e7284a748d
2023-10-11 20:59:44 +00:00
Roman Ivanov
e9e104a719
fix test data
...
GitOrigin-RevId: 70b0fb0e1bdda156bdd5b7be86a46c8b66f0981d
2023-10-11 17:20:43 +00:00
Roman Ivanov
3560808910
[java, parser] do not ignore first declaration, which is not modifier list
...
GitOrigin-RevId: 1f7adc2298a24ade602d0d161d761a51bbed7ad4
2023-10-11 17:20:38 +00:00
Alexey Kudravtsev
e1e3a31e1b
cleanup: move "accessibility can be weaken"/"class in the wrong package" inspections out of the way of testing suppression
...
GitOrigin-RevId: b9a76fc3cc4cad29a3babcb35fac27477fd68116
2023-10-11 11:13:02 +00:00
Bas Leijdekkers
904e0aad5a
Java: fix Optimize Import inserting import for class which does not need importing (IDEA-308609)
...
GitOrigin-RevId: 3a7a4e0ac2d057faf1e534b7e424c958625aa285
2023-10-07 19:14:22 +00:00
Bas Leijdekkers
f22bfa9e00
Java: fix Optimize Imports adding imports for java.lang classes unnecessarily (IDEA-176089)
...
GitOrigin-RevId: 8afc6f24ce66b01eb4825b704d03adcc7c164476
2023-10-07 19:14:12 +00:00
Tagir Valeev
77d1d0ab2e
[java-tests] Mock JDK 21 (downloaded from the repository); remove in-place mocks where possible
...
Part of IDEA-334171 Store MockJDK in artifact repository, rather than in Git
GitOrigin-RevId: 9c6214e3ead47cc164d20813f5a2b37136607213
2023-10-06 10:48:24 +00:00
Tagir Valeev
aa6829d7c1
[java-tests] IDEA-333831 Separate mock JDK and JetBrains annotations for testing
...
Also: avoid manual mocking of Java 10 classes in StreamCollector10Inlining test, use mockJDK11 instead
Also: rewrite SliceTestCase and its inheritors to LightJavaCodeInsightFixtureTestCase, as annotations.jar is not included into project created by DaemonAnalyzerTestCase
Also: 'mutates' attribute of @Contract annotation is resolvable now, as we can use newer jetbrains-annotations library.
Also: documentation tests now don't generate links to JetBrains annotations, which corresponds to the actual behavior in production
GitOrigin-RevId: e460826893c1277cb2b78b18aae9d5aca97d8333
2023-10-05 11:24:29 +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
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
Roman Ivanov
b56e8cf4d9
[java, inspection] make unused symbol inspection not report main methods for unnamed classes IDEA-333152
...
GitOrigin-RevId: 1a1b41037a7bc28fc9a20620a182ca49ef789951
2023-10-04 22:33:22 +00:00
Eugene Zhuravlev
647b9dde1c
JPS mappings for incremental compilation refactoring: basic class parsing test and NPE fixes
...
GitOrigin-RevId: f88636ec9fb9b151dc716882b7eeba297dac41cb
2023-10-04 12:30:37 +00:00
Mikhail Pyltsin
e698c46083
[java-completion] IDEA-333184 IJ-CR-115840 completion for patterns in switch
...
- added new tests
- filter cases after caret
- reuse constant
GitOrigin-RevId: 35065e3cdd795891bd20d9e7d5387de09cc48083
2023-10-02 17:32:27 +00:00
Tagir Valeev
5a61cfcc6e
[java-typing] String template typing improvements: avoid } duplication; fix at input at EOF
...
GitOrigin-RevId: 5e2a3509a9300d53c2101d22bf4420fd5e520949
2023-09-29 17:40:48 +00:00
Tagir Valeev
0d63633751
[java-inspections] CodeBlockSurrounder and StatementExtractor: support templates
...
GitOrigin-RevId: 3a998d7117ef6e94a7727a3f37d110905cc0c1bf
2023-09-29 17:40:46 +00:00
Mikhail Pyltsin
435980a002
[java-highlighting] IDEA-333141 incorrect highlighting for default and static method in interfaces
...
- case `static` method from class and `default` method from interface must be highlighted
- case `abstract` method from class and `static` method from interface must be highlighted
GitOrigin-RevId: 49609ad0c75b132766b85b8b232fbefddfa02239
2023-09-29 16:33:52 +00:00
Mikhail Pyltsin
b52ed41214
[java-completion] IDEA-333184 completion for patterns in switch
...
- not show used patterns
- prioritize for rules
- support smart mode
GitOrigin-RevId: 647d1c3cbe51d46cf97c7c2ac95e9f0fd0dd4220
2023-09-29 09:19:25 +00:00
Tagir Valeev
c09b082016
[java-typing] IDEA-333179 "}" not added automatically after typing "\{" in interpolated string
...
GitOrigin-RevId: 5e8c790eb6422a25705806cdcb94c252c92883b3
2023-09-28 10:30:02 +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
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
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
Bas Leijdekkers
45955de566
Java: convert test to check highlighting as quick fix
...
GitOrigin-RevId: 75e88ded9aeedbe503a5e9e63a5dcf7ed6ea97c9
2023-09-26 17:04:13 +00:00
Mikhail Pyltsin
a5d749d8ea
[java-completions] IDEA-332716 IJ-CR-115136 SmartEnter invoked on the 'switch' expression does not move caret inside
...
- added formatting for switch expression
-simplify MissingSwitchBodyFixer
GitOrigin-RevId: 4c77e10ce5dd83d9c4f5d08c0c9fe94eeca0d411
2023-09-26 14:09:08 +00:00
Alexey Kudravtsev
67f7db108e
fix syntax errors in test files to make sure we are testing the correct thing
...
GitOrigin-RevId: 09bf5fde01489c9edbc233e586fe7137f7e3fe9b
2023-09-26 13:04:00 +00:00
Mikhail Pyltsin
cb328b8e61
[java-refactoring] IDEA-333185 rename to _ with unnamed class in scope
...
GitOrigin-RevId: f3c04977dce339d4c740f86f442fa078c2121a1f
2023-09-25 17:46:36 +00:00