Artifact[] (final List<ArtifactPopupItem> items, final Project project) { Set<Artifact> artifacts = new LinkedHashSet<>(); for (ArtifactPopupItem item : items) { artifacts.addAll(item.getArtifacts(project)); } return artifacts.toArray(new Artifact[0]); }