From 522e58cbb10cbb006c6c1583d1c96cf68eb07c6c Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 18 May 2012 20:35:35 +0200 Subject: [PATCH] IDEA-86302 (sorry about that) --- .../classpath/CreateModuleLibraryChooser.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java index 50e207e796fb..40fc91d6802c 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/CreateModuleLibraryChooser.java @@ -23,10 +23,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.OrderRootType; import com.intellij.openapi.roots.impl.libraries.LibraryEx; import com.intellij.openapi.roots.impl.libraries.LibraryTableBase; -import com.intellij.openapi.roots.libraries.Library; -import com.intellij.openapi.roots.libraries.LibraryProperties; -import com.intellij.openapi.roots.libraries.LibraryTable; -import com.intellij.openapi.roots.libraries.LibraryType; +import com.intellij.openapi.roots.libraries.*; import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; import com.intellij.openapi.roots.libraries.ui.OrderRoot; import com.intellij.openapi.roots.libraries.ui.impl.RootDetectionUtil; @@ -82,8 +79,9 @@ public class CreateModuleLibraryChooser implements ClasspathElementChooser roots, final LibraryType libraryType) { - final Library library = ((LibraryTableBase.ModifiableModelEx)myModuleLibrariesModel).createLibrary(null, libraryType.getKind()); + private Library createLibraryFromRoots(List roots, @Nullable final LibraryType libraryType) { + final PersistentLibraryKind kind = libraryType == null ? null : libraryType.getKind(); + final Library library = ((LibraryTableBase.ModifiableModelEx)myModuleLibrariesModel).createLibrary(null, kind); final LibraryEx.ModifiableModelEx libModel = (LibraryEx.ModifiableModelEx)library.getModifiableModel(); if (myDefaultPropertiesFactory != null) { libModel.setProperties(myDefaultPropertiesFactory.fun(libraryType));