AA/LC: introduce an API to find script files
This commit is contained in:
committed by
Dmitrii Gridin
parent
f9086daf4d
commit
5298abf2d6
@@ -45,6 +45,8 @@ abstract class KotlinAsJavaSupport {
|
||||
|
||||
abstract fun findFilesForFacadeByPackage(packageFqName: FqName, searchScope: GlobalSearchScope): Collection<KtFile>
|
||||
|
||||
abstract fun findFilesForScript(scriptFqName: FqName, searchScope: GlobalSearchScope): Collection<KtScript>
|
||||
|
||||
abstract fun findClassOrObjectDeclarations(fqName: FqName, searchScope: GlobalSearchScope): Collection<KtClassOrObject>
|
||||
|
||||
abstract fun packageExists(fqName: FqName, scope: GlobalSearchScope): Boolean
|
||||
|
||||
+1
-3
@@ -207,9 +207,7 @@ abstract class KotlinAsJavaSupportBase<TModule>(protected val project: Project)
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
return findFilesForPackage(scriptFqName.parent(), scope).mapNotNull { file ->
|
||||
file.script?.takeIf { it.fqName == scriptFqName }?.let { getLightClassForScript(it) }
|
||||
}
|
||||
return findFilesForScript(scriptFqName, scope).mapNotNull { getLightClassForScript(it) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user