diff --git a/java/ide-customization/resources/META-INF/plugin.xml b/java/ide-customization/resources/META-INF/plugin.xml
index 810e1a2ddbc6..cf99d29aacfc 100644
--- a/java/ide-customization/resources/META-INF/plugin.xml
+++ b/java/ide-customization/resources/META-INF/plugin.xml
@@ -59,7 +59,7 @@
-
+
diff --git a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionGroup.java b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionGroup.java
index 69094e02a569..0f8a0d961c8b 100644
--- a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionGroup.java
+++ b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionGroup.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.actionSystem;
import com.intellij.util.ReflectionUtil;
@@ -26,6 +26,7 @@ import static com.intellij.openapi.util.NlsActions.ActionText;
*/
public abstract class ActionGroup extends AnAction {
private boolean myPopup;
+ private boolean mySearchable = true;
private final PropertyChangeSupport myChangeSupport = new PropertyChangeSupport(this);
public static final ActionGroup EMPTY_GROUP = new ActionGroup() {
@Override
@@ -119,6 +120,14 @@ public abstract class ActionGroup extends AnAction {
firePropertyChange(PROP_POPUP, oldPopup, myPopup);
}
+ public boolean isSearchable() {
+ return mySearchable;
+ }
+
+ public void setSearchable(boolean searchable) {
+ mySearchable = searchable;
+ }
+
public final void addPropertyChangeListener(@NotNull PropertyChangeListener l){
myChangeSupport.addPropertyChangeListener(l);
}
diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionItemProvider.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionItemProvider.java
index 6ea94b1fc594..87853bdbb9f8 100644
--- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionItemProvider.java
+++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionItemProvider.java
@@ -232,6 +232,7 @@ public final class GotoActionItemProvider implements ChooseByNameWeightedItemPro
}
JBIterable actionWrappers = actions.unique().filterMap(action -> {
+ if (action instanceof ActionGroup && !((ActionGroup) action).isSearchable()) return null;
MatchMode mode = myModel.actionMatches(pattern, matcher, action);
if (mode == MatchMode.NONE) return null;
return new ActionWrapper(action, myModel.getGroupMapping(action), mode, dataContext, myModel);
diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupStub.kt b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupStub.kt
index 8adfc310572b..9f8a3cc696e5 100644
--- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupStub.kt
+++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupStub.kt
@@ -53,5 +53,6 @@ class ActionGroupStub(override val id: String, val actionClass: String, override
if (popupDefinedInXml) {
target.isPopup = isPopup
}
+ target.isSearchable = isSearchable
}
}
diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java
index 138bc801f60c..8e8a4bcb958a 100644
--- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java
+++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java
@@ -103,6 +103,7 @@ public final class ActionManagerImpl extends ActionManagerEx implements Disposab
private static final String KEY_ATTR_NAME = "key";
private static final String POPUP_ATTR_NAME = "popup";
private static final String COMPACT_ATTR_NAME = "compact";
+ private static final String SEARCHABLE_ATTR_NAME = "searchable";
private static final String SEPARATOR_ELEMENT_NAME = "separator";
private static final String REFERENCE_ELEMENT_NAME = "reference";
private static final String ABBREVIATION_ELEMENT_NAME = "abbreviation";
@@ -818,6 +819,12 @@ public final class ActionManagerImpl extends ActionManagerEx implements Disposab
((ActionGroupStub)group).setPopupDefinedInXml(true);
}
}
+
+ String searchable = element.getAttributeValue(SEARCHABLE_ATTR_NAME);
+ if (searchable != null) {
+ group.setSearchable(Boolean.parseBoolean(searchable));
+ }
+
String shortcutOfActionId = element.getAttributeValue(USE_SHORTCUT_OF_ATTR_NAME);
if (customClass && shortcutOfActionId != null) {
KeymapManagerEx.getInstanceEx().bindShortcuts(shortcutOfActionId, id);
diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml
index ed2c79fbc240..45469ba59334 100644
--- a/platform/platform-resources/src/idea/LangActions.xml
+++ b/platform/platform-resources/src/idea/LangActions.xml
@@ -451,7 +451,7 @@
-
+
@@ -459,7 +459,7 @@
-
+
diff --git a/plugins/devkit/devkit-core/src/dom/Group.java b/plugins/devkit/devkit-core/src/dom/Group.java
index 0a4cd3c02a69..5f4ad44af8b2 100644
--- a/plugins/devkit/devkit-core/src/dom/Group.java
+++ b/plugins/devkit/devkit-core/src/dom/Group.java
@@ -17,6 +17,9 @@ public interface Group extends ActionContainer, ActionOrGroup {
@NotNull
GenericAttributeValue getCompact();
+ @NotNull
+ GenericAttributeValue getSearchable();
+
@NotNull
@Attribute("class")
@ExtendClass(value = "com.intellij.openapi.actionSystem.ActionGroup",