Hide the p2 Droplets from the Available Software Sites listing.
Guard against null URI path in droplet check for Install Wizard Combo. Resolves: rhbz#1413778, rhbz#1420225
This commit is contained in:
parent
7de04d1d88
commit
e7779ed10e
|
@ -1,15 +1,19 @@
|
|||
From 3b33d9170bffa34a388f031420ce20c0618fc247 Mon Sep 17 00:00:00 2001
|
||||
From 051d84daff808349fc3eb4d44b2f9d56f7fe89ba 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.
|
||||
Subject: [PATCH] Don't show p2 Droplet locations in the UI.
|
||||
|
||||
Don't show p2 Droplets in the Repository Selection Combo Box, or in the
|
||||
Available Software Sites preferences.
|
||||
|
||||
Change-Id: I4afddffbaaeae3f33958629eebb32861087a93de
|
||||
---
|
||||
.../internal/p2/ui/dialogs/RepositorySelectionGroup.java | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
.../internal/p2/ui/dialogs/RepositorySelectionGroup.java | 14 ++++++++++++++
|
||||
.../eclipse/equinox/p2/ui/RepositoryManipulationPage.java | 15 ++++++++++++++-
|
||||
2 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
index 8d08101..59567c0 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;
|
||||
|
@ -30,7 +34,7 @@ index 8d08101..73c1e8c 100644
|
|||
+ String[] rootPaths = fragments.split(",");
|
||||
+ for (String root : rootPaths) {
|
||||
+ for (URI uri : sites) {
|
||||
+ if (uri.getPath().startsWith(root)) {
|
||||
+ if (uri.getPath() != null && uri.getPath().startsWith(root)) {
|
||||
+ tmp.remove(uri);
|
||||
+ }
|
||||
+ }
|
||||
|
@ -40,6 +44,34 @@ index 8d08101..73c1e8c 100644
|
|||
boolean hasLocalSites = getLocalSites().length > 0;
|
||||
final String[] items;
|
||||
if (hasLocalSites) {
|
||||
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
|
||||
index c0f2ca1..03515c7 100644
|
||||
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
|
||||
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
|
||||
@@ -130,9 +130,22 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
|
||||
if (cachedElements == null) {
|
||||
Object[] children = super.fetchChildren(o, monitor);
|
||||
cachedElements = new Hashtable<String, MetadataRepositoryElement>(children.length);
|
||||
+ String fragments = System.getProperty("p2.fragments");
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
if (children[i] instanceof MetadataRepositoryElement) {
|
||||
- put((MetadataRepositoryElement) children[i]);
|
||||
+ if (fragments != null) {
|
||||
+ String[] rootPaths = fragments.split(",");
|
||||
+ boolean isDroplet = false;
|
||||
+ for (String root : rootPaths) {
|
||||
+ URI childLoc = ((MetadataRepositoryElement)children[i]).getLocation();
|
||||
+ if (childLoc.getPath() != null && childLoc.getPath().startsWith(root)) {
|
||||
+ isDroplet = true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!isDroplet) {
|
||||
+ put((MetadataRepositoryElement) children[i]);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Epoch: 1
|
|||
Summary: An open, extensible IDE
|
||||
Name: eclipse
|
||||
Version: 4.6.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: EPL
|
||||
URL: http://www.eclipse.org/
|
||||
|
||||
|
@ -1127,6 +1127,11 @@ fi
|
|||
%{_libdir}/eclipse/plugins/org.eclipse.osgi.compatibility.state_*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 08 2017 Roland Grunberg <rgrunber@redhat.com> - 1:4.6.2-7
|
||||
- Hide the p2 Droplets from the Available Software Sites listing.
|
||||
- Guard against null URI path in droplet check for Install Wizard Combo.
|
||||
- Resolves: rhbz#1413778, rhbz#1420225
|
||||
|
||||
* Wed Jan 25 2017 Roland Grunberg <rgrunber@redhat.com> - 1:4.6.2-6
|
||||
- Fix bug in p2 Droplet detection of feature groups.
|
||||
|
||||
|
|
Loading…
Reference in New Issue