Move: Add intention to change file package without moving it physically

This commit is contained in:
Alexey Sedunov
2015-04-28 12:34:58 +03:00
parent 6ee59a06dd
commit 8879166f53
43 changed files with 498 additions and 42 deletions
@@ -41,6 +41,17 @@ private var Project.elementsToShorten: MutableSet<ShorteningRequest>?
public var Project.ensureElementsToShortenIsEmptyBeforeRefactoring: Boolean
by NotNullableUserDataProperty(Key.create("ENSURE_ELEMENTS_TO_SHORTEN_IS_EMPTY"), true)
public fun Project.runWithElementsToShortenIsEmptyIgnored(action: () -> Unit) {
val ensureElementsToShortenIsEmpty = ensureElementsToShortenIsEmptyBeforeRefactoring
try {
ensureElementsToShortenIsEmptyBeforeRefactoring = false
action()
} finally {
ensureElementsToShortenIsEmptyBeforeRefactoring = ensureElementsToShortenIsEmpty
}
}
private fun Project.getOrCreateElementsToShorten(): MutableSet<ShorteningRequest> {
var elements = elementsToShorten
if (elements == null) {