public static boolean isSupportedFile(@Nullable PsiFile file) {
    if (file == null || file instanceof PsiDirectory || file instanceof PsiCodeFragment) {
      return false;
    }
    final VirtualFile virtualFile = file.getVirtualFile();
    if (virtualFile == null) return false;
    if (ProjectUtil.isProjectOrWorkspaceFile(virtualFile)) return false;
    return isSupportedType(virtualFile.getFileType());
  }
public static boolean isSupportedFile(@Nullable PsiFile file)