Reworked k2k copy-paste action.

Get rid of resolve from copy phase, paste phase performs resolve in bg

#KT-33939 Fixed
This commit is contained in:
Vladimir Dolzhenko
2019-12-13 23:41:51 +01:00
parent 9f15c0f4d7
commit 5730a21e7b
20 changed files with 603 additions and 149 deletions
@@ -0,0 +1,3 @@
package foo
class Bar(val v: Int){}
+20
View File
@@ -0,0 +1,20 @@
package to
import d.A
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package d
/*
* Some comment in front of imports
*/
import foo.Bar
/**
* Some kdoc for class Foo
*/
class Foo(val a: A) {
}
@@ -0,0 +1 @@
d.A
+19
View File
@@ -0,0 +1,19 @@
// WITH_LIBRARY: copyPaste/imports/KotlinLibrary
<selection>
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package d
/*
* Some comment in front of imports
*/
import foo.Bar
/**
* Some kdoc for class Foo
*/
class Foo(val a: A) {
}
</selection>
+2
View File
@@ -0,0 +1,2 @@
package to
<caret>
@@ -0,0 +1,3 @@
package foo
class Bar(val v: Int){}
@@ -0,0 +1,15 @@
package to
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import d.A
import foo.Bar
/**
* Some kdoc for class Foo
*/
class Foo(val a: A) {
}
@@ -0,0 +1 @@
d.A
@@ -0,0 +1,16 @@
// WITH_LIBRARY: copyPaste/imports/KotlinLibrary
package d
<selection>
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import foo.Bar
/**
* Some kdoc for class Foo
*/
class Foo(val a: A) {
}
</selection>
@@ -0,0 +1,2 @@
package to
<caret>