1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[254637] [disassembly] DSF Disassembly is not in the default list of views in Debug perspective

This commit is contained in:
Anton Leherbauer 2008-11-11 11:25:35 +00:00
parent d2dd59a361
commit 06d745b184
2 changed files with 34 additions and 1 deletions

View file

@ -571,5 +571,22 @@
</action>
</actionSet>
</extension>
<!-- Debug perspective extension -->
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.debug.ui.DebugPerspective">
<view
relative="org.eclipse.ui.views.ContentOutline"
visible="false"
relationship="stack"
id="org.eclipse.dd.dsf.debug.ui.disassembly.view">
</view>
<viewShortcut
id="org.eclipse.dd.dsf.debug.ui.disassembly.view">
</viewShortcut>
</perspectiveExtension>
</extension>
</plugin>

View file

@ -14,11 +14,17 @@ import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
import org.eclipse.cdt.debug.core.model.ITargetProperties;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.eclipse.dd.dsf.debug.internal.ui.DsfDebugUIPlugin;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
/**
*/
public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProperties {
private static final String ID_DISASSEMBLY_VIEW= "org.eclipse.dd.dsf.debug.ui.disassembly.view"; //$NON-NLS-1$
private final Preferences fPreferences;
public DsfSteppingModeTarget() {
@ -31,6 +37,16 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
*/
public void enableInstructionStepping(boolean enabled) {
fPreferences.setValue(PREF_INSTRUCTION_STEPPING_MODE, enabled);
if (enabled) {
try {
final IWorkbenchWindow activeWorkbenchWindow= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (activeWorkbenchWindow != null && activeWorkbenchWindow.getActivePage() != null) {
activeWorkbenchWindow.getActivePage().showView(ID_DISASSEMBLY_VIEW);
}
} catch (PartInitException exc) {
DsfDebugUIPlugin.log(exc);
}
}
}
/*