mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
RUBY-22527 respect dumb mode
This commit is contained in:
@@ -77,7 +77,6 @@ import static com.intellij.ide.actions.runAnything.RunAnythingAction.SHIFT_IS_PR
|
||||
import static com.intellij.ide.actions.runAnything.RunAnythingIconHandler.MATCHED_PROVIDER_PROPERTY;
|
||||
import static com.intellij.openapi.wm.IdeFocusManager.getGlobalInstance;
|
||||
|
||||
@SuppressWarnings("Duplicates")
|
||||
public class RunAnythingPopupUI extends BigPopupUI {
|
||||
public static final int SEARCH_FIELD_COLUMNS = 25;
|
||||
public static final Icon UNKNOWN_CONFIGURATION_ICON = AllIcons.Actions.Run_anything;
|
||||
@@ -637,6 +636,11 @@ public class RunAnythingPopupUI extends BigPopupUI {
|
||||
//noinspection unchecked
|
||||
myAlarm.cancelAllRequests();
|
||||
myAlarm.addRequest(() -> {
|
||||
if (DumbService.getInstance(myProject).isDumb()) {
|
||||
myResultsList.setEmptyText(IdeBundle.message("run.anything.indexing.mode.not.supported"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!myDone.isRejected()) {
|
||||
myResultsList.setModel(myListModel);
|
||||
updatePopup();
|
||||
@@ -920,6 +924,13 @@ public class RunAnythingPopupUI extends BigPopupUI {
|
||||
}
|
||||
});
|
||||
}).registerCustomShortcutSet(CustomShortcutSet.fromString("shift BACK_SPACE"), mySearchField, this);
|
||||
|
||||
myProject.getMessageBus().connect(this).subscribe(DumbService.DUMB_MODE, new DumbService.DumbModeListener() {
|
||||
@Override
|
||||
public void exitDumbMode() {
|
||||
ApplicationManager.getApplication().invokeLater(() -> rebuildList());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -1330,6 +1330,7 @@ run.anything.main.list.empty.primary.text=Run command or configuration
|
||||
run.anything.main.list.empty.secondary.text=Type "?" to see all commands
|
||||
run.anything.action.tooltip.text=Run Anything ({0})
|
||||
run.anything.hint.initial.text=Press {0} or {1} to navigate through the suggestion list
|
||||
run.anything.indexing.mode.not.supported=Run anything is not available while indices are updating
|
||||
|
||||
third.party.plugins.privacy.note.title=Third-party Plugins Privacy Note
|
||||
third.party.plugins.privacy.note.message=<html><body>Using third-party plugins may involve a plugin vendor processing your personal data.<br>Please check the plugin vendor\u2019s documentation for details concerning personal data processing.<br><br>JetBrains is not responsible for any processing of your personal data by any third-party plugin vendors.</body></html>
|
||||
|
||||
Reference in New Issue
Block a user