EA-88707 - assert: FileDocumentManagerImpl.saveDocument
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 20 Sep 2016 11:31:50 +0000 (14:31 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 20 Sep 2016 11:31:50 +0000 (14:31 +0300)
platform/lang-impl/src/com/intellij/webcore/packaging/InstalledPackagesPanel.java

index 97b6573c6ce9fcb015f803517520295b114b49b8..8e22fc71fd3efb10fa86b8c275f7cd7f0b82288a 100644 (file)
@@ -208,19 +208,20 @@ public class InstalledPackagesPanel extends JPanel {
         }
 
         ApplicationManager.getApplication().invokeLater(() -> {
+          ModalityState modalityState = ModalityState.current();
           final PackageManagementService.Listener listener = new PackageManagementService.Listener() {
             @Override
             public void operationStarted(final String packageName) {
-              UIUtil.invokeLaterIfNeeded(() -> {
+              ApplicationManager.getApplication().invokeLater(() -> {
                 myPackagesTable.setPaintBusy(true);
                 myCurrentlyInstalling.add(packageName);
-              });
+              }, modalityState);
             }
 
             @Override
             public void operationFinished(final String packageName,
                                           @Nullable final PackageManagementService.ErrorDescription errorDescription) {
-              UIUtil.invokeLaterIfNeeded(() -> {
+              ApplicationManager.getApplication().invokeLater(() -> {
                 myPackagesTable.clearSelection();
                 updatePackages(selPackageManagementService);
                 myPackagesTable.setPaintBusy(false);
@@ -236,7 +237,7 @@ public class InstalledPackagesPanel extends JPanel {
                 if (myCurrentlyInstalling.isEmpty() && !myWaitingToUpgrade.isEmpty()) {
                   upgradePostponedPackages();
                 }
-              });
+              }, modalityState);
             }
           };
           PackageManagementServiceEx serviceEx = getServiceEx();