diff --git a/platform/platform-resources/src/idea/VcsActions.xml b/platform/platform-resources/src/idea/VcsActions.xml
index 18c827e08899..e64e5247403c 100644
--- a/platform/platform-resources/src/idea/VcsActions.xml
+++ b/platform/platform-resources/src/idea/VcsActions.xml
@@ -30,6 +30,8 @@
text="Compare Before with Local" description="Compare version before selected revision with current version"/>
+
@@ -76,6 +78,7 @@
+
@@ -346,11 +349,9 @@
icon="AllIcons.Welcome.FromVCS">
-
+
-
+
+
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/checkout/CheckoutActionGroup.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/checkout/CheckoutActionGroup.java
index 9ecaa8472224..69c6c82acb74 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/checkout/CheckoutActionGroup.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/checkout/CheckoutActionGroup.java
@@ -17,7 +17,9 @@ package com.intellij.openapi.vcs.checkout;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.actionSystem.AnAction;
+import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ComputableActionGroup;
+import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.vcs.CheckoutProvider;
import org.jetbrains.annotations.NotNull;
@@ -61,4 +63,10 @@ public class CheckoutActionGroup extends ComputableActionGroup.Simple {
protected AnAction createAction(CheckoutProvider provider) {
return new CheckoutAction(provider, myIdPrefix);
}
+
+ @Override
+ public void update(@NotNull AnActionEvent e) {
+ boolean useNewCloneDialogInstead = !Registry.is("vcs.use.new.clone.dialog");
+ e.getPresentation().setEnabledAndVisible(useNewCloneDialogInstead);
+ }
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVcsAction.java b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVcsAction.java
index bd8a356bf8d9..d39674f31d3f 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVcsAction.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/GetFromVcsAction.java
@@ -37,7 +37,7 @@ public class GetFromVcsAction extends WelcomePopupAction {
@Override
public void update(@NotNull AnActionEvent e) {
- e.getPresentation().setVisible(!Registry.is("vcs.use.new.clone.dialog"));
- e.getPresentation().setEnabled(CheckoutProvider.EXTENSION_POINT_NAME.hasAnyExtensions());
+ boolean isEnabled = !Registry.is("vcs.use.new.clone.dialog") && CheckoutProvider.EXTENSION_POINT_NAME.hasAnyExtensions();
+ e.getPresentation().setEnabledAndVisible(isEnabled);
}
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/RunVcsCloneDialogAction.kt b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/RunVcsCloneDialogAction.kt
index 054af7f51625..baf2e3937f1e 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/RunVcsCloneDialogAction.kt
+++ b/platform/vcs-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/RunVcsCloneDialogAction.kt
@@ -1,6 +1,8 @@
// Copyright 2000-2019 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.
package com.intellij.openapi.wm.impl.welcomeScreen
+import com.intellij.icons.AllIcons
+import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.project.DumbAwareAction
@@ -9,11 +11,14 @@ import com.intellij.openapi.util.registry.Registry
import com.intellij.openapi.vcs.CheckoutProvider
import com.intellij.util.ui.cloneDialog.VcsCloneDialog
-class RunVcsCloneDialogAction : DumbAwareAction("Get from Version Control") {
+class RunVcsCloneDialogAction : DumbAwareAction() {
override fun update(e: AnActionEvent) {
- e.presentation.isEnabled = CheckoutProvider.EXTENSION_POINT_NAME.hasAnyExtensions()
- e.presentation.isVisible = Registry.`is`("vcs.use.new.clone.dialog")
+ val isEnabled = CheckoutProvider.EXTENSION_POINT_NAME.hasAnyExtensions() && Registry.`is`("vcs.use.new.clone.dialog")
+ e.presentation.isEnabledAndVisible = isEnabled
+ if (!isEnabled)
+ return
+ e.presentation.icon = if (e.place == ActionPlaces.WELCOME_SCREEN) AllIcons.Vcs.Clone else null
}
override fun actionPerformed(e: AnActionEvent) {
diff --git a/resources/src/idea/JavaActions.xml b/resources/src/idea/JavaActions.xml
index 5ca266c81a64..f9be6a8d2d76 100644
--- a/resources/src/idea/JavaActions.xml
+++ b/resources/src/idea/JavaActions.xml
@@ -20,6 +20,7 @@
+