Set<Entry<IBookMark, IFolder>> entries = reparentedBookMarks.entrySet();
Set<IFolder> parentsToUpdate = new HashSet<IFolder>();
try {
fViewer.getControl().getParent().setRedraw(false);
for (Entry<IBookMark, IFolder> entry : entries) {
IBookMark reparentedBookMark = entry.getKey();
IFolder oldParent = entry.getValue();
/* Reparent while keeping the Selection */
ISelection selection = fViewer.getSelection();
fViewer.remove(oldParent, new Object[] { reparentedBookMark });
fViewer.refresh(reparentedBookMark.getParent(), false);
fViewer.setSelection(selection);
/* Remember to update parents */
parentsToUpdate.add(oldParent);
parentsToUpdate.add(reparentedBookMark.getParent());
}
} finally {
fViewer.getControl().getParent().setRedraw(true);
}