}
}
}
private static void doDirectImport(List<IFolderChild> elements, Map<Long, IFolderChild> mapOldIdToFolderChild) {
IPreferenceDAO prefsDAO = Owl.getPersistenceService().getDAOService().getPreferencesDAO();
IFolderDAO folderDAO = DynamicDAO.getDAO(IFolderDAO.class);
List<IFolder> foldersToSave = new ArrayList<IFolder>();
Set<IFolder> rootFolders = CoreUtils.loadRootFolders();
/* Load the current selected Set as Location if necessary */
IFolder selectedSet = null;
if (!rootFolders.isEmpty()) {
if (!InternalOwl.TESTING && PlatformUI.isWorkbenchRunning() && Controller.getDefault().isStarted()) {
String selectedBookMarkSetPref = BookMarkExplorer.getSelectedBookMarkSetPref(OwlUI.getWindow());
Long selectedFolderID = prefsDAO.load(selectedBookMarkSetPref).getLong();
selectedSet = folderDAO.load(selectedFolderID);
} else
selectedSet = rootFolders.iterator().next();
}