Aleksey Dobrynin
2dd8312cf2
[java, jigsaw, index] prioritize newest Java descriptor in multi-release JARs (IDEA-365082)
...
(cherry picked from commit 10d03d5095264cf4e708b6154b4f4a90ea683155)
IJ-CR-156911
GitOrigin-RevId: 9af80db882a95d952565b74db2aa6e82e5dc6716
2025-04-30 10:56:32 +00:00
Aleksey Dobrynin
25a39de77f
[java, jigsaw] Support JDK-8197532: add tests (IDEA-367339) IJ-CR-154794
...
(cherry picked from commit e3acb5c8848ae13da6f28c1593b432e27c81cd14)
IJ-CR-154794
GitOrigin-RevId: 881dcb8023063fcdd7116191c662b180986d4f93
2025-04-30 08:31:30 +00:00
Tagir Valeev
5e8306f8c8
[java-highlighting] Improve error message in IDEA-369310
...
Previous hasError status (after syntax error) was not reset. As a result, we did not report the next error on the surrounding element.
(cherry picked from commit 60c0be1cc6ca4967eb72e2fc24278cdc5cf2728e)
Review ID: IJ-CR-157915
GitOrigin-RevId: a44595d7b2e8fd472f6f084998901645bf29eab6
2025-03-20 10:59:14 +00:00
Tagir Valeev
22abc0a29b
[java-highlighting] IDEA-369310 NPE in error highlighter
...
(cherry picked from commit 0944d4f1c9594d138df85041748ff72fb56e436d)
Review ID: IJ-CR-157915
GitOrigin-RevId: 08a1d92218b7164b3683018cf8ce1e865eea7c24
2025-03-20 10:59:13 +00:00
Bart van Helvert
345158158f
[java] Don't generate main in implicit class with public modifier
...
#IDEA-369157 Fixed
(cherry picked from commit 6e8de88250b26b51e2f603eb04d751e1ea086a29)
IJ-CR-157703
GitOrigin-RevId: d7ec7c8e40e377d4e28c4f3f7b5b3d1944d6724c
2025-03-14 14:57:53 +00:00
Tagir Valeev
d3a7dcfa0a
[java-highlighting] Avoid highlighting outside of PsiField psi element
...
Fixes IDEA-368916 IAE in error highlighting when several fields are declared with shared modifier list
(cherry picked from commit 012b6564f9ca1a775894a3fc2b003c4feb2477e6)
IJ-CR-157290
GitOrigin-RevId: 4640510fdabda87e7b2da384f001f93c9bf64af1
2025-03-12 11:46:51 +00:00
Tagir Valeev
f4f49236b6
[java-highlighting] IDEA-368498 Errors about incorrect TYPE_USE annotations are not reported by IntelliJ IDEA
...
(cherry picked from commit 05b017fe457e4efaf0685d429bfd6c2e743936cb)
IJ-CR-156764
GitOrigin-RevId: 5b39f41262152741ae21b83e27f3f61e93ad74c2
2025-03-12 11:33:13 +00:00
Tagir Valeev
9e458c909c
[java-highlighting] checkLabelSelectorCompatibility extracted and moved to SwitchChecker
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: bec076c5bff67e22d06e64e573d3219a4c89dd4d
2025-02-19 17:57:38 +00:00
Tagir Valeev
f8b210a481
[java-highlighting] Minor fixes in switch statement highlighting
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 2924ae6c9984caa6e8a45f640c4de54e02134ad3
2025-02-19 14:57:00 +00:00
Tagir Valeev
ae7957d3c7
[java-refactoring] ChangeMethodSignatureFromUsageFix: remove external type annotations
...
Fixes IDEA-366962 Quick-fix for adding method parameter generates long jetbrains UnknownNullability annotation
GitOrigin-RevId: 03d9b8be45670e6a72696d740d7ca71d746c7267
2025-02-19 14:57:00 +00:00
Bas Leijdekkers
3b4e914cad
Java: let join lines convert lambda with single line code block body to expression lambda (IDEA-344762)
...
GitOrigin-RevId: e5f895b4d6241fd4a15fa62e2ab764f9a4e3860a
2025-02-19 11:58:47 +00:00
Tagir Valeev
cb626d5749
[java-highlighting] checkSwitchSelectorType migrated
...
Error messages unified; do not list allowed switch types anymore
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 69675af87ac8866fb5ba1475094b93af07aa1ad5
2025-02-18 09:36:18 +00:00
Tagir Valeev
e6691d9ea8
[java-highlighting] SwitchBlockHighlightingModel.checkSwitchBlockStatements migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 463b1549d45bf98586e6ae9dafb4bc4b330bbe52
2025-02-18 09:36:18 +00:00
Tagir Valeev
b58f63db9e
[java-intentions] Test for IDEA-367517
...
GitOrigin-RevId: 629874907d950626a912c2fbd6c8bb9b50b93902
2025-02-17 12:04:21 +00:00
Bas Leijdekkers
ce156feab4
Java: fix rendering of Unicode escapes in Javadoc comments (IDEA-342423)
...
GitOrigin-RevId: 63f994ebc05f7c0d43207ea08f037ad279a9f7ee
2025-02-16 22:58:12 +00:00
Mikhail Pyltsin
bc97ae6bb8
[java-import] IDEA-367539 auto-import. try to show packages
...
GitOrigin-RevId: 536bd4376056b948cee7ae932c7c72dc1837f29c
2025-02-14 17:55:46 +00:00
Mikhail Pyltsin
639d17a13d
[java-import] IDEA-367541 auto-import. Not static import for default packages
...
GitOrigin-RevId: 3728afb5c50ada38f45f03b8bfebb7acb3af9ae2
2025-02-14 17:55:46 +00:00
Tagir Valeev
2350d69472
[java-highlighting] JavaCompilationErrorBundle.properties proofreading (DOC-34381)
...
GitOrigin-RevId: 05bdca159a63027ea0d1e3d767d4adb9b258f47e
2025-02-14 12:45:24 +00:00
Tagir Valeev
61f7252105
[java-highlighting] same erasure problems migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 052d3bf8a26c376c7dfc5b1e370e583cf6236138
2025-02-12 20:34:11 +00:00
Tagir Valeev
4bff779350
[java-highlighting] ControlFlowUtil.isInitializedBeforeUsage: fix field handling
...
Fixes IDEA-367309 False-positive ‘might not have been initialized’ warning for final field in anonymous class initialized via static field
GitOrigin-RevId: aa2d951945ba497188cfdac343f1b9eb40720ee3
2025-02-11 15:54:30 +00:00
Tagir Valeev
c4549cf1a5
[java-inspections] Save varargs warning text fixed
...
GitOrigin-RevId: d934d8ef4c47848ad2edfda608a4cd29eadee35a
2025-02-11 15:54:30 +00:00
Mikhail Pyltsin
26a09a1c53
[java-highlighting] IDEA-366905 'Label is dominated by a preceding case label' error highlighting appears in a case when there is no compilation error
...
GitOrigin-RevId: a6cb61a29153fbd0524b15995427cd2dc285c653
2025-02-11 11:58:17 +00:00
Tagir Valeev
e7f402a2e9
[java-highlighting] checkPermitsList migrated completely; HighlightClassUtil migration finished
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: dc73c1168256fad8d274ce3d009f97fae35fb59f
2025-02-10 14:02:54 +00:00
Tagir Valeev
178b721cf7
[java-highlighting] Preview warning migrated
...
Also improve reporting, different messages for errors and warnings; reflective preview use reported by inspection
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: d7c85058aed3202d0599fc879a61c0fa56388fea
2025-02-10 14:02:54 +00:00
Tagir Valeev
9314a671b8
[java-highlighting] checkSwitchExpressionHasResult migrated
...
Also use ControlFlow instead of ig ControlFlowUtils to check normal completion. Otherwise, it thinks that System.exit() doesn't complete normally
Also fix (hopefully) yield in finally in ControlFlowUtil.canCompleteNormally
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: efa0cd4b8f478b98e904186005b7802e958507ae
2025-02-07 12:04:27 +00:00
Mikhail Pyltsin
a883cc2140
[java-import] IDEA-366927 and IDEA-366926 improve auto-import
...
- improve tests
GitOrigin-RevId: 0689eff2477a06d699c112e5c7744b1debd07886
2025-02-06 14:35:04 +00:00
Tagir Valeev
1cd294e40d
[java-highlighting] The rest of control-flow-related stuff (checkFinalVariableMightAlreadyHaveBeenAssignedTo) migrated
...
More utility methods inside ControlFlowUtil
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: d4c294ce18da2032a0686f66794a7f377549edd2
2025-02-06 10:35:32 +00:00
Tagir Valeev
cc643a5ae4
[java-highlighting] More control-flow-related stuff migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 3c292fdf4869e6d13c16fabbf42e2055ea54f724
2025-02-06 10:35:32 +00:00
Mikhail Pyltsin
4543b3fe66
[java-import] IDEA-366927 and IDEA-366926 improve auto-import
...
- fix inspections
GitOrigin-RevId: 629202f11b819d73aadbf9d0a6c6ce85b58bf39b
2025-02-05 15:36:45 +00:00
Tagir Valeev
913cade2a5
[java-highlighting] checkVariableMustBeFinal migrated
...
Also: intermediate refactoring inside HighlightControlFlowUtil related to init-before-use
Also: ErrorFixExtensionPoint now works for any kind (intermediate solution)
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 7a712a841a52a99bac4faafaf1164921c1150a56
2025-02-05 12:41:14 +00:00
Tagir Valeev
a98ba9ff92
[java-highlighting] More control-flow-related stuff migrated
...
Public methods from HighlightControlFlowUtil moved to ControlFlowUtil
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 64fa78391b02f9dec3d9f2410e764c8b8e479ea6
2025-02-05 11:59:05 +00:00
Mikhail Pyltsin
3402d737d7
[java-import] IDEA-366927 and IDEA-366926 improve auto-import
...
- use code style for on-demand imports
- support members for auto-import, not the whole class
GitOrigin-RevId: 32d14c06819a1b1062b081756f614113e22c9858
2025-02-04 20:23:25 +00:00
Tagir Valeev
caef43a5e5
[java-highlighting] Incompatible lambda parameter types moved
...
Also: report every incompatible parameter, not only the first one
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: a9d75a78207d0910f0bcbb6060e38acedc3f07d3
2025-02-04 19:21:50 +00:00
Tagir Valeev
fd581aa354
[java-highlighting] Refactor FunctionalInterfaceTest to avoid internals dependency; move completion stuff out of LambdaHighlightingUtil
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 4bd5447dd5fc2342f5e9b23e693f7683594470f5
2025-02-04 19:21:50 +00:00
Tagir Valeev
577de68f8a
[java-highlighting] Most of method-reference problems migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 03528950826974c1875e89868dc335c88c2e8149
2025-02-04 19:21:50 +00:00
SirYwell
21a3a5d9eb
Fix wrong intention when referencing parameters in static fields
...
#IDEA-366531 Fixed
GitOrigin-RevId: 1338ab4efdb16eeb9991a060653fa46ff169db3e
2025-02-04 15:18:14 +00:00
Bas Leijdekkers
b4544c7a42
Java: clearer name for inspection and quick-fix
...
GitOrigin-RevId: 0ee29991b00d4ac8341c031a4a111b23bb44b800
2025-02-04 14:01:33 +00:00
Tagir Valeev
357eded694
[java-highlighting] Conditional type mismatch errors migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: c1bbedc1bd8188258117b05323b2282e244a2354
2025-02-04 09:52:02 +00:00
Tagir Valeev
5b5abb8e13
[java-highlighting] Lambda-related type errors migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 1fb0b4c35b4db63d8c15cb392098380d1014ebf2
2025-02-04 09:52:02 +00:00
Bas Leijdekkers
9e54c0017f
Java: create final local variable when configured (IDEA-366908)
...
for the "Convert to local" quick-fix of the "Field can be local" inspection
GitOrigin-RevId: f82f38ca4c6eda299519eef80e6a90aa8d4b2f68
2025-02-03 20:43:02 +00:00
Mikhail Pyltsin
d81368c5b1
[java-import] IDEA-366882 Auto-import completion adds unused import instead of qualified static method call
...
- make condition take into account names for members
GitOrigin-RevId: 75a65e350f4b1d4c3adfef1e3f80023a4227247e
2025-02-03 17:48:26 +00:00
Bas Leijdekkers
e41f056a6b
Java: report errors again on qualified reference if the type of the qualifier is unknown (revert of fix for IDEA-240047)
...
GitOrigin-RevId: 28d8cda938544f81c5b32d931496b6ba707b5c35
2025-01-31 23:27:00 +00:00
Tagir Valeev
00ce24a9b2
[java-inspections] Avoid non-counter limits with joining terminal
...
Fixes IDEA-362807 Incorrect result from "Collapse loop with stream 'collect()'" action
GitOrigin-RevId: 61c75668bb85f662222f97026511c4f6f10176c1
2025-01-31 19:13:18 +00:00
Tagir Valeev
9ff09939f1
[java-highlighting] fixes after recent changes in highlighting
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 5fbcd6d223a0ea3c04bc0d219cff125938470816
2025-01-31 15:31:12 +00:00
Tagir Valeev
72809f5127
[java-highlighting] more generic-related code migrated
...
checkReferenceTypeArgumentList -> hasReferenceTypeProblem, greatly simplified (still used to build fixes, not sure what to do with it)
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: dbb1c53401f10605926dc0fcec416c3ce08172c5
2025-01-31 15:31:12 +00:00
Anna Kozlova
51efb04317
[java] don't suggest create enum from usage when types can't agree
...
^IDEA-366733 fixed
GitOrigin-RevId: 64f861eeff4c2e9f1439e5837c5f0477a4944bc6
2025-01-31 15:01:06 +00:00
Tagir Valeev
01bc97b6cc
[java-highlighting] checkAmbiguousMethodCallIdentifier -> ExpressionChecker
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 0edb80ae452250e0d12ff987aa5701b048dc91cb
2025-01-30 17:21:02 +00:00
Tagir Valeev
2b4707f2ef
[java-highlighting] checkVariableExpected; yield checks migrated
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: e4261df8c429a46d6aa238b7dcb4a97fdc45f9eb
2025-01-30 09:37:04 +00:00
Tagir Valeev
c449c341b7
[java-highlighting] test-data adjusted (mostly anchors) after recent updates
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: 1e1b77009dc78de49c7cc5c44d4704937397bb23
2025-01-29 11:35:30 +00:00
Tagir Valeev
be747e6461
[java-highlighting] variable errors migrated; some improvements in incompatible type fixes
...
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)
GitOrigin-RevId: b8531f50c89b009e852e1fdcc9efce1c29dcf4e1
2025-01-29 11:35:29 +00:00