20347 [Usability] Improve how Select Required handles closed/missing update sites
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
index 73eff3d..bffeab7 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -284,6 +284,8 @@
if (!problematic && featureIsProblematic) {
Object parent = ((TreeContentProvider)treeViewer.getContentProvider()).getParent(obj);
+ if(parent == null)
+ return super.getImage(obj);
problematic = treeViewer.getChecked(parent) && !treeViewer.getGrayed(parent);
}
@@ -663,6 +665,9 @@
public void widgetSelected(SelectionEvent e) {
BusyIndicator.showWhile(e.display, new Runnable() {
public void run() {
+ Object[] elements = treeViewer.getExpandedElements();
+ treeViewer.expandAll();
+ treeViewer.setExpandedElements(elements);
selectRequiredFeatures();
updateItemCount();
}