private void setUpImportMenu(JMenu importMenu, boolean intoNew_) {
final boolean intoNew = intoNew_;
importMenu.removeAll();
// Add a menu item for autodetecting import format:
importMenu.add(new ImportMenuItem(JabRefFrame.this, intoNew));
// Add custom importers
importMenu.addSeparator();
SortedSet<ImportFormat> customImporters = Globals.importFormatReader.getCustomImportFormats();
JMenu submenu = new JMenu(Globals.lang("Custom importers"));
submenu.setMnemonic(KeyEvent.VK_S);
// Put in all formatters registered in ImportFormatReader:
for (ImportFormat imFo : customImporters){
submenu.add(new ImportMenuItem(JabRefFrame.this, intoNew, imFo));
}
if (customImporters.size() > 0)
submenu.addSeparator();
submenu.add(customImpAction);
importMenu.add(submenu);
importMenu.addSeparator();
// Put in all formatters registered in ImportFormatReader:
for (ImportFormat imFo : Globals.importFormatReader.getBuiltInInputFormats()){
importMenu.add(new ImportMenuItem(JabRefFrame.this, intoNew, imFo));
}
}