Copy: Disable when selection doesn't contain Kotlin source files
#KT-18390 Fixed
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user