private static boolean isSeparateStatement(PsiElement e) {
    return
      e instanceof LeafPsiElement ||
      e instanceof GrExpression && PsiUtil.isExpressionStatement(e) ||
      e instanceof GrVariableDeclaration ||
      e instanceof GrStatement && !(e instanceof GrExpression) ||
      e instanceof GrMethod ||
      e instanceof GrClassInitializer ||
      e instanceof GrImportStatement ||
      e instanceof GrPackageDefinition ||
      e instanceof GrOpenBlock ||
      e instanceof GrTypeDefinition && !((GrTypeDefinition)e).isAnonymous()
      ;
  }
private static boolean isSeparateStatement(PsiElement e)