merge bug 9800 from tip RCL_2_2
authortimkelly
Tue, 13 Oct 2009 11:12:39 -0500
branchRCL_2_2
changeset 102 7da6a5d316ff
parent 92 b9db47a83dd8
child 107 50bdf9ce2ff9
child 109 5b92ed8df841
merge bug 9800 from tip
cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java	Wed Sep 09 11:11:36 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java	Tue Oct 13 11:12:39 2009 -0500
@@ -535,11 +535,17 @@
 			}
 		} catch (CModelException e) {
 		}
-		if (objects == null || objects.length == 0) {
-			return children;
+		
+		Object[] result = children;
+		if (missingElements.size() > 0) {
+            result = concatenate(result, missingElements.toArray());
 		}
-		Object[] result = concatenate(children, objects);
-		return concatenate(result, missingElements.toArray());
+
+		if (objects != null && objects.length > 0) {
+			result = concatenate(result, objects);
+		}
+
+		return result;
 	}
 
 	private List<ICElement> getMissingElements(ICContainer container, ICElement[] elements) {