Hide the p2 Droplets from cluttering Install Wizard Combo.

- Resolves: rhbz#1413778
This commit is contained in:
Roland Grunberg 2017-01-24 12:45:32 -05:00
parent 3196467104
commit 6d183461b5
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 3b33d9170bffa34a388f031420ce20c0618fc247 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Wed, 18 Jan 2017 15:51:40 -0500
Subject: [PATCH] Don't show p2 Droplets in the Repository Selection Combo Box.
Change-Id: I4afddffbaaeae3f33958629eebb32861087a93de
---
.../internal/p2/ui/dialogs/RepositorySelectionGroup.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
index 8d08101..73c1e8c 100644
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
+import java.util.List;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
@@ -314,6 +315,19 @@ public class RepositorySelectionGroup {
void fillRepoCombo(final String selection) {
RepositoryTracker tracker = ui.getRepositoryTracker();
URI[] sites = tracker.getKnownRepositories(ui.getSession());
+ String fragments = System.getProperty("p2.fragments");
+ List<URI> tmp = new ArrayList<URI>(Arrays.asList(sites));
+ if (fragments != null) {
+ String[] rootPaths = fragments.split(",");
+ for (String root : rootPaths) {
+ for (URI uri : sites) {
+ if (uri.getPath().startsWith(root)) {
+ tmp.remove(uri);
+ }
+ }
+ }
+ }
+ sites = tmp.toArray(new URI[0]);
boolean hasLocalSites = getLocalSites().length > 0;
final String[] items;
if (hasLocalSites) {
--
2.9.3

View File

@ -47,7 +47,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: 4.6.2
Release: 4%{?dist}
Release: 5%{?dist}
License: EPL
URL: http://www.eclipse.org/
@ -133,6 +133,9 @@ Patch28: prefer_x11_backend.patch
# A real solution should eventually come from https://bugs.eclipse.org/bugs/show_bug.cgi?id=499717
Patch29: port_to_ant_1.10.patch
# Hide the p2 Droplets from cluttering Install Wizard Combo
Patch30: eclipse-hide-droplets-from-install-wizard.patch
BuildRequires: tycho >= 0.25.0
BuildRequires: tycho-extras >= 0.25.0
BuildRequires: cbi-plugins
@ -386,6 +389,7 @@ tar --strip-components=1 -xf %{SOURCE1}
%patch27
%patch28
%patch29
%patch30
# Use ecj when bootstrapping
%if %{bootstrap}
@ -1123,6 +1127,10 @@ fi
%{_libdir}/eclipse/plugins/org.eclipse.osgi.compatibility.state_*
%changelog
* Tue Jan 24 2017 Roland Grunberg <rgrunber@redhat.com> - 1:4.6.2-5
- Hide the p2 Droplets from cluttering Install Wizard Combo.
- Resolves: rhbz#1413778
* Mon Jan 16 2017 Mat Booth <mat.booth@redhat.com> - 1:4.6.2-4
- Fix last javax.annotation reference