use CharSequence methods where available (KOTLIN-CR-2456)
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ class KotlinPackageContentModificationListener(private val project: Project) {
|
|||||||
.filter(::isRelevant)
|
.filter(::isRelevant)
|
||||||
.filter {
|
.filter {
|
||||||
val vFile = it.file!!
|
val vFile = it.file!!
|
||||||
vFile.isDirectory || FileTypeRegistry.getInstance().getFileTypeByFileName(vFile.name) == KotlinFileType.INSTANCE
|
vFile.isDirectory || FileTypeRegistry.getInstance().getFileTypeByFileName(vFile.nameSequence) == KotlinFileType.INSTANCE
|
||||||
}
|
}
|
||||||
.forEach { event -> service.notifyPackageChange(event) }
|
.forEach { event -> service.notifyPackageChange(event) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ object ProjectRootsUtil {
|
|||||||
if (!includeLibraryClasses && !includeLibrarySource) return false
|
if (!includeLibraryClasses && !includeLibrarySource) return false
|
||||||
|
|
||||||
// NOTE: the following is a workaround for cases when class files are under library source roots and source files are under class roots
|
// NOTE: the following is a workaround for cases when class files are under library source roots and source files are under class roots
|
||||||
val fileType = FileTypeManager.getInstance().getFileTypeByFileName(file.name)
|
val fileType = FileTypeManager.getInstance().getFileTypeByFileName(file.nameSequence)
|
||||||
val canContainClassFiles = fileType == ArchiveFileType.INSTANCE || file.isDirectory
|
val canContainClassFiles = fileType == ArchiveFileType.INSTANCE || file.isDirectory
|
||||||
val isBinary = fileType.isKotlinBinary()
|
val isBinary = fileType.isKotlinBinary()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user