private boolean hasLibraries() { final Predicate<Library> condition = getNotAddedSuitableLibrariesCondition(); 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; }
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; }
@Override public List<Library> chooseLibraries(final String title) { final ChooseLibrariesFromTablesDialog dialog = ChooseLibrariesFromTablesDialog.createDialog(title, getProject(), false); return dialog.showAndGet() ? dialog.getSelectedLibraries() : Collections.<Library>emptyList(); }
@Override public List<Library> chooseLibraries(final String title) { final ChooseLibrariesFromTablesDialog dialog = ChooseLibrariesFromTablesDialog.createDialog(title, getProject(), false); dialog.show(); return dialog.isOK() ? dialog.getSelectedLibraries() : Collections.<Library>emptyList(); }