mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
break SOE in getContainingFile (EA-73885 - SOE: ASTDelegatePsiElement.getContainingFile)
This commit is contained in:
@@ -66,10 +66,10 @@ public class SharedImplUtil {
|
||||
}
|
||||
|
||||
public static PsiFile getContainingFile(ASTNode thisElement) {
|
||||
FileASTNode element = findFileElement(thisElement);
|
||||
PsiElement psiElement = element == null ? null : element.getPsi();
|
||||
if (psiElement == null) return null;
|
||||
return psiElement.getContainingFile();
|
||||
FileASTNode node = findFileElement(thisElement);
|
||||
PsiElement psi = node == null ? null : node.getPsi();
|
||||
if (psi == null || psi instanceof PsiFile) return (PsiFile)psi;
|
||||
throw new AssertionError("Invalid PSI " + psi + " of " + psi.getClass() + " for AST " + node + " of " + node.getClass());
|
||||
}
|
||||
|
||||
public static boolean isValid(ASTNode thisElement) {
|
||||
|
||||
Reference in New Issue
Block a user