use of com.intellij.psi.impl.ElementBase in project intellij-community by JetBrains.
the class SharedImplUtil method findFileElement.
public static FileASTNode findFileElement(@NotNull ASTNode element) {
if (CHECK_FOR_READ_ACTION && element instanceof ElementBase) {
ApplicationManager.getApplication().assertReadAccessAllowed();
}
ASTNode parent = element.getTreeParent();
while (parent != null) {
element = parent;
parent = parent.getTreeParent();
}
if (element instanceof FileASTNode) {
return (FileASTNode) element;
}
return null;
}
Aggregations