Bug 339289 - [Memory Browser] Need a way to change the rendering type of the active tab
Summary: [Memory Browser] Need a way to change the rendering type of the active tab
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-memory (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 16:57 EST by Norman Yee CLA
Modified: 2020-09-04 15:19 EDT (History)
3 users (show)

See Also:


Attachments
selectRendering() patch, including fixes for bugs 338545 and 338589 (20.12 KB, patch)
2011-03-09 08:55 EST, Norman Yee CLA
no flags Details | Diff
Fix (20.14 KB, patch)
2011-03-09 13:02 EST, Norman Yee CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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