[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-debug-dev] Programmatically adding memory monitor and rendering
|
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
you.)
Samantha
Derek Morris
<dmsubs@consertum
.com> To
Sent by: "Eclipse Platform Debug component
platform-debug-de developers list."
v-bounces@eclipse <platform-debug-dev@xxxxxxxxxxx>
.org cc
Subject
08/15/2006 01:20 Re: [platform-debug-dev]
PM Programmatically adding memory
monitor and rendering
Please respond to
"Eclipse Platform
Debug component
developers list."
<platform-debug-d
ev@xxxxxxxxxxx>
Samantha,
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 :
address <render_name>. I see it gets the text from a decorator, but can't
see
how to provide my own.
2. It appears that the text for the memory monitors is the expression used
to
create the monitor (in my case a memory address). Is it possible to
override so
that I can provide more descriptive text to my user? For example, the
memory
location (which I add programmatically) has an address (0x12345678) and a
name
(such as "Video memory"). I would like "Video memory" to be displayed.
--
Derek
Samantha Chan wrote:
> Hi Derek -
>
> The Memory View is an instance of IMemoryRenderingSite. So, once you get
a
> hold to the Memory View, cast it to an IMemoryRenderingSite.
> IMemoryRenderingSite has two methods that allow you to get to the
> containers:
> #getMemoryRenderingContainers()
> #getContainer(String id)
>
> I have code sample from this bug that should help you with this task:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=87374
>
> Regarding the MemoryViewUtil#getMemoryBlockRetrieval method, this method
is
> currently internal and may change in future releases. If you require
this
> to be a public API, please submit an enhancement request and we will
> consider making this as an API in the future.
>
> Thanks...
> Samantha
>
>
>
>
> Derek Morris
> <dmsubs@consertum
> .com>
To
> Sent by: "Eclipse Platform Debug component
> platform-debug-de developers list."
> v-bounces@eclipse <platform-debug-dev@xxxxxxxxxxx>
> .org
cc
>
>
Subject
> 08/15/2006 09:42 [platform-debug-dev]
> AM Programmatically adding memory
> monitor and rendering
>
> Please respond to
> "Eclipse Platform
> Debug component
> developers list."
> <platform-debug-d
> ev@xxxxxxxxxxx>
>
>
>
>
>
>
> Hi,
>
> I am trying to programmatically add a memory monitor and it's rendering.
I
> have
> written the code that adds the monitor to the memory view, but there is
no
> rendering (user has to select from the rendering dialog).
>
> So, I am now trying to add an appropriate rendering for the monitor. The
> problem
> I have is how to find the IMemoryRenderingContainer. I see there is an
> getmemoryRenderingContainer() method in the AbstractMemoryRendering
class,
> 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
> gives
> me compilation warnings as it is internal (restricted). Is there any plan
> to
> make the useful methods in MemoryViewUtil more publicly available (and
> therefore
> stable from change?)
>
> Thanks,
> ---
> Derek
> --
> Derek
> _______________________________________________
> platform-debug-dev mailing list
> platform-debug-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-debug-dev
>
>
> _______________________________________________
> platform-debug-dev mailing list
> platform-debug-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-debug-dev
>
_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev