Move: Check for conflicts using entire collections of elements to move

This commit is contained in:
Alexey Sedunov
2017-04-07 19:49:14 +03:00
parent 358b5fe548
commit 87a12ee1c7
19 changed files with 194 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,6 @@
package test;
public class J {
Foo foo = new Foo();
Bar bar = new Bar();
}
@@ -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,6 @@
package test2
class Bar {
internal val foo = Foo()
val j = J()
}
@@ -0,0 +1,5 @@
package test2
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,6 @@
package test
class Bar {
internal val foo = Foo()
val j = J()
}
@@ -0,0 +1,5 @@
package test
internal class Foo {
val j = J()
}
@@ -0,0 +1,6 @@
package test;
public class J {
Foo foo = new Foo();
Bar bar = new Bar();
}
@@ -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,6 @@
Class test.Bar, referenced in field J.bar, will not be accessible from module A
Class test.Bar, referenced in field J.bar, will not be accessible from module A
Class test.Foo, referenced in field J.foo, will not be accessible from module A
Class test.Foo, referenced in field J.foo, will not be accessible from module A
Class test.J, referenced in property test.Bar.j, will not be accessible in module B
Class test.J, referenced in property test.Foo.j, will not be accessible in module B
@@ -0,0 +1,5 @@
{
"filesToMove": ["A/src/test/Foo.kt", "A/src/test/Bar.kt"],
"type": "MOVE_FILES_WITH_DECLARATIONS",
"targetDirectory": "B/src/test2"
}