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 -->
|
<!-- Debug view context menu contributions -->
|
||||||
<extension point="org.eclipse.ui.popupMenus">
|
<extension point="org.eclipse.ui.popupMenus">
|
||||||
<viewerContribution
|
<objectContribution
|
||||||
id="org.eclipse.dd.dsf.debug.ui.DebugView.context"
|
adaptable="false"
|
||||||
targetID="org.eclipse.debug.ui.DebugView">
|
id="org.eclipse.dd.dsf.debug.ui.objectContribution.incompleteStack"
|
||||||
|
objectClass="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.launch.StackFramesVMNode$IncompleteStackVMContext">
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.launch.actions.ExpandStackAction"
|
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"
|
label="%action.expandStack.label"
|
||||||
menubarPath="renderGroup">
|
menubarPath="renderGroup">
|
||||||
<enablement>
|
|
||||||
<pluginState
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui"
|
|
||||||
value="activated">
|
|
||||||
</pluginState>
|
|
||||||
</enablement>
|
|
||||||
</action>
|
</action>
|
||||||
<visibility>
|
</objectContribution>
|
||||||
<pluginState
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui"
|
|
||||||
value="activated">
|
|
||||||
</pluginState>
|
|
||||||
</visibility>
|
|
||||||
</viewerContribution>
|
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -21,12 +21,14 @@ import org.eclipse.dd.dsf.ui.viewmodel.IVMNode;
|
||||||
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
|
import org.eclipse.ui.IObjectActionDelegate;
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increment the (temporary) stack limit for the selected stack.
|
* 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)
|
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||||
|
@ -76,4 +78,10 @@ public class ExpandStackAction extends AbstractVMProviderActionDelegate {
|
||||||
}
|
}
|
||||||
getAction().setEnabled(enabled);
|
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