[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-debug-dev] Customize memory monitor label
|
Hi,
I have a question about a problem which has been posted some time
ago.(see below or
http://dev.eclipse.org/mhonarc/lists/platform-debug-dev/msg01042.html)
Unfortunately I was not able to manage with the proposed solution. I had
the impression that #getAdapter() would eventually be asked for an
IAsynchronousLabelAdapter, but this is not the case somehow. The
#getAdapter() Method does get asked for an IElementLabelProvider and
when I return a customized DebugElementLabelProvider I am actually able
to change the label of the memory monitor (displayed on the left side)
to whatever I want.
Although I somehow managed with my problem, I would like to understand
why the proposed solution did not work. I would very much appreciate it
if someone could provide more details.
Best regards,
Jan.
The posted problem:
> 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.
>> 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.)