mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Load typeahead actions from the registry
This commit is contained in:
@@ -35,6 +35,7 @@ import com.intellij.openapi.keymap.impl.KeyState;
|
||||
import com.intellij.openapi.ui.JBPopupMenu;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.IdeFrame;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
@@ -1308,18 +1309,14 @@ public class IdeEventQueue extends EventQueue {
|
||||
|
||||
private final Set<Shortcut> shortcutsShowingPopups = new HashSet<>();
|
||||
|
||||
private final Set<String> actionsShowingPopupsList = new HashSet<>();
|
||||
private final List<String> actionsShowingPopupsList = new ArrayList<>();
|
||||
private long lastTypeaheadTimestamp = -1;
|
||||
|
||||
private Set<Shortcut> getShortcutsShowingPopups () {
|
||||
if (KeymapManager.getInstance().getActiveKeymap() != null) {
|
||||
// move to a config
|
||||
actionsShowingPopupsList.add("GotoClass");
|
||||
actionsShowingPopupsList.add("GotoFile");
|
||||
actionsShowingPopupsList.add("GotoSymbol");
|
||||
actionsShowingPopupsList.add("FindInPath");
|
||||
actionsShowingPopupsList.add("ReplaceInPath");
|
||||
|
||||
String actionsAwareTypeaheadActionsList = Registry.get("action.aware.typeahead.actions.list").asString();
|
||||
actionsShowingPopupsList.addAll(StringUtil.split(actionsAwareTypeaheadActionsList, ","));
|
||||
actionsShowingPopupsList.forEach(actionId -> {
|
||||
List<Shortcut> shortcuts = Arrays.asList(KeymapManager.getInstance().getActiveKeymap().getShortcuts(actionId));
|
||||
if (TYPEAHEAD_LOG.isDebugEnabled()) {
|
||||
|
||||
@@ -1483,7 +1483,11 @@ webstorm.vue.project.generator=false
|
||||
webstorm.vue.project.generator.description=Vue project generator
|
||||
|
||||
action.aware.typeAhead=false
|
||||
action.aware.typeAhead.description=Enables action aweare typeahead
|
||||
action.aware.typeaheadTimout=10000
|
||||
action.aware.typeaheadTimout.description=The action aware typeahead is canceled in this amount of time if the typeahead fails.
|
||||
action.aware.typeahead.actions.list=GotoClass,GotoFile,GotoSymbol,FindInPath,ReplaceInPath,FileStructurePopup
|
||||
action.aware.typeahead.actions.list.description=List of actions that may show popups.
|
||||
|
||||
show.new.plugin.page=false
|
||||
show.new.plugin.page.description=Show new plugin page configurable
|
||||
Reference in New Issue
Block a user