private boolean isToBeDeletedOnClose(@NotNull VirtualFile file) {
    RootType rootType = getRootType(file);
    if (rootType == null || rootType.isHidden()) return false;
    Document document = FileDocumentManager.getInstance().getDocument(file);
    return document != null && document.getTextLength() < 10240 && StringUtil.isEmptyOrSpaces(document.getText());
  }
private boolean isToBeDeletedOnClose(@NotNull VirtualFile file)