From f2e0f6e7a9bf50a354fb7e3e25c95fa733bc0e3d Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 8 Nov 2011 15:59:57 +0100 Subject: [PATCH] IDEA-76614 Unable to right click in Favorites tab --- .../actions/SendToFavoritesGroup.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/SendToFavoritesGroup.java b/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/SendToFavoritesGroup.java index 5cb1df624c3e..61c0f90d2c85 100644 --- a/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/SendToFavoritesGroup.java +++ b/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/SendToFavoritesGroup.java @@ -62,12 +62,16 @@ public class SendToFavoritesGroup extends ActionGroup{ if (!(parent instanceof FavoritesTreeNodeDescriptor)) { return EMPTY_ARRAY; } - String name = ((FavoritesListNode)parent.getElement()).getName(); - if (listName == null) { - listName = name; - } - if (!StringUtil.equals(listName, name)) { - return EMPTY_ARRAY; + final Object parentElement = parent.getElement(); + if (parentElement instanceof FavoritesListNode) { + String name = ((FavoritesListNode)parentElement).getName(); + if (listName == null) { + listName = name; + } + + if (!StringUtil.equals(listName, name)) { + return EMPTY_ARRAY; + } } }