List<RepoPackage> () { // Make a copy, since ManagePackagesDialog attempts to change the passed in collection directly final List<RepoPackage> result = new ArrayList<>(); if (!PyPackageService.getInstance().PYPI_REMOVED) { result.addAll(getCachedPyPIPackages()); } result.addAll(PyPIPackageUtil.INSTANCE.getAdditionalPackages(getAdditionalRepositories())); return result; }