Refactoring: "package matching directory" is now an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-21 14:12:54 +03:00
parent 3f1a3dfeb2
commit 5affb9a25c
93 changed files with 343 additions and 294 deletions
@@ -0,0 +1,7 @@
package target
class Foo
fun foo() {
}
@@ -0,0 +1,8 @@
package target;
class Test {
static void test() {
new Foo();
TestKt.foo();
}
}
@@ -0,0 +1,6 @@
package target
fun test() {
Foo()
foo()
}
@@ -0,0 +1,10 @@
package target;
import static target.TestKt.foo;
class Test {
static void test() {
new Foo();
foo();
}
}
@@ -0,0 +1,6 @@
package target
fun test() {
Foo()
foo()
}
@@ -0,0 +1,11 @@
package usages;
import target.Foo;
import target.TestKt;
class Test {
static void test() {
new Foo();
TestKt.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.TestKt.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 @@
<caret>package source
class Foo
fun foo() {
}
@@ -0,0 +1,8 @@
package target;
class Test {
static void test() {
new source.Foo();
source.TestKt.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.TestKt.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.TestKt.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.TestKt.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": "target/test.kt",
"inspectionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection",
"fix": "Change file's package to 'target'"
}