make it possible to pass an action instead of Map.Entry

This commit is contained in:
Konstantin Bulenkov
2013-08-05 15:58:50 +02:00
parent 3d7c1853e6
commit fdad2f1cf7
@@ -97,7 +97,8 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
});
}
else {
final AnAction action = (AnAction)((Map.Entry)element).getKey();
//element could be AnAction (SearchEverywhere)
final AnAction action = element instanceof AnAction ? ((AnAction)element) : (AnAction)((Map.Entry)element).getKey();
if (action != null) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override