Search in sources :

Example 11 with NewLibraryEditor

use of com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor in project kotlin by JetBrains.

the class ConfigLibraryUtil method addLibrary.

public static void addLibrary(@NotNull Module module, @NotNull String libraryName, @NotNull String rootPath, @NotNull String[] jarPaths) {
    NewLibraryEditor editor = new NewLibraryEditor();
    editor.setName(libraryName);
    for (String jarPath : jarPaths) {
        editor.addRoot(VfsUtil.getUrlForLibraryRoot(new File(rootPath, jarPath)), OrderRootType.CLASSES);
    }
    addLibrary(editor, module);
}
Also used : NewLibraryEditor(com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor) File(java.io.File)

Aggregations

NewLibraryEditor (com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor)11 NewLibraryConfiguration (com.intellij.openapi.roots.libraries.NewLibraryConfiguration)3 VirtualFile (com.intellij.openapi.vfs.VirtualFile)3 Nullable (org.jetbrains.annotations.Nullable)3 FrameworkLibraryVersion (com.intellij.framework.library.FrameworkLibraryVersion)2 OrderRootType (com.intellij.openapi.roots.OrderRootType)2 DownloadableFileSetVersions (com.intellij.util.download.DownloadableFileSetVersions)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 LibraryDownloadSettings (com.intellij.facet.impl.ui.libraries.LibraryDownloadSettings)1 DownloadableLibraryDescription (com.intellij.framework.library.DownloadableLibraryDescription)1 DownloadableLibraryFileDescription (com.intellij.framework.library.DownloadableLibraryFileDescription)1 DownloadableLibraryType (com.intellij.framework.library.DownloadableLibraryType)1 FrameworkLibraryVersionFilter (com.intellij.framework.library.FrameworkLibraryVersionFilter)1 LibraryVersionProperties (com.intellij.framework.library.LibraryVersionProperties)1 AllIcons (com.intellij.icons.AllIcons)1 IdeBundle (com.intellij.ide.IdeBundle)1 OldCustomLibraryDescription (com.intellij.ide.util.frameworkSupport.OldCustomLibraryDescription)1 Disposable (com.intellij.openapi.Disposable)1 ModalityState (com.intellij.openapi.application.ModalityState)1