fix bug 9800 - add back in missing children of nested source paths
authortimkelly
Thu, 10 Sep 2009 14:08:35 -0500
changeset 95 fafaec74d446
parent 94 1bce8db24d38
child 96 defec9d2b40a
fix bug 9800 - add back in missing children of nested source paths
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 12:47:57 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java	Thu Sep 10 14:08:35 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) {