do not remove a breakpoint on alt-click outside of the icon and do not change it...
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 28 Sep 2016 14:02:54 +0000 (17:02 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 28 Sep 2016 14:04:32 +0000 (17:04 +0300)
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointUtil.java

index 52b20cedad9eb71b8d12150f28d77ec8f92797b2..a357b81da38bd5597b4d016ede7ab16c8cbfcda9 100644 (file)
@@ -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);
           }
         }
index 8cfbcfffb79454d55f3828946e392ddff1a1baff..3b6c42086a6c362e162b08fd3679eba7ce102ed0 100644 (file)
@@ -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