try {
MPSFavoritesManager favoritesManager = AddToFavorites_Action.this.project.getComponent(MPSFavoritesManager.class);
if (favoritesManager == null) {
return;
}
<BUG>List<Object> toMove = FavoritesUtil.getObjects(AddToFavorites_Action.this.treeNodes);
ProjectView projectView = ProjectView.getInstance(AddToFavorites_Action.this.project);
AbstractProjectViewPane pane = projectView.getCurrentProjectViewPane();
if (pane instanceof FavoritesProjectPane) {</BUG>
favoritesManager.removeRoots(pane.getSubId(), toMove);

try {
event.getPresentation().setText(AddToFavorites_Action.this.name);
} catch (Throwable t) {
if (log.isErrorEnabled()) {
log.error("User's action doUpdate method failed. Action:" + "AddToFavorites", t);
