exclude search popups in isFromContextMenu

Fixes missing `FindInPathAction` in Find Action.

GitOrigin-RevId: 27b6d6ef8ed7fa9e00983ec22e3ebca5b42cfa76
This commit is contained in:
Gregory.Shrago
2024-08-30 16:41:53 +04:00
committed by intellij-monorepo-bot
parent 7f04615223
commit a7dc5858f4
2 changed files with 10 additions and 1 deletions

View File

@@ -1252,6 +1252,7 @@ c:com.intellij.openapi.actionSystem.AnActionEvent
- f:isFromActionToolbar():Z
- f:isFromContextMenu():Z
- f:isFromMainMenu():Z
- f:isFromSearchPopup():Z
- f:isInInjectedContext():Z
- f:setInjectedContext(Z):V
- f:setUpdateSession(com.intellij.openapi.actionSystem.UpdateSession):V

View File

@@ -277,7 +277,7 @@ public class AnActionEvent implements PlaceProvider {
* @see ActionUiKind#POPUP
*/
public final boolean isFromContextMenu() {
return myUiKind instanceof ActionUiKind.Popup o && !o.isMainMenu();
return myUiKind instanceof ActionUiKind.Popup o && !o.isMainMenu() && !o.isSearchPopup();
}
/**
@@ -288,6 +288,14 @@ public class AnActionEvent implements PlaceProvider {
return myUiKind instanceof ActionUiKind.Popup o && o.isMainMenu();
}
/**
* @see #getUiKind()
* @see ActionUiKind#POPUP
*/
public final boolean isFromSearchPopup() {
return myUiKind instanceof ActionUiKind.Popup o && o.isSearchPopup();
}
/**
* Returns the presentation which represents the action in the place from where it is invoked
* or updated.