Do not log full file text when code fragment was created with error context of PsiFile
This commit is contained in:
@@ -87,7 +87,8 @@ abstract class KtCodeFragment(
|
||||
override fun getContext(): PsiElement? {
|
||||
if (fakeContextForJavaFile != null) return fakeContextForJavaFile
|
||||
if (context !is KtElement) {
|
||||
LOG.warn("CodeFragment with non-kotlin context should have fakeContextForJavaFile set: \noriginalContext = ${context?.getElementTextWithContext()}")
|
||||
val logInfoForContextElement = (context as? PsiFile)?.virtualFile?.path ?: context?.getElementTextWithContext()
|
||||
LOG.warn("CodeFragment with non-kotlin context should have fakeContextForJavaFile set: \noriginalContext = $logInfoForContextElement")
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,8 @@ abstract class KtCodeFragment(
|
||||
override fun getContext(): PsiElement? {
|
||||
if (fakeContextForJavaFile != null) return fakeContextForJavaFile
|
||||
if (context !is KtElement) {
|
||||
LOG.warn("CodeFragment with non-kotlin context should have fakeContextForJavaFile set: \noriginalContext = ${context?.getElementTextWithContext()}")
|
||||
val logInfoForContextElement = (context as? PsiFile)?.virtualFile?.path ?: context?.getElementTextWithContext()
|
||||
LOG.warn("CodeFragment with non-kotlin context should have fakeContextForJavaFile set: \noriginalContext = $logInfoForContextElement")
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user