mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-359334 Action Gradle.DownloadSources always visible in all AbstractExternalSystemToolWindowFactory implemetations
(cherry picked from commitdf6e705515) (cherry picked from commit1a744d0165) (cherry picked from commitc5b762b011)
This commit is contained in:
@@ -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
|
||||
}
|
||||
+6
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user