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

Bug 237800

More cleanup
This commit is contained in:
Marc Khouzam 2008-06-20 16:37:07 +00:00
parent 4d078d0bc6
commit f62d14b16b
3 changed files with 14 additions and 7 deletions

View file

@ -138,7 +138,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
*/ */
@Immutable @Immutable
protected static class RunControlEvent<V extends IDMContext, T extends MIEvent<? extends IDMContext>> extends AbstractDMEvent<V> protected static class RunControlEvent<V extends IDMContext, T extends MIEvent<? extends IDMContext>> extends AbstractDMEvent<V>
implements IDMEvent<V>, IMIDMEvent<T> implements IDMEvent<V>, IMIDMEvent
{ {
final private T fMIInfo; final private T fMIInfo;
public RunControlEvent(V dmc, T miInfo) { public RunControlEvent(V dmc, T miInfo) {

View file

@ -37,12 +37,13 @@ import org.eclipse.dd.dsf.service.AbstractDsfService;
import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
import org.eclipse.dd.dsf.service.DsfSession; import org.eclipse.dd.dsf.service.DsfSession;
import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.internal.MIPlugin;
import org.eclipse.dd.mi.service.MIRunControl.SuspendedEvent;
import org.eclipse.dd.mi.service.command.AbstractMIControl; import org.eclipse.dd.mi.service.command.AbstractMIControl;
import org.eclipse.dd.mi.service.command.commands.MIStackInfoDepth; import org.eclipse.dd.mi.service.command.commands.MIStackInfoDepth;
import org.eclipse.dd.mi.service.command.commands.MIStackListArguments; import org.eclipse.dd.mi.service.command.commands.MIStackListArguments;
import org.eclipse.dd.mi.service.command.commands.MIStackListFrames; import org.eclipse.dd.mi.service.command.commands.MIStackListFrames;
import org.eclipse.dd.mi.service.command.commands.MIStackListLocals; import org.eclipse.dd.mi.service.command.commands.MIStackListLocals;
import org.eclipse.dd.mi.service.command.events.IMIDMEvent;
import org.eclipse.dd.mi.service.command.events.MIEvent;
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent; import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
import org.eclipse.dd.mi.service.command.output.MIArg; import org.eclipse.dd.mi.service.command.output.MIArg;
import org.eclipse.dd.mi.service.command.output.MIFrame; import org.eclipse.dd.mi.service.command.output.MIFrame;
@ -592,8 +593,14 @@ public class MIStack extends AbstractDsfService
public void eventDispatched(ISuspendedDMEvent e) { public void eventDispatched(ISuspendedDMEvent e) {
fMICommandCache.setContextAvailable(e.getDMContext(), true); fMICommandCache.setContextAvailable(e.getDMContext(), true);
fMICommandCache.reset(); fMICommandCache.reset();
if (e instanceof SuspendedEvent) {
fCachedStoppedEvent = ((SuspendedEvent)e).getMIEvent();
}
} }
@DsfServiceEventHandler
public void eventDispatched(IMIDMEvent e) {
MIEvent<? extends IDMContext> miEvent = e.getMIEvent();
if (miEvent instanceof MIStoppedEvent) {
fCachedStoppedEvent = (MIStoppedEvent)miEvent;
}
}
} }

View file

@ -15,6 +15,6 @@ import org.eclipse.dd.dsf.datamodel.IDMContext;
/** /**
* Common interface for events that are directly caused by some MI event. * Common interface for events that are directly caused by some MI event.
*/ */
public interface IMIDMEvent<V extends MIEvent<? extends IDMContext>> { public interface IMIDMEvent {
public V getMIEvent(); public MIEvent<? extends IDMContext> getMIEvent();
} }