mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix displaying shortcuts for intention actions
Was broken in c776e56470
This commit is contained in:
+7
-1
@@ -143,7 +143,7 @@ public class IntentionActionWithTextCaching implements Comparable<IntentionActio
|
||||
}
|
||||
|
||||
// IntentionAction which wraps the original action and then marks it as executed to hide it from the popup to avoid invoking it twice accidentally
|
||||
private class MyIntentionAction implements IntentionAction, IntentionActionDelegate, Comparable<MyIntentionAction> {
|
||||
private class MyIntentionAction implements IntentionAction, IntentionActionDelegate, Comparable<MyIntentionAction>, ShortcutProvider {
|
||||
private final IntentionAction myAction;
|
||||
private final BiConsumer<IntentionActionWithTextCaching, IntentionAction> myMarkInvoked;
|
||||
|
||||
@@ -205,6 +205,12 @@ public class IntentionActionWithTextCaching implements Comparable<IntentionActio
|
||||
return myAction.getElementToMakeWritable(currentFile);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ShortcutSet getShortcut() {
|
||||
return myAction instanceof ShortcutProvider ? ((ShortcutProvider)myAction).getShortcut() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull final MyIntentionAction other) {
|
||||
if (myAction instanceof Comparable) {
|
||||
|
||||
Reference in New Issue
Block a user