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

Bug 339289

Summary: [Memory Browser] Need a way to change the rendering type of the active tab
Product: [Tools] CDT Reporter: Norman Yee <normankyee>
Component: cdt-memoryAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, john.cortell, jonah
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/84748
Whiteboard:
Attachments:
Description Flags
selectRendering() patch, including fixes for bugs 338545 and 338589
none
Fix none

Description Norman Yee CLA 2011-03-08 16:57:56 EST
Build Identifier: I20110127-2034

If the user creates a tab with one rendering type and wants to change the tab's rendering type to something else without creating another tab, you currently can't do that in the memory browser view.

E.g., I want to be able to right click on an existing memory tab, select a rendering type from a context menu, and then the memory contents would be displayed in the selected rendering type.


Reproducible: Always

Steps to Reproduce:
1. Set the default rendering to "Traditional" by clicking on Default Rendering/Traditional in the local pulldown menu
2. Type an address
3. Press the "New tab" button

If you want to display the memory in "Integer" instead, you have to:

4. Set the default rendering to "Integer"
5. Press the "New tab" button

It would be easier if you could just right click on the memory browser tab, and select "Integer" from a context menu instead.
Comment 1 Norman Yee CLA 2011-03-09 08:50:13 EST
I implemented it by:

1) adding a public selectRendering() method to MemoryBrowser.java. It takes a rendering type id parameter which specifies the new rendering type.  selectRendering() updates the active tab's memory contents with the new rendering type.

2) in my debugger plugin, I added to the memory tab, a context menu that lists the available rendering types.  When the user clicks on one of the available rendering types, it invokes selectRendering() with the selected rendering type id.

I'll attach a patch for selectRendering() since I would like this method included in the memory browser plugin.
Comment 2 Norman Yee CLA 2011-03-09 08:55:08 EST
Created attachment 190754 [details]
selectRendering() patch, including fixes for bugs 338545 and 338589
Comment 3 Norman Yee CLA 2011-03-09 13:02:31 EST
Created attachment 190779 [details]
Fix
Comment 4 John Cortell CLA 2011-03-11 16:26:07 EST
Quick question: there is no "Integer" option in the "Default Rendering" menu. Are you using some custom renderings in your product?
Comment 5 Norman Yee CLA 2011-03-11 16:35:00 EST
(In reply to comment #4)
> Quick question: there is no "Integer" option in the "Default Rendering" menu.
> Are you using some custom renderings in your product?

Yup.
Comment 6 Eclipse Genie CLA 2016-11-09 11:23:29 EST
New Gerrit change created: https://git.eclipse.org/r/84748