1777 Commits
Author SHA1 Message Date
Egor Ushakov b5f7185b0b IDEA-371371 Stream trace debugging doesn't work with records
(cherry picked from commit bbe83739e3db7cd0b7a4b8842b6e5c1cbb8d1f32)

IJ-CR-161068

GitOrigin-RevId: a25b07b6d494e07c5bc018f5a6922b9bb4ad7978
2025-04-29 21:45:56 +00:00
Tagir Valeev 623504d6db [java-refactoring] IDEA-369011 Refactor -> introduce constant added NotNull annotation
(cherry picked from commit 485a0861caad52b591044e221dec0e44729b4c1e)

IJ-CR-158958

GitOrigin-RevId: a7555472e82a7a916c401a4e3eab30efee4279ac
2025-04-03 16:04:50 +00:00
Mikhail Pyltsin 0ff6bc9f98 [java-debugger] IDEA-367755 Stream trace debugging gives Internal Error in implicitly declared class
- set language level explicitly


(cherry picked from commit 01b844c4f0d812c4505491121429af3cc7df24c5)

IJ-CR-159083

GitOrigin-RevId: d6cca2ad6ad3a3717d27bba341419cb0c236833a
2025-04-02 22:12:05 +00:00
Bas Leijdekkers a8a552acf1 Java: add test for renaming record component with non-physical accessor (IJ-CR-157393)
(cherry picked from commit e88f2f4fc950c169d932220c48148a82e4c5bd34)

IJ-CR-157393

GitOrigin-RevId: 91c923ca5885ddf78611498b2e56876848bb2e5c
2025-03-13 19:44:29 +00:00
Bas Leijdekkers 7d17deb072 Java: don't break unrelated code in the same file when renaming record component (IDEA-367393)
(cherry picked from commit e262dd757e952cbd2a0cd6fba58f1448e96832b8)

IJ-CR-157393

GitOrigin-RevId: accd075b0a899ca14c2b95381cd08317f433abb1
2025-03-13 19:44:29 +00:00
Tagir Valeev 2b1dc0d76a [java-refactoring] IDEA-368729 Refactor -> introduce field fails if the expression contains unresolved type
(cherry picked from commit 564e2f82913f777c5c9e0b760b27fc0a859ec430)

IJ-CR-157054

GitOrigin-RevId: e6c98921966c48d5d4a90307c74fe42d6ad02fd7
2025-03-13 10:45:14 +00:00
Tagir Valeev 73beb4f7d9 [java-refactoring] IDEA-368385 Refactor introduce field added NotNull annotation
Additionally fix when LVTI local is converted to a field


(cherry picked from commit 274f9c199b0299986f6e381a109ef55424f0c333)

IJ-CR-156646

GitOrigin-RevId: 3d8d9405190e356eeb3c4114baa057a8213d4f08
2025-03-12 12:15:46 +00:00
Tagir Valeev ff056b8c7a [java-refactoring] IDEA-368385 Refactor introduce field added NotNull annotation
(cherry picked from commit c695550e832b648d31097d85ee887358551e95ac)

IJ-CR-156646

GitOrigin-RevId: 6288ec8f7abe19c87a57f03121883c0f5049b2ad
2025-03-12 12:15:46 +00:00
Bas Leijdekkers 53ded717a4 Java: fix incorrect "visibility conflict" detection when moving static method (IDEA-223533)
GitOrigin-RevId: 3137d113f9535fd7bd3595aa7bcfc67c763fae5d
2025-01-25 23:18:21 +00:00
Bas Leijdekkers c482950f2e Java: fix accessibility check when inlining superclass (IDEA-335158)
GitOrigin-RevId: ca48bfdfea8085fccedef9489b2c32ab82fcfcfb
2025-01-22 23:29:29 +00:00
Bas Leijdekkers c64d343e65 Java: fix 'Inline to Anonymous class' doesn't work for class with inner class (IDEA-365779)
GitOrigin-RevId: 5d1b8577e541fed47fb9ba4e0d8c17affa8fbf5d
2025-01-22 12:03:57 +00:00
Bas Leijdekkers 59ddd99f7b Java: keep @Override annotation on record accessor when Kotlin plugin is active
for Safe Delete refactoring

GitOrigin-RevId: 01e9b581bd83aaf805cd1952f0e5200cc5677f68
2025-01-17 18:10:29 +00:00
Bas Leijdekkers 052a9496b9 Java: Safe Delete should not make method private when it does not compile (IDEA-248028, IDEA-365766)
GitOrigin-RevId: 29071dfc72f3bb572d42b1d7f84e5aaa104323c0
2025-01-15 19:47:39 +00:00
Bas Leijdekkers 620c92a50a Java: keep @Override annotation when renaming record accessor method (IDEA-365420)
GitOrigin-RevId: b7bdf5fd1aadcb4aaa396f866ff73bd5e5de0e3e
2025-01-15 16:20:06 +00:00
Bas Leijdekkers 275753dbec Java: update records when inverting boolean (IDEA-357915)
GitOrigin-RevId: 3c05e0d1ce455cfb5c505a74a57caf25dde2cbe0
2025-01-07 10:05:14 +00:00
Mikhail Pyltsin bd9dc78aae [java-inspection] IDEA-311157 deleting component doesn't check usages
- fix recursive call with unconditional

GitOrigin-RevId: fb08111db21de7acb23ddef7368c1880da361e82
2024-12-02 23:20:02 +00:00
Mikhail Pyltsin 4b76fbce4f [java-inspection] IDEA-311157 deleting component doesn't check usages
GitOrigin-RevId: 55ef9a7d7fa7b96a8f54e91801060b7c3d44dd65
2024-12-02 18:59:47 +00:00
Tagir Valeev ff60a4753c [java-refactoring] IDEA-360614 Replace with single implementation: no downcast when 'this' is used
GitOrigin-RevId: f2ea406a5cf229cf9e63b6c2b53b9d86f245a6d9
2024-11-26 09:06:06 +00:00
Bas Leijdekkers 953aac49b4 Java: don't remove method call when renaming method called on qualifier with null type (IDEA-363097)
GitOrigin-RevId: 249bd70002d9d0400fa06d2d127a1016e0e6d252
2024-11-13 18:31:47 +00:00
Tagir Valeev 731b66f737 [java-refactoring] isFirstUse: handle static method qualifier
Fixes IDEA-356148 Inlining method creates undesirable temporary variable

GitOrigin-RevId: 34091cb3a6c6388b2086d92e8cd4b206b9250202
2024-11-11 16:52:09 +00:00
Tagir Valeev a762d39396 [java-refactoring] isFirstUse: take PsiAssignmentExpression into account
Fixes IDEA-361852 Java Inline Method refactor introduces intermediate variables

GitOrigin-RevId: 680fbb62f3440b7ae29f4de1793260fe5be0ab36
2024-11-11 16:52:09 +00:00
Bas Leijdekkers f81e59d5d8 Java: correctly qualify method call when it is inlined from static interface method (IDEA-362625)
GitOrigin-RevId: 2f32664c77558fc4507a8a6ecc327f6c91b7d815
2024-11-08 13:42:36 +00:00
Tagir Valeev 447ff452ae [java-refactoring] Inline method: support invert transformer in polyadic
GitOrigin-RevId: 516bb8355466a6f994c30692e1432353885d8b04
2024-10-24 16:36:51 +00:00
Tagir Valeev f1473af5f4 [java-refactoring] IDEA-361117 Inline method does not collapse lambda expression back after single-line method inlining
GitOrigin-RevId: e54db7c5b175b264ac37c28a0cdab8ffd194c93f
2024-10-22 12:20:34 +00:00
Bas Leijdekkers b4c155f5de Java: allow importing a class when there is a variable/method with the exact same name (IDEA-216101)
GitOrigin-RevId: e4c5b86ce2f4910711e33581c58d271dadbf6970
2024-10-21 10:51:02 +00:00
Tagir Valeev 9f74153b21 [java-refactoring] CodeBlockSurrounder: avoid collapsing with unrelated if-statement
Fixes IDEA-360579 Inline Method creates uncompilable code

GitOrigin-RevId: cd73e3e730b8cef37f4a26235a2ab3db812f02ff
2024-10-18 10:13:21 +00:00
Bas Leijdekkers 905b338cc3 Java: ignore parentheses when checking write access in Inline Parameter
GitOrigin-RevId: 3807aa5f627febd0f44acab16f8145148945f5a3
2024-10-17 19:06:58 +00:00
Bas Leijdekkers d9bb6a9b0b Java: avoid incorrect warnings when Inlining Parameter (IDEA-345199)
GitOrigin-RevId: 489422cffc7aecacd07468009da620a5732ce5ba
2024-10-17 19:06:58 +00:00
Bas Leijdekkers b9b2735045 Java: make Inline Object with Subsequent Call work for records with compact constructor (part of IDEA-255384)
GitOrigin-RevId: 497cb4f446c4ae6c90622e54898bfc105ba93bd6
2024-10-17 19:06:58 +00:00
Bas Leijdekkers e6233a181d Java: better check that parameter is still available after inlining (IDEA-308977)
GitOrigin-RevId: 4c9da5c574ed55e63dfef43d0d5dd655931533ee
2024-10-16 10:06:48 +00:00
Bas Leijdekkers a6d3ae518f Java: pushing down nested class from interface to class should add static modifier (IDEA-241036)
GitOrigin-RevId: 9b6541f85a1ea73a3debe088ff32899db79aade4
2024-10-16 10:06:48 +00:00
Mikhail Pyltsin c65db5b11c [java-refactoring] IDEA-360637 impossible to rename fields in implicit classes
GitOrigin-RevId: b599af338bb6e1763204d9b03af78c5bd7f8a37b
2024-10-15 13:50:53 +00:00
Tagir Valeev 09bd11efd8 [java-refactoring] IDEA-71792 Support inlining of abstract methods having one implementation
GitOrigin-RevId: 00491acff53aff96705a866e0d799dfe22873d23
2024-10-11 08:10:27 +00:00
Bas Leijdekkers 481fab7d13 Java: allow to "Inline to Anonymous Class" classes with static members (IDEA-360451)
GitOrigin-RevId: 835f91a1d35db9b78041da36c3bd147fa4e52ba3
2024-10-09 18:25:23 +00:00
Bas Leijdekkers 9404af07f5 Java: more refactoring warning message clarification (IJPF-CR-24908)
GitOrigin-RevId: c545eaecb2f911f77da5bd55121f95c1209fab29
2024-10-09 18:25:23 +00:00
Bas Leijdekkers 81a6c7d02c Java: support safe delete for record components (IDEA-245145)
GitOrigin-RevId: 5eccf46c5e0cce0d63c5ac480ad8d180b1ef0fed
2024-10-07 17:17:27 +00:00
Bas Leijdekkers af458693d5 Java: don't insert unnecessary casts on inlining method (IDEA-203962)
GitOrigin-RevId: c3f441b42d164438b1035112083a8114735a0a05
2024-10-01 09:31:57 +00:00
Bas Leijdekkers 7be0072137 Java: disallow inlining record to anonymous class (IDEA-359857)
GitOrigin-RevId: f477736ff39ea95cf9c9c5088c2dd0af9399f605
2024-10-01 09:31:57 +00:00
Tagir Valeev 9d989b2b7f [java-refactoring] Inline Parameter: do not erroneously report top-level non-static class references
Fixes IDEA-356746 Confusing warning when I inline array method parameter

GitOrigin-RevId: 1964db1b4a09ec7eb1bcbbcd05fcb445862f06b4
2024-09-26 13:53:17 +00:00
Bas Leijdekkers ba54dfd721 Java: care about generic class when replacing constructor with builder (IDEA-359490)
GitOrigin-RevId: 7aab29e572eb6da07d2fec202c886500fd944f6a
2024-09-24 10:04:30 +00:00
Bas Leijdekkers 84a8688289 Java: don't forget import when replacing constructor with builder (IDEA-359490)
GitOrigin-RevId: d013e469de340783918cbb4a3909a701594f683d
2024-09-24 10:04:30 +00:00
Tagir Valeev a1eecbd0ae [java] External type annotations (IDEA-231901): remove them on variable introduction
Also bumped test project descriptor

GitOrigin-RevId: fd519a34b01abbb9de135f1c39fc1cb02c8de891
2024-09-18 20:27:35 +00:00
Bas Leijdekkers cb7ac04d17 Java: handle classes without a qualified name better (IJ-CR-144804)
GitOrigin-RevId: 88ee8c15122aaca6028b591d8538e18de0882643
2024-09-16 18:13:55 +00:00
Bas Leijdekkers c40e983f98 Java: rename method correctly if the name conflicts with javadoc reference (IDEA-355643)
GitOrigin-RevId: c1ae53780e8ec3a56834dd32ecd9bc19cfd222fb
2024-09-12 18:27:21 +00:00
Tagir Valeev 6c29e44d6b [java-inspections] Track references in 'extends'; fix getMinimalAccessLevel for default constructor
Fixes IDEA-357158 "Replace constructor with factory method" makes code uncompilable

GitOrigin-RevId: dfe3341d2cb0ea975aa6a40d045bf8419ff39e5f
2024-09-04 11:31:52 +00:00
Tagir Valeev b01ac55564 [java-refactoring] Inline variable on non-initialized declaration
Could be available if there's only one write visible for all the reads
Fixes IDEA-354157 Inline variable not working when staying on uninitialized declaration

GitOrigin-RevId: e257b2b493a3902e901699efa4eac90f62e3108b
2024-09-02 21:01:25 +00:00
Mathias Boulay 19b9a28603 fix(JavaDoc): Refactoring misplaced tags
GitOrigin-RevId: 313091e94f8b65d379615f91dca7b975428aeeba
2024-09-02 10:36:29 +00:00
Tagir Valeev 655bf65a7d [java-refactoring] Inline variable: ignore references from method calls
Fixes IDEA-356914 Exception in Inline variable on red code

GitOrigin-RevId: ca785f72ba4b99fed0a0f3410a21df7dd13b7c5a
2024-08-02 14:18:00 +00:00
Bas Leijdekkers c72b96d481 Java: enable Pratt parser by default (IDEA-305898)
GitOrigin-RevId: 597cfc30aeff88a7791e9e185b5c08426844d4da
2024-08-01 12:35:28 +00:00
Alexandr Suhinin ed6d7fbc6d [extract method] IDEA-356707: simplify and speedup name suggestion
GitOrigin-RevId: 5a8baeec399127391f8e2069e6915f322c524458
2024-07-31 14:26:46 +00:00