Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-04-01 17:21:27 +0000
committerSusan Franklin2010-04-01 17:21:27 +0000
commite5bcabbccf4055b546d4eca794c8bf8b203bb0c8 (patch)
treeb9af6c7062735a8619b4c1db403ecb7fd402e697 /bundles/org.eclipse.equinox.p2.ui.admin
parent45a14df8cf2b6f896425be5d21c2da32ea598b43 (diff)
downloadrt.equinox.p2-e5bcabbccf4055b546d4eca794c8bf8b203bb0c8.tar.gz
rt.equinox.p2-e5bcabbccf4055b546d4eca794c8bf8b203bb0c8.tar.xz
rt.equinox.p2-e5bcabbccf4055b546d4eca794c8bf8b203bb0c8.zip
Bug 306583 - [ui] Prov Admin UI does not respect show by category preference
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.admin')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java12
3 files changed, 19 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
index df1c314c1..d4092e1f1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
@@ -120,6 +120,11 @@ public class MetadataRepositoriesView extends RepositoriesView {
return list;
}
+ protected void updateCachesForPreferences() {
+ // We want to reconstruct the input's query context based on the latest preferences
+ input = null;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
*/
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
index 7946d1215..43e5c566a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
@@ -207,6 +207,9 @@ public class ProfilesView extends ProvView {
}
protected ProvisioningUI getProvisioningUI() {
- return ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
+ ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
+ if (ui != null)
+ return ui;
+ return super.getProvisioningUI();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
index c6d28b7e1..63a30fd74 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
@@ -13,6 +13,8 @@ package org.eclipse.equinox.internal.p2.ui.admin;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
import org.eclipse.equinox.internal.p2.ui.actions.RefreshAction;
import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
import org.eclipse.equinox.internal.p2.ui.viewers.*;
@@ -154,7 +156,7 @@ abstract class ProvView extends ViewPart {
preferenceListener = new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (getVisualProperties().contains(event.getProperty())) {
- ProvAdminUIActivator.getDefault().initializePolicy();
+ updateCachesForPreferences();
ProvView.this.refreshAll(false);
}
}
@@ -163,6 +165,10 @@ abstract class ProvView extends ViewPart {
store.addPropertyChangeListener(preferenceListener);
}
+ protected void updateCachesForPreferences() {
+ // default is to do nothing
+ }
+
protected void removeListeners() {
if (preferenceListener != null) {
IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
@@ -244,8 +250,10 @@ abstract class ProvView extends ViewPart {
}
protected ProvisioningUI getProvisioningUI() {
- if (ui == null)
+ if (ui == null) {
ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
+ ProvUI.setQueryProvider(new QueryProvider(ui));
+ }
return ui;
}
}

Back to the top