Implement "Safe Delete" refactoring for classes and objects

This commit is contained in:
Alexey Sedunov
2013-06-27 16:39:34 +04:00
parent bcad49246b
commit f2dd8a6b60
35 changed files with 619 additions and 2 deletions
@@ -0,0 +1,11 @@
package test
object A {
object <caret>O {
}
}
class B {
}
@@ -0,0 +1,8 @@
package test
object A {
}
class B {
}
@@ -0,0 +1,13 @@
package test
import test.A.O
object A {
object <caret>O {
}
}
class B {
val x = A.O
}
@@ -0,0 +1,2 @@
Object O has 1 usage that is not safe to delete.
Of those 0 usages are in strings, comments, or non-code files.
@@ -0,0 +1,11 @@
class C {
}
object <caret>A {
}
class B {
}
@@ -0,0 +1,7 @@
class C {
}
class B {
}
@@ -0,0 +1,11 @@
package test
import test.A
object <caret>A {
}
class B {
}
@@ -0,0 +1,5 @@
package test
class B {
}
@@ -0,0 +1,11 @@
package test
import test.A
object <caret>A {
}
class B {
val x = A
}
@@ -0,0 +1,2 @@
Object A has 1 usage that is not safe to delete.
Of those 0 usages are in strings, comments, or non-code files.
@@ -0,0 +1,11 @@
package test
import test.A.x
object <caret>A {
val x = ""
}
class B {
}
@@ -0,0 +1,2 @@
Object A has 1 usage that is not safe to delete.
Of those 0 usages are in strings, comments, or non-code files.