Move: Implement inspection which reports mismatch between package directive and containing directory

This commit is contained in:
Alexey Sedunov
2015-04-29 11:49:18 +03:00
parent fe96a8563a
commit d096e74c10
66 changed files with 612 additions and 20 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,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 @@
<caret>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": "test.kt",
"intentionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.ChangePackageToMatchDirectoryIntention",
"intentionText": "Change file's package to ''"
}