Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359207 - Memory Browser: Cell edit modification font color
Summary: Memory Browser: Cell edit modification font color
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-memory (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Pawel Piech CLA
QA Contact: Ted Williams CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 06:55 EDT by Andre St. Laurent CLA
Modified: 2011-10-11 09:27 EDT (History)
4 users (show)

See Also:
Randy.Rohrbach: review+


Attachments
Patch to fix the "edit cell" issue (14.95 KB, patch)
2011-10-05 14:49 EDT, Andre St. Laurent CLA
pawel.1.piech: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre St. Laurent CLA 2011-09-28 06:55:39 EDT
Build Identifier: I20110613-1736

Under some circumstances, when you edit a cell in the Memory Browser View the font color does not change to red to indicate the change.

More specifically, when you edit a cell outside of the area visible in the view (i.e. you scroll up or down and edit a cell at an address that wasn't initially visible) the color doesn't change.  The reason for this is that the history cache, which is used to track cell contents (and memory) changes, is synchronized with the range of addresses visible in the view.  When the view is scrolled, the history cache is not update correctly.

---

I'll provide a patch for this issue.

Reproducible: Always

Steps to Reproduce:
1. Enter a variable in the Memory Browser view expression field
2. Vertically scroll the view a line or two, in any direction
3. Edit a cell at an address that was not initially visible, and finish
   the operation by entering a carriage return.
4. Note that the font does not turn red to indicate the memory contents
   were modified.
Comment 1 Andre St. Laurent CLA 2011-10-05 14:49:23 EDT
Created attachment 204619 [details]
Patch to fix the "edit cell" issue

This patch fixes the issue described above.
Comment 2 Andre St. Laurent CLA 2011-10-05 15:28:35 EDT
The patch I attached maintains and synchronizes the internal memory history cache with the data cache.  This provides a way for the view to determine if a cell has been modified, and to apply a font color change (typically red) to the edited cell that indicates that a change has been made.

There are a five cases (actually, only four are interesting) that are handled by this patch, with comments describing each case included in the code.
Comment 3 Pawel Piech CLA 2011-10-05 18:53:29 EDT
I committed the fix after a quick test.  Thanks Andre.
Comment 4 CDT Genie CLA 2011-10-05 19:23:07 EDT
*** cdt git genie on behalf of Pawel Piech ***

    Bug 359207 - Memory Browser: Cell edit modification font color

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=fbb828d0caca593fdd8ac855a9fde038c1f78340
Comment 5 Pawel Piech CLA 2011-10-05 23:55:29 EDT
CQ:WIND00242972
Comment 6 Randy Rohrbach CLA 2011-10-11 09:27:11 EDT
I reviewed Andre's patch and for the most part it looks OK.

Pictorial layout would have helped and there are a couple of 
redundant checks, but nothing that makes the logic wrong.

Randy