mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-33342 trigger feature used on escape/execute command
This commit is contained in:
@@ -429,6 +429,8 @@ public class RunAnythingAction extends AnAction implements CustomComponentAction
|
||||
onDone = () -> RunAnythingUtil.executeMatched(dataContext, pattern);
|
||||
}
|
||||
finally {
|
||||
triggerUsed();
|
||||
|
||||
final ActionCallback callback = onPopupFocusLost();
|
||||
if (onDone != null) {
|
||||
callback.doWhenDone(onDone);
|
||||
@@ -859,9 +861,7 @@ public class RunAnythingAction extends AnAction implements CustomComponentAction
|
||||
.registerCustomShortcutSet(CustomShortcutSet.fromString("shift TAB"), editor, balloon);
|
||||
AnAction escape = ActionManager.getInstance().getAction("EditorEscape");
|
||||
DumbAwareAction.create(e -> {
|
||||
if (myIsUsedTrigger) {
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed(RUN_ANYTHING);
|
||||
}
|
||||
triggerUsed();
|
||||
|
||||
if (myBalloon != null && myBalloon.isVisible()) {
|
||||
myBalloon.cancel();
|
||||
@@ -921,6 +921,13 @@ public class RunAnythingAction extends AnAction implements CustomComponentAction
|
||||
}.registerCustomShortcutSet(CustomShortcutSet.fromString("LEFT"), editor, balloon);
|
||||
}
|
||||
|
||||
private void triggerUsed() {
|
||||
if (myIsUsedTrigger) {
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed(RUN_ANYTHING);
|
||||
}
|
||||
myIsUsedTrigger = false;
|
||||
}
|
||||
|
||||
|
||||
public void setAdText(@NotNull final String s) {
|
||||
myPopup.setAdText(s, SwingConstants.LEFT);
|
||||
@@ -1247,7 +1254,6 @@ public class RunAnythingAction extends AnAction implements CustomComponentAction
|
||||
}
|
||||
}
|
||||
myActionEvent = null;
|
||||
myIsUsedTrigger = false;
|
||||
myLastInputText = null;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user