From ce8050740b895a3aa92920a57e2fb3359dc6b733 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Thu, 14 May 2026 06:26:09 +0200 Subject: [PATCH] Remove dead commented-out code in DiscoveryInstallOperation The two commented-out blocks have been unreachable since 2019 (commit 1139fc569). One block sits after a return statement; the other is an old ProvisioningUtil call replaced by RepositoryTracker. Both are safe to delete. --- .../operations/DiscoveryInstallOperation.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java index 9d22595ae5..53e55c9173 100644 --- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java +++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java @@ -121,33 +121,6 @@ public IInstallableUnit[] computeInstallableUnits(SubMonitor monitor) throws Cor checkForUnavailable(installableUnits); return installableUnits.toArray(new IInstallableUnit[installableUnits.size()]); - // MultiStatus status = new MultiStatus(DiscoveryUi.ID_PLUGIN, 0, - // Messages.PrepareInstallProfileJob_ok, null); - // ius = installableUnits.toArray(new - // IInstallableUnit[installableUnits.size()]); - // ProfileChangeRequest profileChangeRequest = - // InstallAction.computeProfileChangeRequest(ius, profileId, - // status, new SubProgressMonitor(monitor, installableConnectors.size())); - // if (status.getSeverity() > IStatus.WARNING) { - // throw new CoreException(status); - // } - // if (profileChangeRequest == null) { - // // failed but no indication as to why - // throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, - // Messages.PrepareInstallProfileJob_computeProfileChangeRequestFailed, null)); - // } - // PlannerResolutionOperation operation = new PlannerResolutionOperation( - // Messages.PrepareInstallProfileJob_calculatingRequirements, profileId, - // profileChangeRequest, null, - // status, true); - // IStatus operationStatus = operation.execute(new SubProgressMonitor(monitor, - // installableConnectors.size())); - // if (operationStatus.getSeverity() > IStatus.WARNING) { - // throw new CoreException(operationStatus); - // } - // - // plannerResolutionOperation = operation; - } catch (URISyntaxException e) { // should never happen, since we already validated URLs. throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, @@ -282,9 +255,6 @@ private List addRepositories(SubMonitor monitor) if (repositoryLocations.add(uri)) { checkCancelled(monitor); repositoryTracker.addRepository(uri, null, session); - // ProvisioningUtil.addMetaDataRepository(url.toURI(), true); - // ProvisioningUtil.addArtifactRepository(url.toURI(), true); - // ProvisioningUtil.setColocatedRepositoryEnablement(url.toURI(), true); } monitor.worked(1); }