Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] Memory View: Memory renderings that work in Eclipse 3.1 -> do not work in 3.2

Hi Elin,

After calling this line of code, did you see a page added in the Memory
View, asking you to select a rendering to add?
               DebugPlugin.getDefault().getMemoryBlockManager().
                  addMemoryBlocks(new IMemoryBlock[] {memoryBlock});

If you select something from the debug view, does the Memory View show
anything?

Please also check that your memory block and memory block retrieval extends
from PlatformObject. Make sure that the #getAdapter(...) method calls its
super if it cannot recognize the class that it needs to adapt to.  It is
required for the Memory View to fetch the appropriate adapters to populate
the view.

Hope this helps...
Samantha



                                                                           
             "Elin Karasalo"                                               
             <elin.karasalo@en                                             
             ea.com>                                                    To 
             Sent by:                  <platform-debug-dev@xxxxxxxxxxx>    
             platform-debug-de                                          cc 
             v-bounces@eclipse                                             
             .org                                                  Subject 
                                       [platform-debug-dev] Memory View:   
                                       Memory renderings that work in      
             08/28/2006 10:11          Eclipse 3.1 -> do not work in 3.2   
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             "Eclipse Platform                                             
              Debug component                                              
             developers list."                                             
             <platform-debug-d                                             
              ev@xxxxxxxxxxx>                                              
                                                                           
                                                                           




Hi,

I use this class (below) for displaying memory with the Memory Viewer in

Eclipse 3.1.
However when using the same class in Eclipse 3.2, this does not work.
Nothing happens. The Memory View opens, but it is empty and there are no

exceptions, error messages or anything.

What am I missing? What has been changed between 3.1 and 3.2 to cause
this?

I am grateful to get some help.


- Elin Karasalo



__________________________________________________________________

public abstract class AbstractShowMemoryAction extends Action
{
   protected static final String ID_MEMORY_VIEW =
      "org.eclipse.debug.ui.MemoryView";

   protected static final String ID_RENDERING_RAW_MEMORY =
      "org.eclipse.debug.ui.rendering.raw_memory";

   protected static final String ID_RENDERING_VIEW_PANE =
      "org.eclipse.debug.ui.MemoryView.RenderingViewPane.1";

   public AbstractShowMemoryAction(String text)
   {
      super(text);
   }

   protected void showMemory(Target target, int pid, long address)
      throws CoreException
   {
      IWorkbenchPage page =

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      if (page != null)
      {
         IViewPart view = page.showView(ID_MEMORY_VIEW);
         if (view instanceof IMemoryRenderingSite)
         {
            OseDebugTarget debugTarget =
               OseDebugTarget.createDebugTarget(target);
            if (debugTarget != null)
            {
               IMemoryBlock memoryBlock;
               IMemoryRenderingType renderingType;

               memoryBlock = debugTarget.getMemoryBlockRetrieval().
                  getExtendedMemoryBlock(pid, address);
               DebugPlugin.getDefault().getMemoryBlockManager().
                  addMemoryBlocks(new IMemoryBlock[] {memoryBlock});
               renderingType = DebugUITools.getMemoryRenderingManager().
                  getRenderingType(ID_RENDERING_RAW_MEMORY);
               if (renderingType != null)
               {
                  IMemoryRenderingContainer renderingContainer =
                     ((IMemoryRenderingSite) view).getContainer(

ID_RENDERING_VIEW_PANE);
                  if (renderingContainer != null)
                  {
                     IMemoryRendering rendering = renderingType.

createRendering();
                     rendering.init(renderingContainer, memoryBlock);
                     renderingContainer.addMemoryRendering(rendering);
                  }
               }
            }
         }
      }
   }
}

_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev




Back to the top