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,18 +218,25 @@ public class CLIEventProcessor
|
||||||
{
|
{
|
||||||
// We know something change, we just do not know what.
|
// We know something change, we just do not know what.
|
||||||
// So the easiest way is to let the top layer handle it.
|
// So the easiest way is to let the top layer handle it.
|
||||||
MIEvent<?> event = new MIBreakpointChangedEvent(
|
IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class);
|
||||||
DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class), 0);
|
if (bpTargetDmc != null) {
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
MIEvent<?> event = new MIBreakpointChangedEvent(bpTargetDmc, 0);
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
} else if (isSettingSignal(operation)) {
|
} else if (isSettingSignal(operation)) {
|
||||||
// We do no know which signal let the upper layer find it.
|
// We do no know which signal let the upper layer find it.
|
||||||
MIEvent<?> event = new MISignalChangedEvent(
|
ISignalsDMContext signalDmc = DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class);
|
||||||
DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class), ""); //$NON-NLS-1$
|
if (signalDmc != null) {
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
MIEvent<?> event = new MISignalChangedEvent(signalDmc, ""); //$NON-NLS-1$
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
} else if (isDetach(operation)) {
|
} else if (isDetach(operation)) {
|
||||||
// if it was a "detach" command change the state.
|
// 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);
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
if (controlDmc != null) {
|
||||||
|
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,18 +169,25 @@ public class CLIEventProcessor_7_0
|
||||||
{
|
{
|
||||||
// We know something change, we just do not know what.
|
// We know something change, we just do not know what.
|
||||||
// So the easiest way is to let the top layer handle it.
|
// So the easiest way is to let the top layer handle it.
|
||||||
MIEvent<?> event = new MIBreakpointChangedEvent(
|
IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class);
|
||||||
DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class), 0);
|
if (bpTargetDmc != null) {
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
MIEvent<?> event = new MIBreakpointChangedEvent(bpTargetDmc, 0);
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
} else if (isSettingSignal(operation)) {
|
} else if (isSettingSignal(operation)) {
|
||||||
// We do no know which signal let the upper layer find it.
|
// We do no know which signal let the upper layer find it.
|
||||||
MIEvent<?> event = new MISignalChangedEvent(
|
ISignalsDMContext signalDmc = DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class);
|
||||||
DMContexts.getAncestorOfType(dmc, ISignalsDMContext.class), ""); //$NON-NLS-1$
|
if (signalDmc != null) {
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
MIEvent<?> event = new MISignalChangedEvent(signalDmc, ""); //$NON-NLS-1$
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
} else if (isDetach(operation)) {
|
} else if (isDetach(operation)) {
|
||||||
// if it was a "detach" command change the state.
|
// 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);
|
||||||
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
if (controlDmc != null) {
|
||||||
|
MIEvent<?> event = new MIDetachedEvent(controlDmc, token);
|
||||||
|
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue