Skip to main content

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

Hi,

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">
      <handler
              class="com.mycompany.debugger.actions.ViewMemoryHandler"
              commandId="org.eclipse.cdt.debug.ui.commands.viewMemory">
            <activeWhen>
                <with variable="selection">
                    <iterate operator="and">
                        <instanceof value="org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.VariableVMNode$VariableExpressionVMC">
                        </instanceof>
                    </iterate>
                    <count value="+">
                    </count>
                </with>
            </activeWhen>             
      </handler>
   </extension>

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':
HandlerActivation(commandId=org.eclipse.cdt.debug.ui.commands.viewMemory,
    handler=com.mycompany.debugger.actions.ViewMemoryHandler,
    _expression_=org.eclipse.core.internal.expressions.WithExpression@b415e7a1,sourcePriority=1073741824)
HandlerActivation(commandId=org.eclipse.cdt.debug.ui.commands.viewMemory,
    handler=org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.actions.DsfViewMemoryHandler,
    _expression_=org.eclipse.core.internal.expressions.WithExpression@b415e7a1,sourcePriority=1073741824)

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





Back to the top