@NotNull
 @Override
 protected Library[] getLibraries(@NotNull LibraryTable table) {
   if (table.getTableLevel().equals(LibraryTableImplUtil.MODULE_LEVEL)) {
     return myCreatedModuleLibraries.toArray(new Library[myCreatedModuleLibraries.size()]);
   }
   final LibrariesModifiableModel model = getLibrariesModifiableModel(table);
   if (model == null) return Library.EMPTY_ARRAY;
   return model.getLibraries();
 }
Beispiel #2
0
 private boolean hasLibraries() {
   final Predicate<Library> condition =
       LibraryEditingUtil.getNotAddedLibrariesCondition(myClasspathPanel.getRootModel());
   for (LibraryTable table :
       ChooseLibrariesFromTablesDialog.getLibraryTables(myClasspathPanel.getProject(), true)) {
     final LibrariesModifiableModel model = myContext.myLevel2Providers.get(table.getTableLevel());
     if (model != null) {
       for (Library library : model.getLibraries()) {
         if (condition.apply(library)) {
           return true;
         }
       }
     }
   }
   return false;
 }