@Nullable
    @Override
    public JpsJavaDependenciesEnumerationHandler createHandler(@NotNull Collection<JpsModule> modules) {
      JpsMavenExtensionService service = JpsMavenExtensionService.getInstance();
      for (JpsModule module : modules) {
        if (service.getExtension(module) != null) {
          return INSTANCE;
        }
      }
      return null;
    }
@Nullable
    @Override
    public JpsJavaDependenciesEnumerationHandler createHandler(@NotNull Collection<JpsModule> modules)