[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-debug-dev] Programmatically adding memory monitor and rendering
- From: Samantha Chan <chanskw@xxxxxxxxxx>
- Date: Tue, 15 Aug 2006 13:59:47 -0400
- Delivered-to: firstname.lastname@example.org
Hi Derek -
1. To customize the rendering label:
>From your memory block, provide an ILabelDecorator adapter. (i.e. return
an ILabelDecorator when #getAdapter(adapter) is called.) You label
decorator will be called when the rendering tries to construct the label.
You will be given the original label and the rendering when
ILabelDecorator#decorateText(...) is called.
2. To customize the labels from the tree view pane, you need to provide
your own label adapter to your memory block. From your memory block,
override the #getAdapter() method and return an IAsynchronousLabelAdapter
when needed. The label adapter will be called whenever the memory block's
label is needed from the Memory View. For an example implementation of the
label adapter, look at MemoryBlockLabelAdapter. (Please note that there
are other ways of providing adapters to your debug elements. You may want
to look at the tutorial form EclipseCon to figure out which way is best for
Sent by: "Eclipse Platform Debug component
platform-debug-de developers list."
08/15/2006 01:20 Re: [platform-debug-dev]
PM Programmatically adding memory
monitor and rendering
Please respond to
Thanks - that works. Now some more questions:
1. I am using the standard memory viewer with my custom rendering. Is it
possible to override the text in the rendering tab? It currently says
address <render_name>. I see it gets the text from a decorator, but can't
how to provide my own.
2. It appears that the text for the memory monitors is the expression used
create the monitor (in my case a memory address). Is it possible to
that I can provide more descriptive text to my user? For example, the
location (which I add programmatically) has an address (0x12345678) and a
(such as "Video memory"). I would like "Video memory" to be displayed.
Samantha Chan wrote:
> Hi Derek -
> The Memory View is an instance of IMemoryRenderingSite. So, once you get
> hold to the Memory View, cast it to an IMemoryRenderingSite.
> IMemoryRenderingSite has two methods that allow you to get to the
> #getContainer(String id)
> I have code sample from this bug that should help you with this task:
> Regarding the MemoryViewUtil#getMemoryBlockRetrieval method, this method
> currently internal and may change in future releases. If you require
> to be a public API, please submit an enhancement request and we will
> consider making this as an API in the future.
> Derek Morris
> Sent by: "Eclipse Platform Debug component
> platform-debug-de developers list."
> v-bounces@eclipse <platform-debug-dev@xxxxxxxxxxx>
> 08/15/2006 09:42 [platform-debug-dev]
> AM Programmatically adding memory
> monitor and rendering
> Please respond to
> "Eclipse Platform
> Debug component
> developers list."
> I am trying to programmatically add a memory monitor and it's rendering.
> written the code that adds the monitor to the memory view, but there is
> rendering (user has to select from the rendering dialog).
> So, I am now trying to add an appropriate rendering for the monitor. The
> I have is how to find the IMemoryRenderingContainer. I see there is an
> getmemoryRenderingContainer() method in the AbstractMemoryRendering
> but I
> am not writing a rendering, I just want to display an existing one!
> Another (unrelated) question:
> Also, I am using MemoryViewUtil.getmemoryBlockRetrieval (which works) but
> me compilation warnings as it is internal (restricted). Is there any plan
> make the useful methods in MemoryViewUtil more publicly available (and
> stable from change?)
> platform-debug-dev mailing list
> platform-debug-dev mailing list
platform-debug-dev mailing list