Minor: reformat DebuggerUtils.kt
This commit is contained in:
@@ -55,7 +55,8 @@ object DebuggerUtils {
|
|||||||
listOf(scope, KotlinSourceFilterScope.librarySources(GlobalSearchScope.allScope(project), project)),
|
listOf(scope, KotlinSourceFilterScope.librarySources(GlobalSearchScope.allScope(project), project)),
|
||||||
className,
|
className,
|
||||||
fileName,
|
fileName,
|
||||||
location)
|
location
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +91,9 @@ object DebuggerUtils {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
location?.let { return FileRankingCalculatorForIde.findMostAppropriateSource(filesWithExactName, it) }
|
if (location != null) {
|
||||||
|
return FileRankingCalculatorForIde.findMostAppropriateSource(filesWithExactName, location)
|
||||||
|
}
|
||||||
|
|
||||||
return filesWithExactName.first()
|
return filesWithExactName.first()
|
||||||
}
|
}
|
||||||
@@ -104,7 +107,12 @@ object DebuggerUtils {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun findFilesByNameInPackage(className: JvmClassName, fileName: String, project: Project, searchScope: GlobalSearchScope): List<KtFile> {
|
private fun findFilesByNameInPackage(
|
||||||
|
className: JvmClassName,
|
||||||
|
fileName: String,
|
||||||
|
project: Project,
|
||||||
|
searchScope: GlobalSearchScope
|
||||||
|
): List<KtFile> {
|
||||||
val files = findFilesWithExactPackage(className.packageFqName, searchScope, project).filter { it.name == fileName }
|
val files = findFilesWithExactPackage(className.packageFqName, searchScope, project).filter { it.name == fileName }
|
||||||
return files.sortedWith(JavaElementFinder.byClasspathComparator(searchScope))
|
return files.sortedWith(JavaElementFinder.byClasspathComparator(searchScope))
|
||||||
}
|
}
|
||||||
@@ -219,7 +227,15 @@ object DebuggerUtils {
|
|||||||
for (inlineFunction in inlineFunctions) {
|
for (inlineFunction in inlineFunctions) {
|
||||||
val body = inlineFunction.bodyExpression
|
val body = inlineFunction.bodyExpression
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
innerContexts.add(analyzeElementWithInline(resolutionFacade, inlineFunction, deep + 1, analyzedElements, analyzeInlineFunctions))
|
innerContexts.add(
|
||||||
|
analyzeElementWithInline(
|
||||||
|
resolutionFacade,
|
||||||
|
inlineFunction,
|
||||||
|
deep + 1,
|
||||||
|
analyzedElements,
|
||||||
|
analyzeInlineFunctions
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,6 +246,6 @@ object DebuggerUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun hasReifiedTypeParameters(descriptor: CallableDescriptor): Boolean {
|
private fun hasReifiedTypeParameters(descriptor: CallableDescriptor): Boolean {
|
||||||
return descriptor.typeParameters.any() { it.isReified }
|
return descriptor.typeParameters.any { it.isReified }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user