do not remove a breakpoint on alt-click outside of the icon and do not change it to temporary

This commit is contained in:
Egor.Ushakov
2016-09-28 17:04:32 +03:00
parent f3a059d01e
commit 4c4e6e68d3
2 changed files with 6 additions and 10 deletions
@@ -156,7 +156,7 @@ public class XDebuggerUtilImpl extends XDebuggerUtil {
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
XLineBreakpoint<P> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
if (breakpoint != null) {
if (!Registry.is("debugger.click.disable.breakpoints")) {
if (!temporary && !Registry.is("debugger.click.disable.breakpoints")) {
breakpointManager.removeBreakpoint(breakpoint);
}
}
@@ -151,15 +151,11 @@ public class XBreakpointUtil {
int maxPriority = 0;
for (XLineBreakpointType<?> type : lineTypes) {
maxPriority = Math.max(maxPriority, type.getPriority());
final XLineBreakpoint<? extends XBreakpointProperties> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
if (breakpoint != null && temporary && !breakpoint.isTemporary()) {
breakpoint.setTemporary(true);
}
else if (type.canPutAt(file, line, project) || breakpoint != null) {
if (typeWinner == null || type.getPriority() > typeWinner.getPriority()) {
typeWinner = type;
lineWinner = line;
}
XLineBreakpoint<? extends XBreakpointProperties> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
if ((type.canPutAt(file, line, project) || breakpoint != null) &&
(typeWinner == null || type.getPriority() > typeWinner.getPriority())) {
typeWinner = type;
lineWinner = line;
}
}
// already found max priority type - stop