Copy: Improve file copying

- Do not copy individual declarations if entire file is selected
  (keeping original content with comments, formatting, etc.)
- Update package directive when original file packages matches
  its directory

 #KT-20092 Fixed
 #KT-18196 Fixed
This commit is contained in:
Alexey Sedunov
2017-09-19 15:21:31 +03:00
parent fbf6bd534c
commit 0beadddb7f
22 changed files with 159 additions and 13 deletions
@@ -0,0 +1,8 @@
package foo
val a = 42
// comment
// some other comment
val s = ""
@@ -0,0 +1,6 @@
val a = 42
// comment
// some other comment
val s = ""
@@ -0,0 +1,8 @@
package foo
val a = 42
// comment
// some other comment
val s = ""
@@ -0,0 +1,4 @@
{
"mainFile": "foo/test.kt",
"targetPackage": ""
}