Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How do I override the Variable view's View Memory handler?

Hi Norman,


It doesn’t look like you can override the DsfViewMemoryHandler. However, there are couple options that you can consider.


1.       Have your own hander that will open the memory browser

2.       Have your own VariableExpressionVMC i.e NormanVMC

3.       Extends DsfViewMemoryHandler to read a preference i.e use memory browser or memory view. I think this approach will benefit others as well.




From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Norman Yee
Sent: Thursday, August 25, 2011 4:34 PM
To: CDT General developers list.
Subject: [cdt-dev] How do I override the Variable view's View Memory handler?




In the Variables view, you can right click on a variable and select View Memory from the context menu to display the variable in a Memory view.  I want to override the View Memory handler from my DSF debugger plugin so that it displays the variable in the Memory Browser view instead.


I've already written the view memory handler class and in my DSF debugger plugin.xml file, I added an org.eclipse.ui.handlers extentsion point like this:


   <extension point="org.eclipse.ui.handlers">
                <with variable="selection">
                    <iterate operator="and">
                        <instanceof value="org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.VariableVMNode$VariableExpressionVMC">
                    <count value="+">


When I launch Eclipse and right click on a variable in the Variables view, I get a handler conflict:


!ENTRY org.eclipse.ui.workbench
!MESSAGE A handler conflict occurred.  This may disable some commands.
!SUBENTRY 1 org.eclipse.ui.workbench
!MESSAGE Conflict for 'org.eclipse.cdt.debug.ui.commands.viewMemory':


Is there a way to override the DsfViewMemoryHandler with my handler?





Back to the top