mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 242662 - [debug view] Rework ExpandStackAction to an object contribution
This commit is contained in:
parent
55a4d47017
commit
0414df9ea1
2 changed files with 15 additions and 18 deletions
|
@ -531,28 +531,17 @@
|
|||
|
||||
<!-- Debug view context menu contributions -->
|
||||
<extension point="org.eclipse.ui.popupMenus">
|
||||
<viewerContribution
|
||||
id="org.eclipse.dd.dsf.debug.ui.DebugView.context"
|
||||
targetID="org.eclipse.debug.ui.DebugView">
|
||||
<objectContribution
|
||||
adaptable="false"
|
||||
id="org.eclipse.dd.dsf.debug.ui.objectContribution.incompleteStack"
|
||||
objectClass="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.launch.StackFramesVMNode$IncompleteStackVMContext">
|
||||
<action
|
||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.launch.actions.ExpandStackAction"
|
||||
id="org.eclipse.dd.dsf.debug.ui.retrieveMoreFrames"
|
||||
id="org.eclipse.dd.dsf.debug.ui.action.expandStack"
|
||||
label="%action.expandStack.label"
|
||||
menubarPath="renderGroup">
|
||||
<enablement>
|
||||
<pluginState
|
||||
id="org.eclipse.dd.dsf.debug.ui"
|
||||
value="activated">
|
||||
</pluginState>
|
||||
</enablement>
|
||||
</action>
|
||||
<visibility>
|
||||
<pluginState
|
||||
id="org.eclipse.dd.dsf.debug.ui"
|
||||
value="activated">
|
||||
</pluginState>
|
||||
</visibility>
|
||||
</viewerContribution>
|
||||
</objectContribution>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -21,12 +21,14 @@ import org.eclipse.dd.dsf.ui.viewmodel.IVMNode;
|
|||
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.ui.IObjectActionDelegate;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
/**
|
||||
* Increment the (temporary) stack limit for the selected stack.
|
||||
*/
|
||||
public class ExpandStackAction extends AbstractVMProviderActionDelegate {
|
||||
public class ExpandStackAction extends AbstractVMProviderActionDelegate implements IObjectActionDelegate {
|
||||
|
||||
/*
|
||||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
|
@ -76,4 +78,10 @@ public class ExpandStackAction extends AbstractVMProviderActionDelegate {
|
|||
}
|
||||
getAction().setEnabled(enabled);
|
||||
}
|
||||
|
||||
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
|
||||
if (targetPart instanceof IViewPart) {
|
||||
init((IViewPart) targetPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue