void (@NotNull AnActionEvent e) { myPackages.setPaintBusy(true); final Application application = ApplicationManager.getApplication(); application.executeOnPooledThread(() -> { try { myController.reloadAllPackages(); initModel(); myPackages.setPaintBusy(false); } catch (final IOException e1) { application.invokeLater(() -> { Messages.showErrorDialog(myMainPanel, IdeBundle.message("error.updating.package.list", e1.getMessage()), IdeBundle.message("action.AnActionButton.text.reload.list.of.packages")); LOG.info("Error updating list of repository packages", e1); myPackages.setPaintBusy(false); }, ModalityState.any()); } }); }