mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 324613 - [disassembly] maximizing then minimizing causes debug stack view event to force return to PC
This commit is contained in:
parent
a860620fab
commit
6b44ff1ead
1 changed files with 15 additions and 10 deletions
|
@ -10,16 +10,15 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
|
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
|
||||||
|
|
||||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
import org.eclipse.debug.ui.DebugUITools;
|
||||||
|
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
||||||
|
import org.eclipse.debug.ui.contexts.IDebugContextListener;
|
||||||
import org.eclipse.jface.action.IMenuManager;
|
import org.eclipse.jface.action.IMenuManager;
|
||||||
import org.eclipse.jface.action.Separator;
|
import org.eclipse.jface.action.Separator;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
|
||||||
import org.eclipse.ui.IActionBars;
|
import org.eclipse.ui.IActionBars;
|
||||||
import org.eclipse.ui.IMemento;
|
import org.eclipse.ui.IMemento;
|
||||||
import org.eclipse.ui.ISelectionListener;
|
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
import org.eclipse.ui.IViewSite;
|
import org.eclipse.ui.IViewSite;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
|
||||||
import org.eclipse.ui.PartInitException;
|
import org.eclipse.ui.PartInitException;
|
||||||
import org.eclipse.ui.actions.ActionFactory;
|
import org.eclipse.ui.actions.ActionFactory;
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ import org.eclipse.ui.actions.ActionFactory;
|
||||||
*/
|
*/
|
||||||
public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
|
|
||||||
private ISelectionListener fDebugViewListener;
|
private IDebugContextListener fDebugContextListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -61,10 +60,13 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
*/
|
*/
|
||||||
public void init(IViewSite site, IMemento memento) throws PartInitException {
|
public void init(IViewSite site, IMemento memento) throws PartInitException {
|
||||||
setSite(site);
|
setSite(site);
|
||||||
site.getPage().addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, fDebugViewListener= new ISelectionListener() {
|
DebugUITools.getDebugContextManager().addDebugContextListener(fDebugContextListener = new IDebugContextListener() {
|
||||||
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
|
public void debugContextChanged(DebugContextEvent event) {
|
||||||
updateDebugContext();
|
if ((event.getFlags() & DebugContextEvent.ACTIVATED) != 0) {
|
||||||
}});
|
updateDebugContext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -95,7 +97,10 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, fDebugViewListener);
|
if (fDebugContextListener != null) {
|
||||||
|
DebugUITools.getDebugContextManager().removeDebugContextListener(fDebugContextListener);
|
||||||
|
fDebugContextListener = null;
|
||||||
|
}
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue