Move: Add conflict checking for "Move directory with classes" case

This commit is contained in:
Alexey Sedunov
2017-04-07 21:14:39 +03:00
parent 87a12ee1c7
commit e21ff23e26
18 changed files with 161 additions and 20 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 test2.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,4 @@
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
@@ -0,0 +1,6 @@
{
"mainFile": "B/src/test2/pack/Bar.kt",
"type": "MOVE_DIRECTORY_WITH_CLASSES",
"sourceDir": "B/src/test2/pack",
"targetDir": "A/src/test"
}