IDEA-359334 Action Gradle.DownloadSources always visible in all AbstractExternalSystemToolWindowFactory implemetations

(cherry picked from commit df6e705515)
(cherry picked from commit 1a744d0165)
(cherry picked from commit c5b762b011)
This commit is contained in:
Nikita Iarychenko
2026-09-16 13:50:26 +04:00
parent 7473db1a48
commit 3fe0a5c75f
2 changed files with 11 additions and 1 deletions
@@ -1,4 +1,7 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
//
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
// Any modifications are available on the same license terms as the original source code.
package org.jetbrains.plugins.gradle.action
import com.intellij.openapi.actionSystem.AnActionEvent
@@ -32,4 +35,6 @@ class GradleDownloadSourcesAction : ExternalSystemAction() {
}
}
}
override fun isVisible(e: AnActionEvent) = getSystemId(e) == GradleConstants.SYSTEM_ID
}
@@ -1,4 +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.
//
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
// Any modifications are available on the same license terms as the original source code.
package org.jetbrains.plugins.gradle.dependency.analyzer
import com.intellij.openapi.actionSystem.AnActionEvent
@@ -63,7 +66,9 @@ class ToolbarDependencyAnalyzerAction : DependencyAnalyzerAction() {
override fun getSystemId(e: AnActionEvent) = GradleConstants.SYSTEM_ID
override fun isEnabledAndVisible(e: AnActionEvent) = true
override fun isEnabledAndVisible(e: AnActionEvent): Boolean {
return e.getData(ExternalSystemDataKeys.EXTERNAL_SYSTEM_ID) == GradleConstants.SYSTEM_ID
}
override fun setSelectedState(view: DependencyAnalyzerView, e: AnActionEvent) {
viewAction.setSelectedState(view, e)