Commit Graph

140 Commits

Author SHA1 Message Date
Andrei Klunnyi 53a7dc1126 KT-44839 [Sealed interfaces]: restore move-tests for lang-version < 15
This commit restores tests removed in 690fb47c.
2021-02-15 15:28:00 +00:00
Andrei Klunnyi 690fb47cbb KT-44079 [Sealed Interfaces]: move refactoring update
The idea behind this commit is that Move Refactoring should warn
developers in case their intention potentially breaks sealed
hierarchies (members must share the same module and package).

Provided algorithm has two goals:
- prevent destruction of correct hierarchies
- help in fixing broken ones
2021-02-03 10:04:26 +00:00
Vyacheslav Gerasimov 8620d26a8a Delete 193 bunch files 2020-11-11 14:28:53 +03:00
aleksandrina-streltsova 5515465760 Move: Support method moving 2020-08-19 12:11:53 +03:00
Nikolay Krasko 21fa2bf98c Switch to 201 platform 2020-06-30 19:53:18 +03:00
Dmitry Gridin 2610dedcbd KotlinUnusedImportInspection: support unresolved references
#KT-31331 Fixed
2020-06-23 09:48:07 +00:00
Dmitry Gridin 2f015b4c7a Fix testKotlin_moveTopLevelDeclarations_movePrivatePropertyWithDefaultAccessors_MovePrivatePropertyWithDefaultAccessors test 2020-04-29 13:05:36 +07:00
Dmitry Gridin db5751616a MoveKotlinDeclarationsProcessor: fix formatting for long qualifier names
#KT-35338 Fixed
2020-04-28 12:37:17 +00:00
Igor Yakovlev b205b017fe Fixed references move refactoring for NonCode usages
We need to try correctly refactor NonCode usages of Java-like facade FQ names
i.e. if we have file A.kt with method foo we need to check AKt.foo and foo entries for non-code text search

Fixed #KT-36382
2020-03-30 13:51:27 +03:00
Vladimir Dolzhenko e951f1a43a Find Usages and Go to declaration of element used via import alias
#KT-18619 Fixed
2020-03-20 14:59:24 +00:00
Roman Golyshev 3461effd47 KT-33372 Remove renaming file reference to the contents of the file
- There is still a hack with returning null from `getLastFileReference`,
it is here to keep KT-25674 issue fixed
- Overrides of `bindToElement` are removed, they caused renames of the
file references to their contents
- Code of `KotlinFilePathReferenceContributor.kt` is refactored
- ^KT-33372 ^KT-32514 ^KT-36306 Fixed
2020-02-16 17:08:11 +03:00
Burak Eregar d1cbee44f1 Move refactoring: suggest file name starting with an uppercase letter
Fixed #KT-30342
2019-08-21 00:58:59 +03:00
Vadim Brilyantov 60e3787800 Tests for Sealed Class move + Fix invalid move declaration test
MoveDeclarationToSeparateFile.testSealed test was threated to check that the intention is not applicable but it currently is.
2019-07-17 15:53:58 +03:00
Dmitry Gridin 6605e0dfc0 Update test 'moveMultipleFIlesWithImplicitPrefix' 2019-07-10 14:09:37 +03:00
Dmitry Gridin d2b8535548 Move/copy refactoring: add base support of implicit package prefix
#KT-29720 Fixed
2019-07-10 14:09:37 +03:00
Dmitry Gridin 96ed33e357 Optimize Imports should remove unused import alias
#KT-17375 Fixed
2019-05-06 18:10:52 +07:00
Vyacheslav Gerasimov 818910267e Remove 173 bunch files 2019-01-14 21:29:02 +03:00
Alexey Sedunov 3c267b206b Move: Fix exception on moving top-level declaration from/to script file
#KT-20260 Fixed
2018-06-04 20:17:43 +03:00
Vyacheslav Gerasimov 8c88ac69df Cleanup .181 bunch files 2018-04-27 18:25:21 +03:00
Vyacheslav Gerasimov bc403ce744 Switch to 181 platform 2018-04-27 18:25:17 +03:00
Alexey Sedunov bf106d01b8 Find Usages: Restrict search scope of private top-level declarations
#KT-7622 Fixed
2018-04-13 20:23:04 +03:00
Alexey Sedunov ffc059a0a1 181: Misc: Update Move test data 2018-04-11 16:28:36 +03:00
Alexey Sedunov df4c80f43a Shorten References: Allow import insertion when function and property have the same name
#KT-22745 Fixed
2018-03-06 15:15:44 +03:00
Alexey Sedunov df4cd14161 Move: Relax private/protected visibility checks for usages in Java code 2018-03-06 15:15:43 +03:00
Alexey Sedunov 12d5a72697 Move: Show more accurate message when moving subclass of a sealed class
#KT-23065 Fixed
2018-03-06 15:15:41 +03:00
Alexey Sedunov d06f23f2ba Move: Fix replacement of non-code usages with backquoted names
#KT-13986 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov 883558a4c7 Move/Copy: Fix 'protected' conflict reporting for references in super type entries
#KT-22678 Fixed
2018-02-28 14:03:43 +03:00
Alexey Sedunov a341392524 Move: Search Java usages when top-level declaration moves to new facade
#KT-22747 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov 91fdc0e967 Move: Drop ${...} around shortened qualified expression
#KT-22692 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov e63e48933d Move: Add import for top-level declarations moved to the default package
#KT-22661 Fixed
2018-02-28 14:03:42 +03:00
Alexey Sedunov 17e64ebae0 Move: Fix processing of callable references to nested Java classes and static methods
#KT-17827 Fixed
2018-02-21 13:21:20 +03:00
Alexey Sedunov 441f88c144 Move: Fix processing of callable references to nested Kotlin classes
#KT-17827 In Progress
2018-02-21 13:21:19 +03:00
Alexey Sedunov bdfc814389 Move: Fix scope of internal reference recovery in the case of file move
#KT-22282 Fixed
2018-02-21 13:21:19 +03:00
Alexey Sedunov 4537192e86 Move: Check if sealed class is moved with its subclasses
#KT-22769 Fixed
2018-02-21 13:21:18 +03:00
Alexey Sedunov 27d4593fc4 Move: Fix lengthening of qualified type references
KT-14519 Fixed
2018-02-21 13:21:18 +03:00
Alexey Sedunov 1af21dd160 Move: Warn about moving public declaration to non-public class
#KT-22771 Fixed
2018-02-21 13:21:18 +03:00
Mikhail Glukhikh 6e41bbc2a7 Migration: header->expect & impl->actual in IDEA test data 2017-09-15 18:29:06 +03:00
Alexey Sedunov 62ca3bab31 Move: Do not skip usages of declarations without light elements
#KT-18873 Fixed
2017-08-15 19:08:25 +03:00
Alexey Sedunov 2e8b374ce8 Move: Use KtNamedDeclaration as referrer when reporting a conflict
EA-103817 Fixed
2017-06-29 17:42:15 +03:00
Alexey Sedunov 8bbf8e185a Move: Filter out usages with visibility error before refactoring
If declaration is already invisible before move,
no visibility conflict should be reported

 #KT-17571 Fixed
2017-05-10 14:49:52 +03:00
Alexey Sedunov a8c57f11af Move: Implement more accurate 'protected' visibility check
#KT-17545 Fixed
2017-04-24 20:52:12 +03:00
Alexey Sedunov c690761715 Move: Do not process imported references when moving entire file
#KT-17538 Fixed
2017-04-24 20:52:10 +03:00
Alexey Sedunov f575e2710f Move: Fix processing of implicit extension 'invoke' calls
Also fix bogus "unused import" inspection reported on such calls

 #KT-17496 Fixed
2017-04-21 13:32:34 +03:00
Alexey Sedunov 9979c6e361 Move: Fix processing of callable references to Java constructors 2017-04-11 12:11:51 +03:00
Alexey Sedunov 411a8dc206 Move: Remove duplicating conflict messages from test data 2017-04-11 11:45:13 +03:00
Alexey Sedunov 358b5fe548 Move: Force package name change when moving Java files
Package statement in Java file is updated too late
when moving the entire containing directory, so we force it
with intercepting MoveFileHandler implementation
2017-04-11 11:45:08 +03:00
Alexey Sedunov c1066b98f0 Move: Fix warning on companion used as implicit dispatch receiver
Do not report conflict if target class is a sublcass of
companion object's containing class
2017-04-06 18:54:02 +03:00
Alexey Sedunov 5c35061afa Move: Make minor improvements and refactorings 2017-04-06 18:52:45 +03:00
Alexey Sedunov 4a168ff780 Move: Process internal usages after all declarations are moved 2017-04-06 18:18:33 +03:00
Alexey Sedunov 746ec48176 Move: Fix internal reference processing on moving multiple files
#KT-17211 Fixed
2017-04-04 14:35:10 +03:00