Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 202680

Summary: [update policy] Cache should use full element path as keys to cache data.
Product: [Tools] CDT Reporter: Pawel Piech <pawel.1.piech>
Component: cdt-debug-dsfAssignee: Randy Rohrbach <Randy.Rohrbach>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cdtdoug, Randy.Rohrbach
Version: 0 DD 1.0   
Target Milestone: DD 1.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 202678    
Bug Blocks:    
Attachments:
Description Flags
Update changing the key used in cache object. cdtdoug: iplog-

Description Pawel Piech CLA 2007-09-07 14:50:35 EDT
Created attachment 77903 [details]
Update changing the key used in cache object.

Currently the cache implementation uses only the element object as the keys to the cached values.  However some elements may appear in different places in the viewer hierarchy, causing the cache to return invalid data.  

Additionally the cache key should also use the viewer input as part of the key, since the viewer input is not part of the element path as returned by IViewerUpdate.

I'm attaching a patch to fix this bug in cache. However this patch depends on another patch to IViewerUpdate in platform debug.
Comment 1 Pawel Piech CLA 2008-02-14 12:34:17 EST
This bug was fixed along with other view model and cache refactoring.
Randy please review.
Comment 2 Randy Rohrbach CLA 2008-05-12 17:05:47 EDT
I noticed a bug on line 297. The line

if(!fChildren.containsKey(update.getElement()))

shold be

if(!fChildren.containsKey(updateKey))

howvere, this code is fairly old and has been totally rewritten by Pawel just a little while ago. So it is moot and I am declaring it verified from that point.

Randy
Comment 3 Pawel Piech CLA 2008-08-13 13:06:52 EDT
Closing out 1.0 bugs.