Problem:
Some of the C/C++ contributed actions to Debug related to views have no visibility control. They are always shown up irrespective of C/C++ launch configuration available in Debug View.
This distracts the developers who have JDT and CDT both and use them independently.
Example: Instruction Stepping Mode
We need to restrict their visibility only when there is an active C/C++ application being run/debug.
Analysis:Instruction Stepping Mode is contributed to org.eclipse.debug.ui.DebugView using extension point <extension point="org.eclipse.ui.viewActions">. This extension point does not support <visibleWhen> expression.
Also this extension point is deprecated.
Solution:
Replace the <extension point="org.eclipse.ui.viewActions"> with the <menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=additions"> and migrate <action id="org.eclipse.cdt.debug.internal.ui.actions.ToggleInstructionStepModeActionDelegate" /> to <command commandId="org.eclipse.cdt.debug.internal.ui.actions.ToggleInstructionStepModeCommand"/>.
We can migrate one action at time. We can start with Instruction Stepping Mode
Problem: Some of the C/C++ contributed actions to Debug related to views have no visibility control. They are always shown up irrespective of C/C++ launch configuration available in Debug View. This distracts the developers who have JDT and CDT both and use them independently. Example:
We need to restrict their visibility only when there is an active C/C++ application being run/debug.
Instruction Stepping Mode
Analysis:
Instruction Stepping Mode
is contributed toorg.eclipse.debug.ui.DebugView
using extension point<extension point="org.eclipse.ui.viewActions">
. This extension point does not support<visibleWhen>
expression. Also this extension point is deprecated.Solution: Replace the
<extension point="org.eclipse.ui.viewActions">
with the<menuContribution locationURI="toolbar:org.eclipse.debug.ui.DebugView?after=additions">
and migrate<action id="org.eclipse.cdt.debug.internal.ui.actions.ToggleInstructionStepModeActionDelegate" />
to<command commandId="org.eclipse.cdt.debug.internal.ui.actions.ToggleInstructionStepModeCommand"/>
.We can migrate one action at time. We can start with
Instruction Stepping Mode