List<MavenDomDependency> (Collection<? extends MavenDomDependency> candidates, final Project project) { List<MavenDomDependency> dependencies = new ArrayList<>(); MavenDomProjectModelMember[] memberCandidates = ContainerUtil.map2Array(candidates, MavenDomProjectModelMember.class, dependency -> new MavenDomProjectModelMember(dependency)); MemberChooser<MavenDomProjectModelMember> chooser = new MemberChooser<>(memberCandidates, true, true, project) { @Override protected ShowContainersAction getShowContainersAction() { return new ShowContainersAction(MavenDomBundle.messagePointer("chooser.show.project.files"), MavenIcons.MavenProject); } @Override protected String getAllContainersNodeName() { return MavenDomBundle.message("all.dependencies"); } }; chooser.setTitle(MavenDomBundle.message("dependencies.chooser.title")); chooser.setCopyJavadocVisible(false); chooser.show(); if (chooser.getExitCode() == MemberChooser.OK_EXIT_CODE) { final MavenDomProjectModelMember[] members = chooser.getSelectedElements(new MavenDomProjectModelMember[0]); if (members != null) { dependencies.addAll(ContainerUtil.mapNotNull(members, mavenDomProjectModelMember -> mavenDomProjectModelMember.getDependency())); } } return dependencies; }