Copy: Disable when selection doesn't contain Kotlin source files

#KT-18390 Fixed
This commit is contained in:
Alexey Sedunov
2017-06-09 17:16:36 +03:00
parent 423fb9dfb3
commit 31d21a14f2
@@ -83,6 +83,7 @@ class CopyKotlinDeclarationsHandler : CopyHandlerDelegateBase() {
private fun canCopyFiles(elements: Array<out PsiElement>, fromUpdate: Boolean): Boolean {
val sourceFiles = getSourceFiles(elements) ?: return false
if (!sourceFiles.any { it is KtFile }) return false
return copyFilesHandler.canCopy(sourceFiles, fromUpdate)
}