From d2037344a0e5779466181995aa4e31388b1a4868 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Mon, 18 Dec 2023 19:12:35 +0800 Subject: [PATCH] fix: is some super class no in project will be crash --- .../main/kotlin/cc/unitmesh/idea/service/JavaRelatedContext.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/java/src/main/kotlin/cc/unitmesh/idea/service/JavaRelatedContext.kt b/java/src/main/kotlin/cc/unitmesh/idea/service/JavaRelatedContext.kt index f8c64e1481..51b8abf559 100644 --- a/java/src/main/kotlin/cc/unitmesh/idea/service/JavaRelatedContext.kt +++ b/java/src/main/kotlin/cc/unitmesh/idea/service/JavaRelatedContext.kt @@ -63,6 +63,7 @@ object JavaRelatedContext { } private fun findSuperClasses(psiClass: PsiClass): List { + if (!isProjectContent(psiClass)) return emptyList() return generateSequence(psiClass) { it.superClass }.toList() }