From a144bef814d966c3853514fc4ea5db8a68010059 Mon Sep 17 00:00:00 2001 From: Aleksandr Krasilnikov Date: Thu, 15 Aug 2019 18:04:39 +0300 Subject: [PATCH] vcs: use correct text for clone actions in different places GitOrigin-RevId: 3d8ab548afe5f4a9b181dee66eca5c938408b7a8 --- .../src/idea/VcsActions.xml | 3 +-- .../GetFromVersionControlAction.kt | 24 +++++++++++++++---- resources/src/idea/JavaActions.xml | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/platform/platform-resources/src/idea/VcsActions.xml b/platform/platform-resources/src/idea/VcsActions.xml index b601cd04b43c..9b238e64ac49 100644 --- a/platform/platform-resources/src/idea/VcsActions.xml +++ b/platform/platform-resources/src/idea/VcsActions.xml @@ -31,8 +31,7 @@ - + text="Get from Version Control..."/> diff --git a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVersionControlAction.kt b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVersionControlAction.kt index 599d70b62aec..d3473a6ae0c7 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVersionControlAction.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVersionControlAction.kt @@ -11,14 +11,21 @@ import com.intellij.openapi.util.registry.Registry import com.intellij.openapi.vcs.CheckoutProvider import com.intellij.util.ui.cloneDialog.VcsCloneDialog -class GetFromVersionControlAction : DumbAwareAction() { - +open class GetFromVersionControlAction : DumbAwareAction() { override fun update(e: AnActionEvent) { val isEnabled = CheckoutProvider.EXTENSION_POINT_NAME.hasAnyExtensions() && Registry.`is`("vcs.use.new.clone.dialog") - e.presentation.isEnabledAndVisible = isEnabled + val presentation = e.presentation + presentation.isEnabledAndVisible = isEnabled if (!isEnabled) return - e.presentation.icon = if (e.place == ActionPlaces.WELCOME_SCREEN) AllIcons.Vcs.Clone else null + if (e.place == ActionPlaces.WELCOME_SCREEN) { + presentation.icon = AllIcons.Vcs.Clone + presentation.text = "Get from Version Control" + } + else { + presentation.icon = null + presentation.text = "Get from Version Control..." + } } override fun actionPerformed(e: AnActionEvent) { @@ -29,3 +36,12 @@ class GetFromVersionControlAction : DumbAwareAction() { } } } + +class ProjectFromVersionControlAction : GetFromVersionControlAction() { + override fun update(e: AnActionEvent) { + super.update(e) + e.presentation.text = "Project form Version Control..." + } +} + + diff --git a/resources/src/idea/JavaActions.xml b/resources/src/idea/JavaActions.xml index 80224a700067..bb666fa152b8 100644 --- a/resources/src/idea/JavaActions.xml +++ b/resources/src/idea/JavaActions.xml @@ -20,7 +20,7 @@ - +