Bug 10282 - Rendering of changed variables
Summary: Rendering of changed variables
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 9051 (view as bug list)
Depends on: 11116
Blocks:
  Show dependency tree
 
Reported: 2002-02-26 12:49 EST by Darin Wright CLA
Modified: 2002-04-08 17:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2002-02-26 12:49:13 EST
Need to render changed variables in "accessible" way. Using color is not a good 
solution.
Comment 1 Darin Wright CLA 2002-02-26 13:02:54 EST
Need proposal on how to make rendering of changed variables generic accross 
debug models. Support is in debug UI. For example:

- different fonts, outlining, backgrounds, overlays...
Comment 2 Darin Wright CLA 2002-02-28 12:52:34 EST
*** Bug 9051 has been marked as a duplicate of this bug. ***
Comment 3 Darin Swanson CLA 2002-03-11 11:27:42 EST
Note (from the newsgroup)
we have just released code for Windows that will do this (it is in the
nightly builds but I recommend you wait for the next integration build).
There is new API on TableItem and TreeItem called setForeground() and
setBackground(). The implementation for this functionality on motif,
photon
and gtk will also be available shortly.

I don't believe this is any better for accessibility but could be combined with 
overlays to really stand out.
Comment 4 Darin Wright CLA 2002-03-15 10:55:36 EST
Decision is to user red labels for changing variables. Icons/text color are not 
accessible, and this feature is understood to be non-accessible friendly. 
However, red text is better than grey labels.
Comment 5 Darin Wright CLA 2002-04-01 10:19:00 EST
This is the agreed upon approach:

IVariable implements the following method 

/** 
 * Returns whether this variable's value has changed since the last suspend 
event. 
 * Implementations may choose whether the last suspend event is the last 
suspend 
 * event in this variable's debug target, or within the thread(s) in which this 
variable 
 * is visible. 
 * 
 * @return whether this variable's value has changed since the last suspend 
event 
 * @exception DebugException if an exception occurrs determining if this 
variable's 
 *   value has changed since the last suspend event 
 */ 
public boolean hasValueChanged() throws DebugException; 



The "changed" information is kept in the model, and has the following benefits 
(side effects?):

* a model may determine the granularity at which change information is kept - 
i.e. whether a change in a subvariable shows as changes in a containing 
variable, or whether change information is kept just for stepping, or also 
accross thread resume/suspends. 
* each variable view will show the same information (the feature is not 
view/time dependent) 
* if a view is closed/opened it can still show the information 
* the view does not have to cache and compare values 
* a presentation may display state in anyway it chooses, as the model contains 
the state, rather than a view 

I propose that we have a global preference to display changed values in a user 
specified color (default is red). Debug presentations that choose to may also 
use custom icons and text. 

-----------

The java debug model has to implement this support by having a debug target 
keep a suspend count, and each variable has to keep a "last changed" count 
(relative to the target suspend count). Whenever a variable retrieves its 
value, and it has changed, it updates its change count to the current suspend 
count. The #hasChanged method returns whether its count == target suspend count 
(if it is less, it has not changed).
Comment 6 Darin Wright CLA 2002-04-04 16:10:24 EST
I added the required API to IVariable and implemented the support in the java 
debug model. I updated the variables view to use the new API, but it still uses 
the old disabled images.  (I wanted to get the API changes in before M5)

Left to do:
* use red text instead of disabled images
* remove disabled image cache/support
* remove preference to turn the changes on/off - it will always be on
Comment 7 Darin Swanson CLA 2002-04-04 21:53:58 EST
Implemented in VariableViewer, VariableView, DebugPreferencePage, 
IDebugUIConstants and IDebugPreferenceConstants.
Comment 8 Darin Swanson CLA 2002-04-04 21:54:12 EST
Please verify.
Comment 9 Darin Wright CLA 2002-04-08 17:34:03 EDT
Verified.