@Nullable XBreakpoint.getProperties reverted

+review CR-IC-2418
This commit is contained in:
Anton Makeev
2013-09-20 13:04:11 +02:00
parent e8e05bf4ef
commit af1b464d50
2 changed files with 10 additions and 22 deletions
@@ -544,22 +544,16 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
}
public void addExceptionBreakpoint(XBreakpoint<? extends ExceptionBreakpointProperties> breakpoint) {
ExceptionBreakpointProperties properties = breakpoint.getProperties();
if (properties == null) return;
myRegisteredExceptionBreakpoints.put(properties.getException(), breakpoint);
myRegisteredExceptionBreakpoints.put(breakpoint.getProperties().getException(), breakpoint);
if (isConnected()) {
myDebugger.addExceptionBreakpoint(properties);
myDebugger.addExceptionBreakpoint(breakpoint.getProperties());
}
}
public void removeExceptionBreakpoint(XBreakpoint<? extends ExceptionBreakpointProperties> breakpoint) {
ExceptionBreakpointProperties properties = breakpoint.getProperties();
if (properties == null) return;
myRegisteredExceptionBreakpoints.remove(properties.getException());
myRegisteredExceptionBreakpoints.remove(breakpoint.getProperties().getException());
if (isConnected()) {
myDebugger.removeExceptionBreakpoint(properties);
myDebugger.removeExceptionBreakpoint(breakpoint.getProperties());
}
}
@@ -225,24 +225,18 @@ public class PyExceptionBreakpointType
@Override
public void saveTo(@NotNull XBreakpoint<PyExceptionBreakpointProperties> breakpoint) {
PyExceptionBreakpointProperties properties = breakpoint.getProperties();
if (properties == null) return;
properties.setNotifyOnTerminate(myNotifyOnTerminateCheckBox.isSelected());
breakpoint.getProperties().setNotifyOnTerminate(myNotifyOnTerminateCheckBox.isSelected());
properties.setNotifyAlways(myNotifyOnRaiseCheckBox.isSelected() && myAlwaysRadio.isSelected());
properties.setNotifyOnlyOnFirst(myNotifyOnRaiseCheckBox.isSelected() && myOnlyOnFirstRadio.isSelected());
breakpoint.getProperties().setNotifyAlways(myNotifyOnRaiseCheckBox.isSelected() && myAlwaysRadio.isSelected());
breakpoint.getProperties().setNotifyOnlyOnFirst(myNotifyOnRaiseCheckBox.isSelected() && myOnlyOnFirstRadio.isSelected());
}
@Override
public void loadFrom(@NotNull XBreakpoint<PyExceptionBreakpointProperties> breakpoint) {
PyExceptionBreakpointProperties properties = breakpoint.getProperties();
if (properties == null) return;
myNotifyOnTerminateCheckBox.setSelected(properties.isNotifyOnTerminate());
myNotifyOnTerminateCheckBox.setSelected(breakpoint.getProperties().isNotifyOnTerminate());
boolean always = properties.isNotifyAlways();
boolean onFirst = properties.isNotifyOnlyOnFirst();
boolean always = breakpoint.getProperties().isNotifyAlways();
boolean onFirst = breakpoint.getProperties().isNotifyOnlyOnFirst();
setNotifyOnRaiseSelected(always || onFirst);