packaging: get rid of unused method to make it SDK-agnostic
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Fri, 4 Sep 2015 15:46:09 +0000 (18:46 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Fri, 4 Sep 2015 15:46:09 +0000 (18:46 +0300)
platform/lang-impl/src/com/intellij/webcore/packaging/InstalledPackagesPanel.java
python/src/com/jetbrains/python/packaging/ui/PyInstalledPackagesPanel.java

index d37814414b4bb737e27e185161184ac9de6d2b96..8b341efab6bc05ff673a5919569059b1af6d139e 100644 (file)
@@ -8,7 +8,6 @@ import com.intellij.openapi.application.Application;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.projectRoots.Sdk;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.ui.AnActionButton;
@@ -16,7 +15,6 @@ import com.intellij.ui.DoubleClickListener;
 import com.intellij.ui.ToolbarDecorator;
 import com.intellij.ui.table.JBTable;
 import com.intellij.util.CatchingConsumer;
-import com.intellij.util.Consumer;
 import com.intellij.util.IconUtil;
 import com.intellij.util.ObjectUtils;
 import com.intellij.util.containers.ContainerUtil;
@@ -50,7 +48,6 @@ public class InstalledPackagesPanel extends JPanel {
   protected volatile PackageManagementService myPackageManagementService;
   protected final Project myProject;
   protected final PackagesNotificationPanel myNotificationArea;
-  protected final List<Consumer<Sdk>> myPathChangedListeners = ContainerUtil.createLockFreeCopyOnWriteList();
   private final Set<String> myCurrentlyInstalling = ContainerUtil.newHashSet();
   private final Set<InstalledPackage> myWaitingToUpgrade = ContainerUtil.newHashSet();
 
@@ -159,10 +156,6 @@ public class InstalledPackagesPanel extends JPanel {
                                     });
   }
 
-  public void addPathChangedListener(Consumer<Sdk> consumer) {
-    myPathChangedListeners.add(consumer);
-  }
-
   private void upgradeAction() {
     final int[] rows = myPackagesTable.getSelectedRows();
     if (myPackageManagementService != null) {
index 87bb244acbdba4ea0c1119ed19bedd16444c709c..b0dea29c4230a9fbb569c690f571758a01b01901 100644 (file)
@@ -23,7 +23,6 @@ import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.projectRoots.Sdk;
-import com.intellij.util.Consumer;
 import com.intellij.webcore.packaging.InstalledPackage;
 import com.intellij.webcore.packaging.InstalledPackagesPanel;
 import com.intellij.webcore.packaging.PackageManagementService;
@@ -78,9 +77,6 @@ public class PyInstalledPackagesPanel extends InstalledPackagesPanel {
           }
           packageManager.refresh();
           updatePackages(new PyPackageManagementService(myProject, sdk));
-          for (Consumer<Sdk> listener : myPathChangedListeners) {
-            listener.consume(sdk);
-          }
           updateNotifications(sdk);
         }
       });