From 406c75c027f41ae3c3253f4df64e3c54e5754ca0 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Fri, 25 Sep 2009 21:22:39 +0000 Subject: [PATCH] Typo fix and documentation enhancement --- .../ui/viewmodel/update/AbstractCachingVMProvider.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java index 293d5b2afab..001738899c2 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java @@ -229,6 +229,13 @@ public class AbstractCachingVMProvider extends AbstractVMProvider */ Map fArchiveProperties = null; + /** + * Ensure this cache entry has a map in which to hold the children + * elements. If it doesn't, create one and give it an initial capacity + * of 30% more than the number of children we know the parent currently + * has (give it some room to grow). If we don't know the child count, + * give the map some nominal initial capacity. + */ void ensureChildrenMap() { if (fChildren == null) { Integer childrenCount = fChildrenCount; @@ -454,7 +461,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider new ViewerDataRequestMonitor(getExecutor(), update) { @Override protected void handleCompleted() { - // Update completed. Write value to cache only if update successed + // Update completed. Write value to cache only if update succeeded // and the cache entry wasn't flushed in the mean time. if(isSuccess()) { if (flushCounter == entry.fFlushCounter) {