mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Bug 81353: automatically opening of the disassembly window.
This commit is contained in:
parent
ae433567af
commit
20f943f626
3 changed files with 30 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-06-10 Mikhail Khodjaiants
|
||||
Bug 81353: automatically opening of the disassembly window.
|
||||
* ToggleInstructionStepModeActionDelegate.java
|
||||
* ICDebugUIConstants.java
|
||||
|
||||
2005-06-10 Mikhail Khodjaiants
|
||||
Warning cleanup.
|
||||
* AddExpressionEditorActionDelegate.java
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||
|
||||
import org.eclipse.cdt.debug.core.model.ICDebugTarget;
|
||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.cdt.debug.ui.ICDebugUIConstants;
|
||||
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
|
||||
import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
|
||||
import org.eclipse.debug.core.model.IDebugElement;
|
||||
|
@ -21,6 +23,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
|||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.ui.IViewActionDelegate;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.actions.ActionDelegate;
|
||||
|
||||
/**
|
||||
|
@ -32,6 +35,8 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
|
|||
|
||||
private IAction fAction = null;
|
||||
|
||||
private IViewPart fView;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
|
||||
*/
|
||||
|
@ -50,6 +55,7 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
|
|||
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
||||
*/
|
||||
public void init( IViewPart view ) {
|
||||
fView = view;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -76,9 +82,18 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
|
|||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void run( IAction action ) {
|
||||
boolean enabled = getAction().isChecked();
|
||||
ICDebugTarget target = getTarget();
|
||||
if ( target != null ) {
|
||||
target.enableInstructionStepping( getAction().isChecked() );
|
||||
target.enableInstructionStepping( enabled );
|
||||
if ( enabled ) {
|
||||
try {
|
||||
getView().getSite().getPage().showView( ICDebugUIConstants.ID_DISASSEMBLY_VIEW );
|
||||
}
|
||||
catch( PartInitException e ) {
|
||||
CDebugUIPlugin.log( e.getStatus() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,4 +150,8 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private IViewPart getView() {
|
||||
return fView;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,11 @@ public interface ICDebugUIConstants {
|
|||
|
||||
public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Disassembly view identifier (value <code>"org.eclipse.cdt.debug.ui.DisassemblyView"</code>).
|
||||
*/
|
||||
public static final String ID_DISASSEMBLY_VIEW = PREFIX + "DisassemblyView"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Modules view identifier (value <code>"org.eclipse.cdt.debug.ui.ModulesView"</code>).
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue