public @Nullable NewLibraryConfiguration createLibraryConfiguration(@Nullable Component parentComponent, @NotNull VirtualFile pathToLibrary) {
    final GroovyLibraryPresentationProviderBase provider = findManager(pathToLibrary);
    if (provider == null) {
      return null;
    }

    final String path = pathToLibrary.getPath();
    final String sdkVersion = provider.getSDKVersion(path);
    if (sdkVersion == null) {
      Messages.showErrorDialog(
        parentComponent,
        GroovyBundle.message("framework.0.sdk.chooser.error.message", myFrameworkName),
        GroovyBundle.message("framework.0.sdk.chooser.error.title")
      );
      return null;
    }

    return new NewLibraryConfiguration(provider.getLibraryPrefix() + "-" + sdkVersion) {
      @Override
      public void addRoots(@NotNull LibraryEditor editor) {
        provider.fillLibrary(path, editor);
      }
    };
  }
public @Nullable NewLibraryConfiguration createLibraryConfiguration(@Nullable Component parentComponent, @NotNull VirtualFile pathToLibrary)