Commit Graph

588 Commits

Author SHA1 Message Date
Nikolay Chashnikov
70676eed64 [java] API cleanup: remove unused deprecated API (IJPL-503)
GitOrigin-RevId: 36db2165d4a4bb133b7d63db944f6c8fe3490fa8
2024-05-16 18:00:17 +00:00
Tagir Valeev
1def0c841c [refactoring] Fix some raw-types in inplace introducers
GitOrigin-RevId: 8e2e93e1bfdd4ead7d0ef0b00aeacedbec7fe341
2024-05-15 10:31:43 +00:00
Tagir Valeev
7085a927d5 [mod-commands] ModCommandExecutor.executeInteractively convenience method
GitOrigin-RevId: ae163c5afe3391aa73e8b0898546de7e74ce2419
2024-05-12 17:34:00 +00:00
Mikhail Pyltsin
38cb4bb5f3 [java-refactoring] IDEA-352592 Rebind static import during moving inner class to new file
GitOrigin-RevId: 00174f0f8ced4e9316d30125e2302110671a5e4b
2024-05-10 18:25:13 +00:00
Tagir Valeev
d34e599418 [java-refactoring] IDEA-350228 Missing method body after moving an instance method from interface to non-abstract class
GitOrigin-RevId: a54261f44b8e07273962d3c8c6c2a3db62d6fccf
2024-05-08 17:35:06 +00:00
Tagir Valeev
11a73992ad [java-refactoring] MoveInstanceMethodProcessor: extract reference replacing code; cosmetics
GitOrigin-RevId: 767c7e074a41f7e33e67b2103e688feb9331d0d3
2024-05-08 17:35:05 +00:00
Tagir Valeev
20853b6789 [lang-impl] Deprecate NameSuggestionsField constructor that assumes the Java file type
Specify file types explicitly at call sites

GitOrigin-RevId: 140cf69a83dc8ee7526bb8d6450433e0e1188750
2024-05-08 12:07:44 +00:00
Georgii Ustinov
3a961fdccd [Java. Refactorings] Extract common base for test methods
IDEA-351758

GitOrigin-RevId: 3732c0bac541df2ae4d9a8fc103b0b9b625ed30d
2024-05-03 14:51:35 +00:00
Tagir Valeev
07da803111 [java-refactorings] Encapsulate field: fix possible NPE (IDEA-352883, EA-1109779)
GitOrigin-RevId: 014e5fd3c314a46a2271a17b11db3f3d92f8765f
2024-05-03 13:23:19 +00:00
Georgii Ustinov
4f9ab6b7b8 [Java. Refactorings] Make decision of renaming method based on its location in source root
IDEA-351758

GitOrigin-RevId: 193e44faa5b82e494b794571e3b88d3e2fe3c050
2024-05-02 13:15:31 +00:00
Anna Kozlova
8b9b938b08 [psi] pass originals for UpdateAddedFileProcessor
In all existing `UpdateAddedFileProcessor` originalElement was unused, probably because it was always null. To update kotlin packages only when they were aligned initially, it's necessary to have this original information.

^IDEA-352804 fixed

GitOrigin-RevId: ec08cf1c4172b9c284d1601d920c7fcd2c7ab08d
2024-05-02 09:56:34 +00:00
Anna Kozlova
4cc5e5f9cb [java] change signature: cleanup after review
KTIJ-28579

GitOrigin-RevId: 6c8a7857f2c1b55a67e0eab2d85b6984e969bb67
2024-04-29 21:00:19 +00:00
Tagir Valeev
e8b723c468 [java-refactoring] Inline local: go specifically one level up when searching for PsiReferenceExpression
Otherwise, it's possible to find something unrelated, e.g., if you are inside the lambda
Fixes IDEA-351780 Inline Local Variable inside lambda fails with error

GitOrigin-RevId: 8f0378975da117dfbc7086a67dac6fa6c9533a67
2024-04-26 14:23:13 +00:00
Bart van Helvert
41e3580cf8 [java] Don't compute conflicts for unrelated declarations
This caused some conflicts to be computed twice. Every `MoveHandler` should only compute conflicts it is responsible for moving.

GitOrigin-RevId: 7bca70630d7d57fcd4a5c6a6d1649fc1e53fb0eb
2024-04-25 13:51:29 +00:00
Anna Kozlova
8375e0f334 [java] change signature: ensure that nullability annotations which come from new type override existing non-TYPE_USE
- kotlin brings old annotations and thus it's very possible that after refactoring repeating annotations might appear

^KTIJ-28579 fixed

GitOrigin-RevId: 76f6a1e74827f7cc5f734e93a0c1324f5e068b88
2024-04-24 22:22:26 +00:00
Dmitry Batrak
881b370b95 RDCT-1092 Hotkeys are displayed incorrectly in popups on different OS
replace SystemInfo.isMac with ClientSystemInfo.isMac() in keyboard-shortcuts-related code

GitOrigin-RevId: 640604dff8e09d1aeccd0edc156873dd63c09fea
2024-04-22 19:16:22 +00:00
Alexey Belkov
5ea9f88846 Migrate deprecated usages of com.intellij.refactoring.suggested.range
GitOrigin-RevId: 2fd44594219500e1c8a84841bcd4326ed7e54083
2024-04-22 12:48:24 +00:00
Anna Kozlova
745be55ff1 [kotlin] k2 kmp change signature: special treatment for synthetic primary constructors
KTIJ-20436

GitOrigin-RevId: 2b63010902c65cdc059d931c6d64ab092e3a3870
2024-04-19 23:31:43 +00:00
Georgii Ustinov
a526e56691 [Java. Refactorings] Show rename popup only when method is located outside the test class
IDEA-351758

GitOrigin-RevId: f4004e304639fa4f58d6bc4a67e5c137172482fc
2024-04-18 22:19:58 +00:00
Mikhail Pyltsin
74e210570e [java] Pattern variable can be used mass cleanup
GitOrigin-RevId: 46452d7711435b63fca78af3a6f634bcec862139
2024-04-18 14:03:54 +00:00
Tagir Valeev
5caf42dc70 [util] Merge NameUtilCore#uniqName into UniqueNameGenerator
GitOrigin-RevId: a43f8908b639a6e5b562be99af5f880a85cfac74
2024-04-16 19:06:47 +00:00
Tagir Valeev
43b02d2a23 [java-refactoring] Support parameters on conflict detection
GitOrigin-RevId: 308c1da92a04f6212c0e6bb764bdf6d940192b2d
2024-04-11 14:46:35 +00:00
Tagir Valeev
06977838b9 [java-refactoring] JavaUnresolvableLocalCollisionDetector: more precise collision detection (IDEA-350196)
GitOrigin-RevId: a46b338c88fa4407d45979b7291cab20f6c61de2
2024-04-11 14:46:15 +00:00
Tagir Valeev
59def66076 [java-inspections] JavaUnresolvableLocalCollisionDetector: better conflict resolution (IDEA-350196)
GitOrigin-RevId: d5f90829166860d33b5ac9fbb21570be8687a615
2024-04-09 10:29:14 +00:00
Tagir Valeev
ac165fab2d [java-refactoring] Separate description for pattern variable; tests for conflicts
GitOrigin-RevId: 8609f4658c1ceb0575372102b55128e098000dc6
2024-04-09 10:29:09 +00:00
Tagir Valeev
faf35d0309 [java-refactoring] Extract delegate: fix when field has eol-comment (IDEA-350071)
GitOrigin-RevId: 6647c1d115ec2b49334f647ffaf8c0981d24862d
2024-04-08 11:42:20 +00:00
Tagir Valeev
36cb2326fc [java-inspections] JavaUnresolvableLocalCollisionDetector: correct the scope of pattern variables
Fixes IDEA-350196 Redundant conflict report when renaming a pattern variable to 'ignored'

GitOrigin-RevId: 4c26d52897668f895fe46193de2704efca888ebb
2024-04-05 18:52:01 +00:00
Yuriy Artamonov
59597eb185 [platform] IJPL-938 Deprecate public utils in com.intellij.refactoring.suggested
Update usages

GitOrigin-RevId: d56e13ad1631e92d900ded8d89edbed7bf214c41
2024-03-29 22:09:46 +00:00
Bas Leijdekkers
76e1902f7e [java] fix in-place Introduce Parameter delegate option when introduce from local variable declaration (IDEA-349736)
GitOrigin-RevId: abef6928a1b46b548c20013518418bf922b832a4
2024-03-22 15:10:44 +00:00
Dmitry Drobotov
78a468c530 IDEA-349563 Use title as label for the signature preview text field in Change Signature and Extract Method dialogs
GitOrigin-RevId: 8854ebc6b3bb3e08a913e503c31fdafdbd37792d
2024-03-20 21:12:29 +00:00
Tagir Valeev
aed276dfd3 [java-inspections] Use LocalRefUseInfo in more contexts to avoid extra PSI traversals
GitOrigin-RevId: 0dae53843eebe7232460cad1c809223342824cd2
2024-03-20 14:22:13 +00:00
Tagir Valeev
21617c8137 [java-refactoring] Rename conflicting local class
IDEA-332489 Inlining refactoring operation leads to naming conflicts

GitOrigin-RevId: 4e239def02419e7a0a30097d3b3ec8cdb69911fd
2024-03-16 12:47:10 +00:00
Tagir Valeev
4228eb556f [java-refactoring] Cosmetic; use JavaFeatures
GitOrigin-RevId: 4a60e9012e90a77a7fd0c0c3bf73619e3f5c2c49
2024-03-16 12:47:07 +00:00
Tagir Valeev
0237abc6f4 [java-refactoring] IDEA-348800 If a record and implemented interface have matching record parameter and interface method names, a refactor should change both
GitOrigin-RevId: d65847c2ae91f5fe2ae67d26cacfe22d3358e1b5
2024-03-15 14:05:54 +00:00
Tagir Valeev
287d0165ab [java-refactoring] BaseOccurrenceManager: cleanup
GitOrigin-RevId: 07bc4a17af1b6cb14cb3e96e3ee119a9f915ac94
2024-03-14 19:34:50 +00:00
Tagir Valeev
193b2cb477 [java-inspections] Experimental ModCommand-based DeletePrivateMethodFix for unused inspection
GitOrigin-RevId: efd9306505048695f1aa1de1851383e170b0c1ca
2024-03-12 16:55:18 +00:00
Bas Leijdekkers
8051e35d6d [java] don't offer "This reference only" inline option when not applicable (IDEA-195246)
GitOrigin-RevId: fb74a4e5d07300c8c14bf40c76e205c983429d72
2024-03-06 19:03:25 +00:00
Bas Leijdekkers
8eb1d3cd97 [java] disallow extracting constant from 'this' expression
GitOrigin-RevId: 271f37c3b341639f69dfb8b345cf2bfb8c96f541
2024-03-06 19:03:22 +00:00
Bas Leijdekkers
29d7aea7d4 [java] better message when trying to extract constant of variable accessed for writing
GitOrigin-RevId: deb515ab12422a30908578f9cdb367c902354942
2024-03-06 19:03:19 +00:00
Bas Leijdekkers
bf6fdd2607 [java] avoid some duplicate properties
GitOrigin-RevId: 7fa2f2f584d1b59c475d372ed5f0ca8f9969ee3c
2024-03-06 19:03:16 +00:00
Bas Leijdekkers
fb03f800df [java] Remove on-demand imports referring to old package name after package rename (IDEA-171422)
GitOrigin-RevId: c54007736ce960ad874f82819e88519766d92a0a
2024-03-04 12:03:50 +00:00
Tagir Valeev
83db437eba [java-refactoring] Fix inline variable in IDEA when INLINE_LOCAL_THIS setting was stored in config in older IDE versions
GitOrigin-RevId: 10fcf8ee46c40edae0bd714c1c3867aad32958d0
2024-02-19 14:20:53 +00:00
Nikolay Chashnikov
0d6c09fc44 [java] API: mark for removal unused deprecated API (IJPL-275)
GitOrigin-RevId: bd2e927a5c22a1f2930b97de8e051bc70d62a0c7
2024-02-16 15:45:41 +00:00
Tagir Valeev
92ac3066cb [java] JavaFeature.OVERRIDE_INTERFACE; isLanguageLevel6OrHigher usages removed
GitOrigin-RevId: 5d1bedeee34435ecbfc0d4bda6245a50c9ac24d7
2024-02-15 17:28:26 +00:00
Tagir Valeev
bf85acba82 [java] More JavaFeature uses
Also: new JavaFeatures (ASSERTIONS, ENUMS, PRIVATE_INTERFACE_METHODS)

GitOrigin-RevId: f073845a77730b486afa56317e2c12ff044f5425
2024-02-12 19:12:43 +00:00
Tagir Valeev
bc953af5de Fix/suppress IgnoreResultOfCall
GitOrigin-RevId: 2f0cc37e902e13b9dade80af300e218a6f7665ec
2024-02-09 19:11:14 +00:00
Tagir Valeev
ea2b70a2d1 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
JavaFeature.EFFECTIVELY_FINAL

GitOrigin-RevId: d52ab73d7d24745b149b5a4704f1dee55e4179f0
2024-02-08 10:08:09 +00:00
Tagir Valeev
72890668ad [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Rename STREAMS to STREAM_OPTIONAL; use features instead of isLanguageLevel8OrHigher

GitOrigin-RevId: 36f56560f6c7ca626a268d8b07da86497f2501a0
2024-02-08 10:08:04 +00:00
Tagir Valeev
340c4d40ba [java] IDEA-345355 Refactor HighlightingFeature (in progress)
JavaFeature.isAvailable moved to PsiUtil, as we cannot get PsiElement language level inside frontback-api module

GitOrigin-RevId: 8092b1f55f0d90af5bc570f2fb49cdf9ef94485a
2024-02-08 10:07:48 +00:00
Tagir Valeev
d0d82eba52 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Declare new features: SERIAL_ANNOTATION, NESTMATES, ALWAYS_STRICTFP, COLLECTION_FACTORIES, INNER_NOT_CAPTURE_THIS, STRING_SWITCH
Use more features instead of explicit Java levels

GitOrigin-RevId: e90a96501c218ed44faebb7c882770b50477b6e1
2024-02-08 10:07:38 +00:00