show "always visible" groups in compact groups

That makes them always visible for real.

To show disabled `AIIntentionsActionGroup` in compact `ShowIntentionsGroup`.

GitOrigin-RevId: 8cdb5393874a747faa69dd19d05a31252738b7a9
This commit is contained in:
Gregory.Shrago
2025-01-30 13:24:56 +00:00
committed by intellij-monorepo-bot
parent ce072b2d87
commit e076183c42
@@ -354,10 +354,12 @@ internal class ActionUpdater @JvmOverloads constructor(
private suspend fun expandGroupChild(child: AnAction, hideDisabledBase: Boolean): List<AnAction> {
val presentation = updateAction(child)
if (presentation == null) {
if (presentation == null || !presentation.isVisible) {
return emptyList()
}
else if (!presentation.isVisible || hideDisabledBase && !presentation.isEnabled) {
val alwaysVisible = child is ActionGroup && (
child is AlwaysVisibleActionGroup || presentation.getClientProperty(ALWAYS_VISIBLE_GROUP) == true)
if (hideDisabledBase && !presentation.isEnabled && !alwaysVisible) {
return emptyList()
}
else if (child !is ActionGroup) {
@@ -366,7 +368,6 @@ internal class ActionUpdater @JvmOverloads constructor(
val isPopup = presentation.isPopupGroup
val canBePerformed = presentation.isPerformGroup
var performOnly = isPopup && canBePerformed && presentation.getClientProperty(SUPPRESS_SUBMENU) == true
val alwaysVisible = child is AlwaysVisibleActionGroup || presentation.getClientProperty(ALWAYS_VISIBLE_GROUP) == true
val skipChecks = performOnly || alwaysVisible
val hideDisabled = isPopup && !skipChecks && hideDisabledBase
val hideEmpty = isPopup && !skipChecks && presentation.isHideGroupIfEmpty