Switch to 183 platform
This commit is contained in:
@@ -6,12 +6,18 @@
|
||||
package org.jetbrains.kotlin.git
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Couple
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vcs.FilePath
|
||||
import git4idea.checkin.GitCheckinExplicitMovementProvider
|
||||
import org.jetbrains.kotlin.idea.actions.pathBeforeJ2K
|
||||
import java.util.*
|
||||
|
||||
class KotlinExplicitMovementProvider : GitCheckinExplicitMovementProvider() {
|
||||
init {
|
||||
Registry.get("git.explicit.commit.renames.prohibit.multiple.calls").setValue(false)
|
||||
}
|
||||
|
||||
override fun isEnabled(project: Project): Boolean {
|
||||
return true
|
||||
}
|
||||
@@ -36,11 +42,14 @@ class KotlinExplicitMovementProvider : GitCheckinExplicitMovementProvider() {
|
||||
val before = beforePaths.firstOrNull { it.path == pathBeforeJ2K }
|
||||
if (before != null) {
|
||||
movedChanges.add(GitCheckinExplicitMovementProvider.Movement(before, after))
|
||||
after.virtualFile?.pathBeforeJ2K = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return movedChanges
|
||||
}
|
||||
|
||||
override fun afterMovementsCommitted(project: Project, movedPaths: MutableList<Couple<FilePath>>) {
|
||||
movedPaths.forEach { it.second.virtualFile?.pathBeforeJ2K = null }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-10
@@ -6,18 +6,12 @@
|
||||
package org.jetbrains.kotlin.git
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Couple
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vcs.FilePath
|
||||
import git4idea.checkin.GitCheckinExplicitMovementProvider
|
||||
import org.jetbrains.kotlin.idea.actions.pathBeforeJ2K
|
||||
import java.util.*
|
||||
|
||||
class KotlinExplicitMovementProvider : GitCheckinExplicitMovementProvider() {
|
||||
init {
|
||||
Registry.get("git.explicit.commit.renames.prohibit.multiple.calls").setValue(false)
|
||||
}
|
||||
|
||||
override fun isEnabled(project: Project): Boolean {
|
||||
return true
|
||||
}
|
||||
@@ -42,14 +36,11 @@ class KotlinExplicitMovementProvider : GitCheckinExplicitMovementProvider() {
|
||||
val before = beforePaths.firstOrNull { it.path == pathBeforeJ2K }
|
||||
if (before != null) {
|
||||
movedChanges.add(GitCheckinExplicitMovementProvider.Movement(before, after))
|
||||
after.virtualFile?.pathBeforeJ2K = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return movedChanges
|
||||
}
|
||||
|
||||
override fun afterMovementsCommitted(project: Project, movedPaths: MutableList<Couple<FilePath>>) {
|
||||
movedPaths.forEach { it.second.virtualFile?.pathBeforeJ2K = null }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user