I’m working on a machine with word addresses. So
I want the memory block address in the memory view to be words. So I’ve
set getAddressableSize() to 4 for IMemoryBlockExtension.
public class
AmbricExtendedMemory extends AmbricDebugElement implements IMemoryBlockExtension, ILabelDecorator {
…
public int getAddressableSize() throws DebugException {
return 4;
}
…
}
The problem when I do this is the memory view tries to
concatenate four words together in one column of the memory view. This is
very hard to read. I can right click on the memory view and select the
format menu item to set the column size to 1, and the row size to 8 to make
things display reasonably. My problem is that I want to be able to do
this programmatically. For my memory type I want the default format to be
as I have specified. But I can not find any APIs which are public.
For example going through the eclipse debugger source I found
IPersistableDebugElement dictates the format of a memory block.
package org.eclipse.debug.internal.ui.memory;
public interface
IPersistableDebugElement {
public Object getProperty(Object
context, String propertyId) throws CoreException;
}
This interface will allow me to set the row and column
size. The problem is that it is in an internal package. The
property ID is also internal. Further it is in a UI project, while my
memory block implementation is in ambric.debug.core project. It
would be inappropriate for the core to reach in to the UI.
Declaring an adapter using the org.eclipse.core.runtime.adapaters
extension doesn’t work. The eclipse debug code for getting the
format via IPersistibleDebugElement does not use adapter manager.
Any suggestions on how to define a default format for my
memory block.
I’m using Eclipse 3.3.2.
Thanks,
Chris Genly