package net.sf.jabref.gui.importer;

import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javafx.stage.FileChooser;

import net.sf.jabref.logic.importer.Importer;
import net.sf.jabref.logic.util.FileExtensions;

class ImportFileFilter {

    public static FileChooser.ExtensionFilter convert(Importer format) {
        return new FileChooser.ExtensionFilter(format.getExtensions().getDescription(), format.getExtensions().getExtensions());
    }

    public static FileChooser.ExtensionFilter convert(String description, Collection<Importer> formats) {
        List<FileExtensions> extensions = formats.stream().map(Importer::getExtensions).collect(Collectors.toList());
        List<String> flatExtensions = extensions.stream().flatMap(extList -> Stream.of(extList.getExtensions())).collect(Collectors.toList());
        return new FileChooser.ExtensionFilter(description, flatExtensions.toArray(new String[flatExtensions.size()]));
    }

}

@@ -26,24 +26,49 @@
 .importer;%0A%0A
+import java.util.Arrays;%0A
 import java.
@@ -84,16 +84,16 @@
 ection;%0A
-
 import j
@@ -146,40 +146,8 @@
 ors;
-%0Aimport java.util.stream.Stream;
 %0A%0Aim
@@ -459,16 +459,32 @@
 ption(),
+%0A               
  format.
@@ -829,17 +829,21 @@
  -%3E 
-S
+Arrays.s
 tream
-.of
 (ext
@@ -864,16 +864,33 @@
 ions()))
+%0A                
 .collect

Fix eclipse bug again