void (@NotNull ProgressIndicator indicator) { List<? extends InstalledPackage> packages = List.of(); try { packages = packageManagementService.getInstalledPackagesList(); } catch (ExecutionException e) { LOG.warn(e.getMessage()); // do nothing, we already have an empty list } finally { final Map<String, RepoPackage> cache = buildNameToPackageMap(packageManagementService.getAllPackagesCached()); final boolean shouldFetchLatestVersionsForOnlyInstalledPackages = shouldFetchLatestVersionsForOnlyInstalledPackages(); if (cache.isEmpty()) { if (!shouldFetchLatestVersionsForOnlyInstalledPackages) { refreshLatestVersions(packageManagementService); } } List<Object[]> rows = ContainerUtil.map(packages, pkg -> new Object[]{ pkg, pkg.getVersion(), getVersionString(cache.get(pkg.getName())) }); UIUtil.invokeLaterIfNeeded(() -> { if (packageManagementService == myPackageManagementService) { myPackagesTableModel.getDataVector().clear(); for (Object[] row : rows) { myPackagesTableModel.addRow(row); } if (!cache.isEmpty()) { onUpdateFinished(); } if (shouldFetchLatestVersionsForOnlyInstalledPackages) { setLatestVersionsForInstalledPackages(); } } }); } }