Пример #1
0
 @Override
 @NotNull
 public List<Library> chooseElements() {
   final Predicate<Library> condition =
       LibraryEditingUtil.getNotAddedLibrariesCondition(myClasspathPanel.getRootModel());
   ProjectStructureChooseLibrariesDialog dialog =
       new ProjectStructureChooseLibrariesDialog(myClasspathPanel, myContext, condition);
   dialog.show();
   return dialog.getSelectedLibraries();
 }
Пример #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;
 }