fix quick access tree: show actionId if action text is not set

This commit is contained in:
Alexey Pegov
2010-09-05 19:25:39 +04:00
parent ac7111a830
commit 6187df100e
@@ -299,7 +299,9 @@ public class QuickListPanel {
String actionId = (String)userObject;
used = ((DefaultListModel)myActionsList.getModel()).lastIndexOf(actionId) >= 0;
AnAction action = ActionManager.getInstance().getAction(actionId);
setText(action != null ? action.getTemplatePresentation().getText() : actionId);
String text = action == null ? actionId : action.getTemplatePresentation().getText();
if (text == null || text.length() == 0) text = actionId;
setText(text);
if (action != null) {
Icon actionIcon = action.getTemplatePresentation().getIcon();
if (actionIcon != null) {