mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PHP avoid dumb SOE in deeeeeeeeep trees.
This commit is contained in:
@@ -53,8 +53,12 @@ public abstract class ASTDelegatePsiElement extends PsiElementBase {
|
||||
|
||||
@Override
|
||||
public PsiManagerEx getManager() {
|
||||
final PsiElement parent = getParent();
|
||||
if (parent == null) throw new PsiInvalidElementAccessException(this);
|
||||
PsiElement parent;
|
||||
for (parent = this; parent.getParent() instanceof ASTDelegatePsiElement; parent = parent.getParent()) {
|
||||
}
|
||||
parent = parent.getParent();
|
||||
if (parent == null)
|
||||
throw new PsiInvalidElementAccessException(this);
|
||||
return (PsiManagerEx)parent.getManager();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user