mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
+5
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user