Hint action to update usages on cut/paste of top-level declarations
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import source.*
|
||||
import target.bar
|
||||
import target.foo
|
||||
|
||||
fun f() {
|
||||
foo()
|
||||
g(bar)
|
||||
sourcePackFun()
|
||||
}
|
||||
|
||||
fun g(p: Int){}
|
||||
@@ -0,0 +1,9 @@
|
||||
import source.*
|
||||
|
||||
fun f() {
|
||||
foo()
|
||||
g(bar)
|
||||
sourcePackFun()
|
||||
}
|
||||
|
||||
fun g(p: Int){}
|
||||
@@ -0,0 +1,7 @@
|
||||
package source
|
||||
|
||||
import target.targetPackFun
|
||||
|
||||
fun sourcePackFun(){}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package source
|
||||
|
||||
import target.targetPackFun
|
||||
|
||||
fun sourcePackFun(){}
|
||||
|
||||
<selection>
|
||||
/* comment 1 */
|
||||
|
||||
fun foo() {
|
||||
sourcePackFun()
|
||||
targetPackFun()
|
||||
}
|
||||
|
||||
/* comment 2 */
|
||||
|
||||
val bar = 10
|
||||
|
||||
/* comment 3 */
|
||||
</selection>
|
||||
@@ -0,0 +1,19 @@
|
||||
package target
|
||||
|
||||
import source.sourcePackFun
|
||||
|
||||
fun targetPackFun(){}
|
||||
|
||||
|
||||
/* comment 1 */
|
||||
|
||||
fun foo() {
|
||||
sourcePackFun()
|
||||
targetPackFun()
|
||||
}
|
||||
|
||||
/* comment 2 */
|
||||
|
||||
val bar = 10
|
||||
|
||||
/* comment 3 */
|
||||
@@ -0,0 +1,5 @@
|
||||
package target
|
||||
|
||||
fun targetPackFun(){}
|
||||
|
||||
<caret>
|
||||
@@ -0,0 +1,8 @@
|
||||
// COPY
|
||||
// IS_AVAILABLE: false
|
||||
package source
|
||||
|
||||
<selection>
|
||||
fun foo() {
|
||||
}
|
||||
</selection>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package dependency
|
||||
|
||||
class Dependency
|
||||
|
||||
fun f() {
|
||||
to.foo(Dependency())
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package dependency
|
||||
|
||||
import source.*
|
||||
|
||||
class Dependency
|
||||
|
||||
fun f() {
|
||||
foo(Dependency())
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// OPTIMIZE_IMPORTS_AFTER_CUT
|
||||
package source
|
||||
|
||||
|
||||
fun foo(o: Any) {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// OPTIMIZE_IMPORTS_AFTER_CUT
|
||||
package source
|
||||
|
||||
import dependency.Dependency
|
||||
|
||||
<selection>
|
||||
fun foo(dependency: Dependency, o: Any? = null) {
|
||||
}
|
||||
</selection>
|
||||
|
||||
fun foo(o: Any) {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package to
|
||||
|
||||
import dependency.Dependency
|
||||
|
||||
|
||||
fun foo(dependency: Dependency, o: Any? = null) {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_AVAILABLE: false
|
||||
package source
|
||||
|
||||
<selection>
|
||||
fun foo() {
|
||||
}
|
||||
</selection>
|
||||
@@ -0,0 +1,3 @@
|
||||
package source
|
||||
|
||||
<caret>
|
||||
Reference in New Issue
Block a user