mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
XDebugger: @Nullable XBreakpoint.getProperties()
This commit is contained in:
@@ -544,16 +544,22 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
|
||||
}
|
||||
|
||||
public void addExceptionBreakpoint(XBreakpoint<? extends ExceptionBreakpointProperties> breakpoint) {
|
||||
myRegisteredExceptionBreakpoints.put(breakpoint.getProperties().getException(), breakpoint);
|
||||
ExceptionBreakpointProperties properties = breakpoint.getProperties();
|
||||
if (properties == null) return;
|
||||
|
||||
myRegisteredExceptionBreakpoints.put(properties.getException(), breakpoint);
|
||||
if (isConnected()) {
|
||||
myDebugger.addExceptionBreakpoint(breakpoint.getProperties());
|
||||
myDebugger.addExceptionBreakpoint(properties);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeExceptionBreakpoint(XBreakpoint<? extends ExceptionBreakpointProperties> breakpoint) {
|
||||
myRegisteredExceptionBreakpoints.remove(breakpoint.getProperties().getException());
|
||||
ExceptionBreakpointProperties properties = breakpoint.getProperties();
|
||||
if (properties == null) return;
|
||||
|
||||
myRegisteredExceptionBreakpoints.remove(properties.getException());
|
||||
if (isConnected()) {
|
||||
myDebugger.removeExceptionBreakpoint(breakpoint.getProperties());
|
||||
myDebugger.removeExceptionBreakpoint(properties);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,18 +225,24 @@ public class PyExceptionBreakpointType
|
||||
|
||||
@Override
|
||||
public void saveTo(@NotNull XBreakpoint<PyExceptionBreakpointProperties> breakpoint) {
|
||||
breakpoint.getProperties().setNotifyOnTerminate(myNotifyOnTerminateCheckBox.isSelected());
|
||||
PyExceptionBreakpointProperties properties = breakpoint.getProperties();
|
||||
if (properties == null) return;
|
||||
|
||||
properties.setNotifyOnTerminate(myNotifyOnTerminateCheckBox.isSelected());
|
||||
|
||||
breakpoint.getProperties().setNotifyAlways(myNotifyOnRaiseCheckBox.isSelected() && myAlwaysRadio.isSelected());
|
||||
breakpoint.getProperties().setNotifyOnlyOnFirst(myNotifyOnRaiseCheckBox.isSelected() && myOnlyOnFirstRadio.isSelected());
|
||||
properties.setNotifyAlways(myNotifyOnRaiseCheckBox.isSelected() && myAlwaysRadio.isSelected());
|
||||
properties.setNotifyOnlyOnFirst(myNotifyOnRaiseCheckBox.isSelected() && myOnlyOnFirstRadio.isSelected());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadFrom(@NotNull XBreakpoint<PyExceptionBreakpointProperties> breakpoint) {
|
||||
myNotifyOnTerminateCheckBox.setSelected(breakpoint.getProperties().isNotifyOnTerminate());
|
||||
PyExceptionBreakpointProperties properties = breakpoint.getProperties();
|
||||
if (properties == null) return;
|
||||
|
||||
myNotifyOnTerminateCheckBox.setSelected(properties.isNotifyOnTerminate());
|
||||
|
||||
boolean always = breakpoint.getProperties().isNotifyAlways();
|
||||
boolean onFirst = breakpoint.getProperties().isNotifyOnlyOnFirst();
|
||||
boolean always = properties.isNotifyAlways();
|
||||
boolean onFirst = properties.isNotifyOnlyOnFirst();
|
||||
|
||||
setNotifyOnRaiseSelected(always || onFirst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user