mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 08:45:44 +02:00
Bug 394183 - MIBreakpointChangedEvent causing NullPointerException in
View Model Change-Id: I33559d798f218d358eb491d426f680cfe85ebe13 Reviewed-on: https://git.eclipse.org/r/10337 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
54ae5864d7
commit
4af3066d40
2 changed files with 32 additions and 18 deletions
|
@ -218,20 +218,27 @@ public class CLIEventProcessor
|
|||
{
|
||||
// We know something change, we just do not know what.
|
||||
// So the easiest way is to let the top layer handle it.
|
||||
MIEvent<?> event = new MIBreakpointChangedEvent(
|
||||
DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class), 0);
|
||||
IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class);
|
||||
if (bpTargetDmc != null) {
|
||||
MIEvent<?> event = new MIBreakpointChangedEvent(bpTargetDmc, 0);
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
} else if (isSettingSignal(operation)) {
|
||||
// We do no know which signal let the upper layer find it.
|
||||
MIEvent<?> event = new MISignalChangedEvent(
|
||||
DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class), ""); //$NON-NLS-1$
|
||||
ISignalsDMContext signalDmc = DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class);
|
||||
if (signalDmc != null) {
|
||||
MIEvent<?> event = new MISignalChangedEvent(signalDmc, ""); //$NON-NLS-1$
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
} else if (isDetach(operation)) {
|
||||
// if it was a "detach" command change the state.
|
||||
MIEvent<?> event = new MIDetachedEvent(DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class), token);
|
||||
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
||||
if (controlDmc != null) {
|
||||
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int getSteppingOperationKind(String operation) {
|
||||
// Get the command name.
|
||||
|
|
|
@ -169,20 +169,27 @@ public class CLIEventProcessor_7_0
|
|||
{
|
||||
// We know something change, we just do not know what.
|
||||
// So the easiest way is to let the top layer handle it.
|
||||
MIEvent<?> event = new MIBreakpointChangedEvent(
|
||||
DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class), 0);
|
||||
IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class);
|
||||
if (bpTargetDmc != null) {
|
||||
MIEvent<?> event = new MIBreakpointChangedEvent(bpTargetDmc, 0);
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
} else if (isSettingSignal(operation)) {
|
||||
// We do no know which signal let the upper layer find it.
|
||||
MIEvent<?> event = new MISignalChangedEvent(
|
||||
DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class), ""); //$NON-NLS-1$
|
||||
ISignalsDMContext signalDmc = DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class);
|
||||
if (signalDmc != null) {
|
||||
MIEvent<?> event = new MISignalChangedEvent(signalDmc, ""); //$NON-NLS-1$
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
} else if (isDetach(operation)) {
|
||||
// if it was a "detach" command change the state.
|
||||
MIEvent<?> event = new MIDetachedEvent(DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class), token);
|
||||
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
||||
if (controlDmc != null) {
|
||||
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
|
||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int getSteppingOperationKind(String operation) {
|
||||
int type = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue