Commit Graph

479 Commits

Author SHA1 Message Date
Tagir Valeev
ec8b3827f7 [suggested-refactoring] Get rid of companion object
GitOrigin-RevId: 9bb85fba6b4b17ccf655fc4424ce41d536019dbb
2023-11-08 19:40:49 +00:00
Tagir Valeev
d5ccfc998a [java-refactoring] Suggested refactoring: avoid canHaveOverrides in EDT
It could trigger resolve if modifiers are augmented (e.g., with Lombok). The same is checked anyway in background.
Improves IDEA-322957 T: DirectoryIndexImpl.getInfoForFile
Improves EA-765399 - T: DirectoryIndexImpl.getInfoForFile

GitOrigin-RevId: 7b1ff3fc823a53fdd959f662bffadce2c4747fa3
2023-11-06 19:11:39 +00:00
Bart van Helvert
d62f8988b6 [java-refactorings] Properly calculate file resolve scope in visibility escalator
#IDEA-321620

GitOrigin-RevId: 9ab6c6fabd94cb7e4361e3fcda6f444411ebdcfb
2023-11-06 10:09:31 +00:00
Tagir Valeev
fcd92a7fcd [java-refactoring] IDEA-235656 Automatically expand composite assignment when inlining variable
GitOrigin-RevId: 797f4121214eadfe1df74aadae0c2299dc178a02
2023-11-03 20:18:24 +00:00
Georgii Ustinov
8e3d29b3f9 [java-refactorings] Move Static Members produces red code when static import is present bug fix
IDEA-321620

GitOrigin-RevId: 78687728404da5953fd09c99066b8262583b8746
2023-11-03 09:14:08 +00:00
Tagir Valeev
c6fbff80c0 [java-refactoring] Inline variable: improve behavior in the presence of compilation errors
1. Properly forward the AnalysisCancelledException
2. Allow inlining of never overwritten variable in the presence of syntax errors

Fixes IDEA-336815 "Inline variable" misleading error message when compile-errors are present

GitOrigin-RevId: 7510d497fce2dcd4bef38482cfadf162d47cc2c0
2023-11-02 20:34:04 +00:00
Anna Kozlova
c9f3b68bc1 [kotlin] k2: inline properties (KTIJ-21133)
GitOrigin-RevId: 2d46287992a5b29385102280fa4c26b3bcaa9d64
2023-10-26 13:19:08 +00:00
Georgii Ustinov
c1b45196ae Rename test method when renaming production method
IDEA-154644 review refactor

GitOrigin-RevId: 600573d577d6748b3ca22306f53e2f5a327b0130
2023-10-25 19:08:22 +00:00
Georgii Ustinov
025ca6debb Rename test method when renaming production method
IDEA-154644 review refactor

GitOrigin-RevId: 013fdd5d1bfcdec2e8fb314cce3533918875787c
2023-10-25 11:34:00 +00:00
Tagir Valeev
40dd663d8e [java-refactoring] MakeStaticRefactoring: Unused methods removed
GitOrigin-RevId: cde66d049f258b132ead30ba2309c3e384e973d5
2023-10-24 16:54:30 +00:00
Alexandr Suhinin
d01214c835 [floating toolbar] IDEA-335885: hide 'AI Actions' and 'extract method' intentions if they can be shown in the toolbar
GitOrigin-RevId: f037683f6be8c9ef1fbc4dac5270b5bda2a5c8f2
2023-10-23 13:10:09 +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
51854f80b3 "Method can be static" fix massive application
GitOrigin-RevId: ed296b85922a6814d5c6057b5cbc720f0c546e41
2023-10-20 19:12:56 +00:00
Tagir Valeev
3b87cac754 Use String instead of StringBuilder
GitOrigin-RevId: 35a4ef4cfbcd67919b607b12217a255dbbb16b86
2023-10-20 16:37:16 +00:00
Mikhail Pyltsin
8d38973bfa [java-refactoring] IDEA-324451 IJ-CR-115002 SlowOp for EncapsulateFieldsHandler
- reimplement with SmartPointers

GitOrigin-RevId: 96e30e1f4e3ea9dac20e4f059946b0bd1659e356
2023-10-18 19:38:31 +00:00
Alexandr Suhinin
fd31f7f708 [extract method] clean up: remove redundant parameters
GitOrigin-RevId: 8b56daf46cfb80a409d500a3decdbb225fcc9076
2023-10-16 14:41:14 +00:00
Alexandr Suhinin
d150e6730c [extract method] clean up: extract new method
GitOrigin-RevId: 2eebf8a710386df60b9ffb143f0281687f27d1ba
2023-10-16 14:41:11 +00:00
Alexandr Suhinin
3f0fa71a39 [extract method] clean up: rename changed expressions to parametrized expressions
GitOrigin-RevId: aa1c0b2d4f2c44f9fb823900c50851b2269c1ac6
2023-10-16 14:41:09 +00:00
Mikhail Pyltsin
00bd9c2298 [java-refactoring] IJ-CR-115002 IDEA-324451 SlowOp for EncapsulateFieldsHandler
- fix names for concurrency
- fix condition for expiring

GitOrigin-RevId: 6896c070db8ae8305625f06af5f90c70256a379e
2023-10-12 16:41:52 +00:00
Anton Lobov
31ffbe939c [fleet] java extract - handle duplicates for expressions
GitOrigin-RevId: f22aeeef1f47374a67f6f64ceae97f3fe8480b0f
2023-10-12 06:42:53 +00:00
Andrey Cherkasov
46e2dfa159 The "Mismatch between light service level and its constructor" inspection: cleanup
GitOrigin-RevId: 2a6e7bcc32cb11f9fcdfa77c717aac6183182fb5
2023-10-12 03:02:23 +00:00
Tagir Valeev
6bd1e51f29 [java-refactoring] InlineMethodProcessor: use VariableNameGenerator; use 'self' name as a fallback
Fixes EA-882906 - AIOOBE: InlineMethodProcessor.declareThis

GitOrigin-RevId: cd2c5aeb71fe50ebb23a6f035fbc691b8a16f5df
2023-10-11 20:59:57 +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
Anna Kozlova
13b39cd3e3 change signature: extract language api
GitOrigin-RevId: 5424ce96e744e78aaf0f2c3e81d772b286cb155c
2023-10-05 13:34:44 +00:00
Nikolay Chashnikov
d67bdd5b72 [java] API cleanup: remove unused deprecated API (IDEA-322162)
GitOrigin-RevId: 8b8a875126194efe99989d51127072dd8e503d6e
2023-09-29 09:21:34 +00:00
Tagir Valeev
320c3f2442 [mod-commands] IDEA-333301 Support suggested refactoring in ModCommands
GitOrigin-RevId: dbd1401630a68e3e6ca932c5671f428f81e8324d
2023-09-26 09:19:50 +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
Daniil Ovchinnikov
c973850ddc IJPL-255 replace Application.assertIsDispatchThread -> ThreadingAssertions.assertEventDispatchThread
GitOrigin-RevId: da80a0648ffce76e93f35f72afc93334b21fe9a2
2023-09-22 00:08:26 +00:00
Mikhail Pyltsin
198b2402e6 [java-refactoring] IDEA-324451 SlowOp for EncapsulateFieldsHandler
GitOrigin-RevId: 9c035597260514a9513fda4e4b6b27ba4b53726d
2023-09-15 09:47:02 +00:00
Yuriy Artamonov
ad9decee76 [statistics] IDEA-326820 Enable counter usage collectors to be regular Kotlin object
GitOrigin-RevId: cb7d91441a3455c8f1f47f32423e81e92ec1b0d4
2023-09-09 22:50:27 +00:00
Roman Ivanov
7ce61422f0 [java, refactorings] refactoring now considers unnamed classes and do not break IDEA-327261
GitOrigin-RevId: 8f675ef34759bf5a78fcb823f7b147a02cb4cc13
2023-09-04 10:20:37 +00:00
Roman Ivanov
d0a6bb9fdc [java, refactoring] disable copy class IDEA-327325
GitOrigin-RevId: 84fe31808abbd5078f747fa6494644f5a4e33b4c
2023-08-27 21:24:03 +00:00
Roman Ivanov
c18e77260a [java, refactoring] disable extract superclass for unnamed class
GitOrigin-RevId: 376d8944f5b8fa29a97e17b51d02f46c452c2483
2023-08-27 21:24:01 +00:00
Roman Ivanov
2fcaa6fba7 [java, refactoring] disable extract delegate for unnamed class
GitOrigin-RevId: 96f06fcc32a75b5dae1003a8cfeabc78740228aa
2023-08-27 21:23:59 +00:00
Roman Ivanov
3d7d9f8298 [java, refactoring] disable extract interface for unnamed class
GitOrigin-RevId: 97ceafc6e1da2b8aefa921e94bfd30bd90c0808d
2023-08-27 21:23:58 +00:00
Andrei Efanov
7fd8f8c401 refactor: introduce NotNull annotations to BaseElementAtCaretIntentionAction methods
GitOrigin-RevId: 20fde7acc6856d13b67d52d6b4841dfbc158e652
2023-08-22 17:10:53 +00:00
Tagir Valeev
5f7ba99e21 [mod-command] ModCommands utility methods moved to ModCommand interface itself
GitOrigin-RevId: 56d8829b42d0942fd3a10bf6cdeca934f44f036e
2023-07-31 13:41:31 +00:00
Yuriy Artamonov
4d92f1c14b [statistics] IDEA-326820 Enable counter usage collectors to be regular Kotlin object
GitOrigin-RevId: 75be9604970c01b314eaa6969fd29069c4589035
2023-07-30 14:18:19 +00:00
Tagir Valeev
3e9a5182b4 [mod-commands] ActionContext moved to top-level
GitOrigin-RevId: 8a4621b5b48fed952c8a2865c8699039e42b1edb
2023-07-28 08:52:46 +00:00
Tagir Valeev
1d5471ed2d [java-refactoring] Improve message for convert local to inner
IDEA-326419 Move Refactoring - Local class - Option still says "Convert Anonymous to Inner" even if it's a local class

GitOrigin-RevId: 01606b46d721d3f78eead7181449ceee9149bf37
2023-07-26 15:37:21 +00:00
Tagir Valeev
013651b75d [java-refactoring] Minor fixes in AnonymousToInnerHandler
1. Adapt messages to speak about local class when applicable
2. Fix when name is not changed, but we have type parameters

GitOrigin-RevId: bd3dbda21922473c9c4e52bccf840a35c55c9d59
2023-07-26 12:45:58 +00:00
Bas Leijdekkers
3ce421f2d3 Java: don't create two delegate method when introducing parameter (IDEA-324562)
GitOrigin-RevId: 94552b6425d509161b9a800f88b0069b6fb94a6c
2023-07-24 20:08:20 +00:00
Tagir Valeev
c718b21cc1 [java-refactoring] Convert local classes to inner ones
Fixes IDEA-218207 Move refactoring doesn't work for local classes
Also: Convert anonymous to inner -> do not create fields used in other field initializers only
Also: Convert anonymous to inner -> capture implicitly referred type parameters (mentioned in types of captured variables)

GitOrigin-RevId: 5d326e0b6fdff4de850ce48582cc3ca0fe003b43
2023-07-24 19:35:31 +00:00
Tagir Valeev
0d61f28ad5 [mod-commands] ModCommandAction#asQuickFix -> LocalQuickFix#from
GitOrigin-RevId: c8f2245707d267fe2412c2fd3da17bdb68557b20
2023-07-24 14:48:57 +00:00
Tagir Valeev
c0b3b031e7 [mod-commands] SetInspectionOptionFix -> UpdateInspectionOptionFix (ModCommand)
GitOrigin-RevId: a1916285a58398848a6ce3c477399b3a86370efc
2023-07-24 14:48:52 +00:00
Tagir Valeev
be9a7b3ed9 [mod-commands] Move ModCommands, PsiUpdateModCommandAction, and PsiUpdateModCommandQuickFix to analysis-api module
ModCommand clients should be able to avoid lang-api

GitOrigin-RevId: d85285f99e69067c35e9a1a3ea0787264406bc1d
2023-07-21 11:17:28 +00:00
Tagir Valeev
a2c5327a0d [model-branch] ModelBranch API mostly removed (IDEA-309887)
Only one use left inside Fleet; also something used in Kotlin library code

GitOrigin-RevId: a6d34b268fe286582bd4d68d0dec183aa30f93de
2023-07-14 22:49:39 +00:00
Tagir Valeev
4c7609bdd7 [mod-commands] Basic support for templates and member chooser
GitOrigin-RevId: e7df218ea71800e71409de20474f43eb758e41de
2023-07-13 12:05:33 +00:00
Alexandr Suhinin
41f8056cad [extract duplicates] EA-621104: check if elements are valid before comparison
GitOrigin-RevId: d07fe8398e7b1bbf3b60599358cce85058503646
2023-07-13 09:48:01 +00:00
Alexandr Suhinin
6cae588251 CR-108312: pass project to avoid nullability issues & replace obsolete call
GitOrigin-RevId: 5713e775c141424e339af12ec88c159008e4ea80
2023-07-11 16:34:00 +00:00