IDEA-131389 Disabled plugins are not updated from plugin repository
authorAlexander Lobas <Alexander.Lobas@jetbrains.com>
Thu, 13 Aug 2020 16:50:07 +0000 (19:50 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 13 Aug 2020 16:52:24 +0000 (16:52 +0000)
GitOrigin-RevId: 09a531669ba987239b0e2354797a288c87ded888

platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.kt

index 6d5c027df9a465d4d9567a4f778e7c32dd01900d..6e2b13845d29dc6135574bbf76775e82cfdab3c3 100644 (file)
@@ -476,19 +476,24 @@ object UpdateChecker {
     if (installedPlugin == null || pluginVersion == null || PluginDownloader.compareVersionsSkipBrokenAndIncompatible(pluginVersion, installedPlugin) > 0) {
       var descriptor: IdeaPluginDescriptor?
 
-      val oldDownloader = ourUpdatedPlugins[pluginId]
-      if (oldDownloader == null || StringUtil.compareVersionNumbers(pluginVersion, oldDownloader.pluginVersion) > 0) {
+      if (PluginManagerCore.isDisabled(pluginId)) {
         descriptor = downloader.descriptor
-        if (descriptor is PluginNode && descriptor.isIncomplete) {
-          if (downloader.prepareToInstall(indicator ?: EmptyProgressIndicator())) {
-            descriptor = downloader.descriptor
-          }
-          ourUpdatedPlugins[pluginId] = downloader
-        }
       }
       else {
-        downloader = oldDownloader
-        descriptor = oldDownloader.descriptor
+        val oldDownloader = ourUpdatedPlugins[pluginId]
+        if (oldDownloader == null || StringUtil.compareVersionNumbers(pluginVersion, oldDownloader.pluginVersion) > 0) {
+          descriptor = downloader.descriptor
+          if (descriptor is PluginNode && descriptor.isIncomplete) {
+            if (downloader.prepareToInstall(indicator ?: EmptyProgressIndicator())) {
+              descriptor = downloader.descriptor
+            }
+            ourUpdatedPlugins[pluginId] = downloader
+          }
+        }
+        else {
+          downloader = oldDownloader
+          descriptor = oldDownloader.descriptor
+        }
       }
 
       if (PluginManagerCore.isCompatible(descriptor, downloader.buildNumber) && !state.wasUpdated(descriptor.pluginId)) {