1
0
Fork 0
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:
Marc Khouzam 2013-02-13 10:24:12 -05:00
parent 54ae5864d7
commit 4af3066d40
2 changed files with 32 additions and 18 deletions

View file

@ -218,18 +218,25 @@ 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);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
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$
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
// We do no know which signal let the upper layer find it.
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);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
if (controlDmc != null) {
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
}
}
}

View file

@ -169,18 +169,25 @@ 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);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
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$
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
// We do no know which signal let the upper layer find it.
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);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
if (controlDmc != null) {
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
}
}
}