Currently HighPriorityAction and LowPriorityAction behaviour seems to be broken for intentions, which are wrapped first in IntentionActionWrapper and then in IntentionActionWithTextCaching$MyIntentionAction.

This commit is contained in:
Alexey Kudravtsev
2017-06-16 17:47:18 +03:00
parent 9f5c8d48c1
commit 012d87ec0a
@@ -370,7 +370,7 @@ public class IntentionListStep implements ListPopupStep<IntentionActionWithTextC
private int getWeight(IntentionActionWithTextCaching action) {
IntentionAction a = action.getAction();
int group = getGroup(action);
if (a instanceof IntentionActionDelegate) {
while (a instanceof IntentionActionDelegate) {
a = ((IntentionActionDelegate)a).getDelegate();
}
if (a instanceof HighPriorityAction) {
@@ -431,16 +431,16 @@ public class IntentionListStep implements ListPopupStep<IntentionActionWithTextC
return value.getIcon();
}
final IntentionAction action = value.getAction();
IntentionAction action = value.getAction();
while (action instanceof IntentionActionDelegate) {
action = ((IntentionActionDelegate)action).getDelegate();
}
Object iconable = action;
//custom icon
if (action instanceof QuickFixWrapper) {
iconable = ((QuickFixWrapper)action).getFix();
}
else if (action instanceof IntentionActionDelegate) {
iconable = ((IntentionActionDelegate)action).getDelegate();
}
if (iconable instanceof Iconable) {
final Icon icon = ((Iconable)iconable).getIcon(0);