IJPL-191239 reduce visibility

GitOrigin-RevId: 0ecc507b6bd80390684f4cea51513bd3f5850c32
This commit is contained in:
Vladimir Krivosheev
2025-06-11 09:29:00 +02:00
committed by intellij-monorepo-bot
parent 8c27af10ea
commit bc4bcb67bd
7 changed files with 32 additions and 60 deletions

View File

@@ -1353,20 +1353,6 @@ f:com.intellij.execution.runToolbar.RunToolbarMoreActionGroup
- <init>():V
- getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
c:com.intellij.execution.runToolbar.RunToolbarProcessAction
- com.intellij.execution.runToolbar.RTBarAction
- com.intellij.openapi.actionSystem.AnAction
- com.intellij.openapi.project.DumbAware
- <init>(com.intellij.execution.runToolbar.RunToolbarProcess,com.intellij.execution.Executor):V
- actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent):V
- pf:canRun(com.intellij.openapi.actionSystem.AnActionEvent):Z
- checkMainSlotVisibility(com.intellij.execution.runToolbar.RunToolbarMainSlotState):Z
- displayTextInToolbar():Z
- f:getExecutor():com.intellij.execution.Executor
- p:getInformativeIcon(com.intellij.openapi.project.Project,com.intellij.execution.RunnerAndConfigurationSettings,com.intellij.openapi.actionSystem.AnActionEvent):javax.swing.Icon
- getProcess():com.intellij.execution.runToolbar.RunToolbarProcess
- p:getSelectedConfiguration(com.intellij.openapi.actionSystem.AnActionEvent):com.intellij.execution.RunnerAndConfigurationSettings
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
f:com.intellij.execution.runToolbar.RunToolbarRollbackToPrevious
- com.intellij.openapi.project.DumbAwareAction
- sf:Companion:com.intellij.execution.runToolbar.RunToolbarRollbackToPrevious$Companion

View File

@@ -1,10 +1,7 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.runToolbar
import org.jetbrains.annotations.ApiStatus
@ApiStatus.Internal
interface ExecutorRunToolbarAction : RTBarAction {
internal interface ExecutorRunToolbarAction : RTBarAction {
val process: RunToolbarProcess
override fun getRightSideType(): RTBarAction.Type = RTBarAction.Type.RIGHT_FLEXIBLE

View File

@@ -1,9 +1,8 @@
// Copyright 2000-2021 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.runToolbar
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.diagnostic.Logger
import org.jetbrains.annotations.ApiStatus
interface RTBarAction {
enum class Type {
@@ -13,11 +12,11 @@ interface RTBarAction {
FLEXIBLE
}
fun traceLog(logger: Logger, e: AnActionEvent, additionalInfo: String?=null) {
/* if (RunToolbarProcess.logNeeded) {
logger.info(
"RunToolbar UPDATE slot: ${e.id()} ${"visible: ${e.presentation.isVisible}, enable: ${e.presentation.isEnabled}"}; ${additionalInfo ?: ""} ")
}*/
fun traceLog(logger: Logger, e: AnActionEvent, additionalInfo: String? = null) {
/* if (RunToolbarProcess.logNeeded) {
logger.info(
"RunToolbar UPDATE slot: ${e.id()} ${"visible: ${e.presentation.isVisible}, enable: ${e.presentation.isEnabled}"}; ${additionalInfo ?: ""} ")
}*/
}
fun getRightSideType(): Type = Type.STABLE
@@ -25,8 +24,7 @@ interface RTBarAction {
fun checkMainSlotVisibility(state: RunToolbarMainSlotState): Boolean
}
@ApiStatus.Internal
interface RTRunConfiguration : RTBarAction {
internal interface RTRunConfiguration : RTBarAction {
override fun getRightSideType(): RTBarAction.Type = RTBarAction.Type.STABLE
fun isStable(): Boolean {
return getRightSideType() == RTBarAction.Type.STABLE

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.runToolbar
import com.intellij.execution.Executor
@@ -8,14 +8,13 @@ import com.intellij.execution.actions.ExecutorAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
import org.jetbrains.annotations.ApiStatus
import javax.swing.Icon
open class RunToolbarProcessAction(override val process: RunToolbarProcess, val executor: Executor) : ExecutorAction(executor), ExecutorRunToolbarAction, DumbAware {
override fun displayTextInToolbar(): Boolean {
return true
}
internal open class RunToolbarProcessAction(
override val process: RunToolbarProcess,
@JvmField protected val executor: Executor,
) : ExecutorAction(executor), ExecutorRunToolbarAction, DumbAware {
override fun displayTextInToolbar(): Boolean = true
override fun getInformativeIcon(project: Project,
selectedConfiguration: RunnerAndConfigurationSettings,
@@ -52,9 +51,7 @@ open class RunToolbarProcessAction(override val process: RunToolbarProcess, val
}
}
override fun getSelectedConfiguration(e: AnActionEvent): RunnerAndConfigurationSettings? {
return e.configuration()
}
override fun getSelectedConfiguration(e: AnActionEvent): RunnerAndConfigurationSettings? = e.configuration()
protected fun canRun(e: AnActionEvent): Boolean {
return e.project?.let { project ->
@@ -65,8 +62,7 @@ open class RunToolbarProcessAction(override val process: RunToolbarProcess, val
}
}
@ApiStatus.Internal
class RunToolbarGroupProcessAction(process: RunToolbarProcess, executor: Executor) : RunToolbarProcessAction(process, executor) {
internal class RunToolbarGroupProcessAction(process: RunToolbarProcess, executor: Executor) : RunToolbarProcessAction(process, executor) {
override fun update(e: AnActionEvent) {
super.update(e)
e.presentation.isEnabledAndVisible = e.presentation.isEnabled

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.runToolbar
import com.intellij.execution.Executor
@@ -7,15 +7,11 @@ import com.intellij.execution.RunnerAndConfigurationSettings
import com.intellij.execution.runners.ExecutionUtil
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.impl.ActionButtonWithText
import com.intellij.openapi.diagnostic.Logger
import org.jetbrains.annotations.ApiStatus
import com.intellij.openapi.diagnostic.logger
@ApiStatus.Internal
class RunToolbarProcessMainAction(process: RunToolbarProcess, executor: Executor) : RunToolbarProcessAction(process, executor) {
companion object {
private val LOG = Logger.getInstance(RunToolbarProcessMainAction::class.java)
}
private val LOG = logger<RunToolbarProcessMainAction>()
internal class RunToolbarProcessMainAction(process: RunToolbarProcess, executor: Executor) : RunToolbarProcessAction(process, executor) {
init {
templatePresentation.putClientProperty(ActionButtonWithText.SHORTCUT_SHOULD_SHOWN, true)
}

View File

@@ -1,9 +1,9 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.runToolbar.data
import javax.swing.SwingUtilities
class RWAddedController : RWListenersController<RWActiveListener>() {
internal class RWAddedController : RWListenersController<RWActiveListener>() {
fun enabled() {
doWithListeners { listeners ->
listeners.forEach { it.enabled() }
@@ -51,7 +51,7 @@ internal class RWStateController : RWListenersController<RWStateListener>() {
}
}
abstract class RWListenersController<T> {
internal sealed class RWListenersController<T> {
private val listenersUnsafe = mutableListOf<T>()
private val listenerLock = Object()
protected fun doWithListeners(action: (MutableList<T>) -> Unit) {

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.ui
import com.intellij.execution.*
@@ -67,7 +67,6 @@ import java.util.*
import java.util.concurrent.locks.ReentrantReadWriteLock
import java.util.function.Predicate
import javax.swing.JList
import kotlin.collections.plus
import kotlin.concurrent.read
import kotlin.concurrent.write
import kotlin.math.max
@@ -75,11 +74,12 @@ import kotlin.math.max
private const val RUN: String = DefaultRunExecutor.EXECUTOR_ID
private const val DEBUG: String = ToolWindowId.DEBUG
private val recentLimit: Int get() = AdvancedSettings.getInt("max.recent.run.configurations")
private val recentLimit: Int
get() = AdvancedSettings.getInt("max.recent.run.configurations")
@ApiStatus.Internal
@JvmField
val RUN_CONFIGURATION_KEY = DataKey.create<RunnerAndConfigurationSettings>("sub.popup.parent.action")
val RUN_CONFIGURATION_KEY: DataKey<RunnerAndConfigurationSettings> = DataKey.create("sub.popup.parent.action")
@JvmField
internal val RUN_CONFIGURATION_ID: Key<String> = Key.create("sub.popup.run.configuration.unique.id")
@@ -91,8 +91,7 @@ private const val TAG_REGULAR_SHOW = "regular-show" // shown regularly
private const val TAG_REGULAR_DUPE = "regular-dupe" // shown regularly until search (pinned/recent duplicate)
private const val TAG_HIDDEN = "hidden" // hidden until search
@ApiStatus.Internal
class RunConfigurationsActionGroup : ActionGroup(), ActionRemoteBehaviorSpecification.BackendOnly {
private class RunConfigurationsActionGroup : ActionGroup(), ActionRemoteBehaviorSpecification.BackendOnly {
override fun getChildren(e: AnActionEvent?): Array<AnAction> {
val project = e?.project ?: return emptyArray()
val selectedFile = e.getData(PlatformDataKeys.LAST_ACTIVE_FILE_EDITOR)?.file
@@ -378,7 +377,7 @@ open class AllRunConfigurationsToggle : DumbAwareToggleAction(), ActionRemoteBeh
templatePresentation.keepPopupOnPerform = KeepPopupOnPerform.Always
}
override fun getActionUpdateThread() = ActionUpdateThread.EDT
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
override fun getBehavior(): ActionRemoteBehavior = ActionRemoteBehavior.FrontendThenBackend
override fun isSelected(e: AnActionEvent): Boolean = RunConfigurationStartHistory.getInstance(e.project!!).state.allConfigurationsExpanded
@@ -726,7 +725,7 @@ class RunConfigurationStartHistory(private val project: Project) : PersistentSta
private var _state = State()
override fun getState() = _state
override fun getState(): State = _state
override fun loadState(state: State) {
_state = state
@@ -746,7 +745,7 @@ class RunConfigurationStartHistory(private val project: Project) : PersistentSta
fun getInstance(project: Project): RunConfigurationStartHistory = project.service()
@Topic.ProjectLevel
val TOPIC = Topic("RunConfigurationStartHistory events", Listener::class.java)
val TOPIC: Topic<Listener> = Topic("RunConfigurationStartHistory events", Listener::class.java)
}
}