Move: Add conflict checking for "Move packages" case

This commit is contained in:
Alexey Sedunov
2017-04-10 14:30:13 +03:00
parent e21ff23e26
commit cd6177534a
22 changed files with 328 additions and 23 deletions
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,8 @@
package test.pack
import test2.J
class Bar {
internal val foo = Foo()
val j = J()
}
@@ -0,0 +1,7 @@
package test.pack
import test2.J
internal class Foo {
val j = J()
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,7 @@
package test2;
import test.pack.Foo;
public class J {
Foo foo = new Foo();
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,7 @@
package test2;
import test2.pack.Foo;
public class J {
Foo foo = new Foo();
}
@@ -0,0 +1,8 @@
package test2.pack
import test2.J
class Bar {
internal val foo = Foo()
val j = J()
}
@@ -0,0 +1,7 @@
package test2.pack
import test2.J
internal class Foo {
val j = J()
}
@@ -0,0 +1,6 @@
Class test2.J, referenced in property test2.pack.Bar.j, will not be accessible in module A
Class test2.J, referenced in property test2.pack.Foo.j, will not be accessible in module A
Class test2.pack.Foo, referenced in field J.foo, will not be accessible from module B
Class test2.pack.Foo, referenced in field J.foo, will not be accessible from module B
Class test2.pack.Foo, referenced in field J.foo, will not be accessible from module B
Class test2.pack.Foo, referenced in field J.foo, will not be accessible from module B
@@ -0,0 +1,6 @@
{
"mainFile": "B/src/test2/pack/Bar.kt",
"type": "MOVE_PACKAGES",
"sourcePackage": "test2.pack",
"targetPackage": "test"
}