Move: Add intention to change file package without moving it physically

This commit is contained in:
Alexey Sedunov
2015-04-28 12:34:58 +03:00
parent 6ee59a06dd
commit 8879166f53
43 changed files with 498 additions and 42 deletions
@@ -0,0 +1,5 @@
class Foo
fun foo() {
}
@@ -0,0 +1,6 @@
class Test {
static void test() {
new Foo();
_DefaultPackage.foo();
}
}
@@ -0,0 +1,4 @@
fun test() {
Foo()
foo()
}
@@ -0,0 +1,8 @@
import static _DefaultPackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,7 @@
import Foo
import foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,7 @@
package source
class Foo
fun foo() {
}
@@ -0,0 +1,6 @@
class Test {
static void test() {
new source.Foo();
source.SourcePackage.foo();
}
}
@@ -0,0 +1,4 @@
fun test() {
source.Foo()
source.foo()
}
@@ -0,0 +1,9 @@
import source.Foo;
import static source.SourcePackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,7 @@
import source.Foo
import source.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,5 @@
{
"mainFile": "source/test.kt",
"type": "CHANGE_PACKAGE_DIRECTIVE",
"newPackageName": ""
}
@@ -0,0 +1,7 @@
package target
class Foo
fun foo() {
}
@@ -0,0 +1,8 @@
package target;
class Test {
static void test() {
new Foo();
TargetPackage.foo();
}
}
@@ -0,0 +1,6 @@
package target
fun test() {
Foo()
foo()
}
@@ -0,0 +1,10 @@
package target;
import static target.TargetPackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,9 @@
package target
import target.Foo
import target.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,11 @@
package usages;
import target.Foo;
import target.TargetPackage;
class Test {
static void test() {
new Foo();
TargetPackage.foo();
}
}
@@ -0,0 +1,9 @@
package usages
import target.Foo
import target.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,11 @@
package usages;
import target.Foo;
import static target.TargetPackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,9 @@
package usages
import target.Foo
import target.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,7 @@
package source
class Foo
fun foo() {
}
@@ -0,0 +1,8 @@
package target;
class Test {
static void test() {
new source.Foo();
source.SourcePackage.foo();
}
}
@@ -0,0 +1,6 @@
package target
fun test() {
source.Foo()
source.foo()
}
@@ -0,0 +1,11 @@
package target;
import source.Foo;
import static source.SourcePackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,9 @@
package target
import source.Foo
import source.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,8 @@
package usages;
class Test {
static void test() {
new source.Foo();
source.SourcePackage.foo();
}
}
@@ -0,0 +1,6 @@
package usages
fun test() {
source.Foo()
source.foo()
}
@@ -0,0 +1,11 @@
package usages;
import source.Foo;
import static source.SourcePackage.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,9 @@
package usages
import source.Foo
import source.foo
fun test() {
Foo()
foo()
}
@@ -0,0 +1,5 @@
{
"mainFile": "source/test.kt",
"type": "CHANGE_PACKAGE_DIRECTIVE",
"newPackageName": "target"
}