Added diagnostic for EA-70090 - assert: PsiUtilPackage$psiUtils$bbf.getElementTextWithContext
This commit is contained in:
@@ -263,6 +263,8 @@ private fun findFirstLeafWhollyInRange(file: PsiFile, range: TextRange): PsiElem
|
|||||||
// ---------------------------------- Debug/logging ----------------------------------------------------------------------------------------
|
// ---------------------------------- Debug/logging ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
public fun PsiElement.getElementTextWithContext(): String {
|
public fun PsiElement.getElementTextWithContext(): String {
|
||||||
|
assert(isValid) { "Invalid element $this" }
|
||||||
|
|
||||||
if (this is PsiFile) {
|
if (this is PsiFile) {
|
||||||
return getContainingFile().getText()
|
return getContainingFile().getText()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user