private static boolean isApplicableTo(PsiFile file) {
    if (file == null) {
      return false;
    }
    return (!file.getViewProvider().isPhysical() && !(file instanceof PsiCodeFragment)) ||
           ScratchUtil.isScratch(file.getVirtualFile());
  }
private static boolean isApplicableTo(PsiFile file)