private static boolean isAvailableFor(PsiDirectory @NotNull [] dirs) {
    for (PsiDirectory dir : dirs) {
      if (dir.getVirtualFile().getFileSystem().isReadOnly()) {
        return false;
      }
    }
    return dirs.length > 0;
  }
private static boolean isAvailableFor(PsiDirectory @NotNull [] dirs)