Merge remote-tracking branch 'origin/master'
authorEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Mon, 17 Feb 2014 09:00:56 +0000 (13:00 +0400)
committerEkaterina Tuzova <Ekaterina.Tuzova@jetbrains.com>
Mon, 17 Feb 2014 09:00:56 +0000 (13:00 +0400)
Conflicts:
platform/lang-impl/src/com/intellij/webcore/packaging/InstalledPackagesPanel.java

1  2 
platform/lang-impl/src/com/intellij/webcore/packaging/InstalledPackagesPanel.java
python/src/META-INF/pycharm-core.xml

index bedbc3e49e719eba15f39db1cbca759309a6e55e,913d1f465b7faf7ec3ae9c17dd0a56114f24654a..fb72486bfbab5fa90681c355d8e9c97b9b97d095
@@@ -14,9 -14,10 +14,12 @@@ import com.intellij.ui.*
  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.*;
+ import com.intellij.util.ui.StatusText;
+ import com.intellij.util.ui.UIUtil;
 +import com.intellij.util.containers.ContainerUtil;
  import org.jetbrains.annotations.NotNull;
  import org.jetbrains.annotations.Nullable;
  
@@@ -310,38 -334,53 +323,48 @@@ public class InstalledPackagesPanel ext
      return true;
    }
  
 -  private void addUninstallAction() {
 -    myUninstallButton.addActionListener(new ActionListener() {
 -      @Override
 -      public void actionPerformed(final ActionEvent e) {
 -        final List<InstalledPackage> packages = getSelectedPackages();
 -        final PackageManagementService selPackageManagementService = myPackageManagementService;
 -        if (selPackageManagementService != null) {
 -          PackageManagementService.Listener listener = new PackageManagementService.Listener() {
 +  private void uninstallAction() {
 +    final List<InstalledPackage> packages = getSelectedPackages();
 +    final PackageManagementService selPackageManagementService = myPackageManagementService;
 +    if (selPackageManagementService != null) {
 +      PackageManagementService.Listener listener = new PackageManagementService.Listener() {
 +        @Override
 +        public void operationStarted(String packageName) {
-           myPackagesTable.setPaintBusy(true);
++          UIUtil.invokeLaterIfNeeded(new Runnable() {
+             @Override
 -            public void operationStarted(String packageName) {
 -              UIUtil.invokeLaterIfNeeded(new Runnable() {
 -                @Override
 -                public void run() {
 -                  myPackagesTable.setPaintBusy(true);
 -                }
 -              });
++            public void run() {
++              myPackagesTable.setPaintBusy(true);
+             }
++          });
 +        }
  
-         public void operationFinished(String packageName, @Nullable String errorDescription) {
-           myPackagesTable.clearSelection();
-           updatePackages(selPackageManagementService);
-           myPackagesTable.setPaintBusy(false);
-           if (errorDescription == null) {
-             if (packageName != null) {
-               myNotificationArea.showSuccess("Package '" + packageName + "' successfully uninstalled");
-             }
-             else {
-               myNotificationArea.showSuccess("Packages successfully uninstalled");
 +        @Override
 -            public void operationFinished(final String packageName, @Nullable final String errorDescription) {
 -              UIUtil.invokeLaterIfNeeded(new Runnable() {
 -                @Override
 -                public void run() {
 -                  myPackagesTable.clearSelection();
 -                  updatePackages(selPackageManagementService);
 -                  myPackagesTable.setPaintBusy(false);
 -                  if (errorDescription == null) {
 -                    if (packageName != null) {
 -                      myNotificationArea.showSuccess("Package '" + packageName + "' successfully uninstalled");
 -                    }
 -                    else {
 -                      myNotificationArea.showSuccess("Packages successfully uninstalled");
 -                    }
 -                  }
 -                  else {
 -                    myNotificationArea.showError("Uninstall packages failed. <a href=\"xxx\">Details...</a>",
 -                                                 "Uninstall Packages Failed",
 -                                                 "Uninstall packages failed.\n" + errorDescription);
 -                  }
++        public void operationFinished(final String packageName, @Nullable final String errorDescription) {
++          UIUtil.invokeLaterIfNeeded(new Runnable() {
+             @Override
 -              });
++            public void run() {
++              myPackagesTable.clearSelection();
++              updatePackages(selPackageManagementService);
++              myPackagesTable.setPaintBusy(false);
++              if (errorDescription == null) {
++                if (packageName != null) {
++                  myNotificationArea.showSuccess("Package '" + packageName + "' successfully uninstalled");
+                 }
++                else {
++                  myNotificationArea.showSuccess("Packages successfully uninstalled");
++                }
++              }
++              else {
++                myNotificationArea.showError("Uninstall packages failed. <a href=\"xxx\">Details...</a>",
++                                             "Uninstall Packages Failed",
++                                             "Uninstall packages failed.\n" + errorDescription);
++              }
              }
-           }
-           else {
-             myNotificationArea.showError("Uninstall packages failed. <a href=\"xxx\">Details...</a>",
-                                          "Uninstall Packages Failed",
-                                          "Uninstall packages failed.\n" + errorDescription);
-           }
 -          };
 -          myPackageManagementService.uninstallPackages(packages, listener);
++          });
          }
 -      }
 -    });
 +      };
 +      myPackageManagementService.uninstallPackages(packages, listener);
 +    }
    }
  
    @NotNull
Simple merge