Community
Participate
Working Groups
Build Identifier: 3.7 M6 I20110310-1119 If variables/expressions/registers view supports individual element format and a value is being displayed with its element format rather than view's preferred format, then the cell modifier for that value should try to get element format to fill edit box, instead of using the preferred format. Reproducible: Always Steps to Reproduce: 1. Make a row element to use a number format that is different than preferred format of the view. 2. Edit the value column of the element. 3. The edit text box comes up but is filled with a value using preferred format. We expect the text box shows a value using the element format -- the same format that is being used to display the value in the view when it is not in editing mode.
Created attachment 193408 [details] bug fix The fix modifies VariableCellModifier, RegisterCellModifier, RegisterBitFieldModifier, and WatchExpressionCellModifier in org.eclipse.cdt.dsf.ui. The fix relies a change in InternalTreeModifier.CellModifierProxy (in org.eclipse.debug.ui) to communicate more detailed information about the element being modified. See its markCellBeingModified method for details.
(In reply to comment #1) > The fix relies a change in InternalTreeModifier.CellModifierProxy (in > org.eclipse.debug.ui) to communicate more detailed information about the > element being modified. See its markCellBeingModified method for details. I don't think using the presentation context for this purpose is going to be acceptable. You could file a separate bug with platform debug to extend the cell modifier API to use full tree paths, but we'd need support from jface to make that happen, which is not likely. I hate to say it, but you're more likely to have success adjusting the individual cell format logic to handle the element and not use a full path.
Created attachment 193428 [details] patch Please review the patch for 3.7 M7.
Created attachment 193991 [details] patch In response to Pawel's comment (comment #2), this patch does not require InternalTreeModelViewer to provide a fully qualifed tree path. Please review this patch. I would like it to be included in 3.6 M7.
I looked at this patch, it looks fine to me. However, I would like to see the duplicated code refactored to the base WatchExpressionCellModifier class.
Created attachment 194298 [details] bug fix This patch puts the common code into the WatchExpresionCellModifier.
Thanks Winnie. Committed to HEAD.
*** cdt cvs genie on behalf of pchuong *** Bug 343021 - variable/expression/register cell modifier need to try to get element format when in editing values [*] RegisterBitFieldCellModifier.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterBitFieldCellModifier.java?root=Tools_Project&r1=1.4&r2=1.5 [*] RegisterCellModifier.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/RegisterCellModifier.java?root=Tools_Project&r1=1.4&r2=1.5 [*] WatchExpressionCellModifier.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java?root=Tools_Project&r1=1.2&r2=1.3 [*] VariableCellModifier.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java?root=Tools_Project&r1=1.7&r2=1.8