[Analysis API] Simplify 'getNotUnderContentRootModule()'

In the resulting implementation of dangling file modules,
'getNotUnderContentRootModule()' is never called with a not-null file.
This commit is contained in:
Yan Zhulanow
2023-12-29 02:31:45 +09:00
committed by Space Team
parent bed73fd650
commit 1b7d1dd08a
3 changed files with 5 additions and 22 deletions
@@ -42,7 +42,7 @@ public abstract class ProjectStructureProvider {
*/
public abstract fun getModule(element: PsiElement, contextualModule: KtModule?): KtModule
protected abstract fun getNotUnderContentRootModule(project: Project, file: PsiFile?): KtNotUnderContentRootModule
protected abstract fun getNotUnderContentRootModule(project: Project): KtNotUnderContentRootModule
@OptIn(KtModuleStructureInternals::class)
protected fun computeSpecialModule(file: PsiFile): KtModule? {
@@ -81,7 +81,7 @@ public abstract class ProjectStructureProvider {
return getModule(contextElement, contextualModule = null)
}
return getNotUnderContentRootModule(file.project, file = null)
return getNotUnderContentRootModule(file.project)
}
/**