if (entry != null) {
entry.setImageLeftID("image.sidebar.library");
}
if (entry instanceof SideBarEntrySWT) {
final SideBarEntrySWT entrySWT = (SideBarEntrySWT) entry;
entrySWT.addListener(new MdiSWTMenuHackListener() {
public void menuWillBeShown(MdiEntry entry, Menu menuTree) {
CategoryUIUtils.createMenuItems(menuTree, category);
}
});
}