From bf034bfc419d857c97c4890159ae0d8bba1ef67e Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 4 Mar 2011 19:03:30 +0000 Subject: [PATCH] Bug 338472: Pinned view should blank out when session terminated --- .../cdt/dsf/gdb/internal/ui/GdbPinProvider.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java index a864326cd9c..454801fc89b 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java @@ -34,6 +34,8 @@ import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData; import org.eclipse.cdt.dsf.debug.service.IRunControl.IExitedDMEvent; import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent; import org.eclipse.cdt.dsf.debug.service.IRunControl.IStartedDMEvent; +import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext; +import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent; import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.StateChangedEvent; import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext; import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext; @@ -337,6 +339,11 @@ public class GdbPinProvider implements IPinProvider { } } + @DsfServiceEventHandler + public void handleEvent(final ICommandControlShutdownDMEvent event) { + doHandleEvent(event, IPinModelListener.EXITED); + } + @DsfServiceEventHandler public void handleEvent(final IExitedDMEvent event) { doHandleEvent(event, IPinModelListener.EXITED); @@ -383,6 +390,12 @@ public class GdbPinProvider implements IPinProvider { } continue; } + + // If we got a shutdown event + if (eventDmc instanceof ICommandControlDMContext) { + fireModleChangeEvent(listener, notificationId); + continue; + } } } }