@Override
  protected boolean isEnabled(@NotNull RootsSelection selection, @NotNull Module module) {
    if (!isJavaModule(module)) return false;

    if (selection.myHaveSelectedFilesUnderSourceRoots) {
      return false;
    }

    if (!selection.mySelectedDirectories.isEmpty()) {
      return true;
    }

    for (SourceFolder root : selection.mySelectedRoots) {
      JavaSourceRootProperties properties = root.getJpsElement().getProperties(JavaModuleSourceRootTypes.SOURCES);
      if (properties != null && !properties.isForGeneratedSources()) {
        return true;
      }
    }
    return false;
  }
@Override
  protected boolean isEnabled(@NotNull RootsSelection selection, @NotNull Module module)