Java 类com.intellij.util.ui.classpath.ChooseLibrariesFromTablesDialog 实例源码

项目:intellij-ce-playground    文件:AddLibraryDependencyAction.java   
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;
}
项目:tools-idea    文件:AddLibraryDependencyAction.java   
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;
}
项目:intellij-ce-playground    文件:ArtifactEditorContextImpl.java   
@Override
public List<Library> chooseLibraries(final String title) {
  final ChooseLibrariesFromTablesDialog dialog = ChooseLibrariesFromTablesDialog.createDialog(title, getProject(), false);
  return dialog.showAndGet() ? dialog.getSelectedLibraries() : Collections.<Library>emptyList();
}
项目:tools-idea    文件:ArtifactEditorContextImpl.java   
@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();
}
项目:consulo    文件:ArtifactEditorContextImpl.java   
@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();
}