public static PsiManager getManagerByTree(ASTNode node) {
    if(node instanceof FileElement) return node.getPsi().getManager();
    return node.getTreeParent().getPsi().getManager();
  }
public static PsiManager getManagerByTree(ASTNode node)