debugger.watch.return.speedup.description=Reduce watch return values overhead by applying extra filters
debugger.check.source=true
debugger.check.source.description=Check that source code matches the bytecode
+debugger.click.disable.breakpoints=false
+debugger.click.disable.breakpoints.description=Single click to disable a breakpoint, middle click to remove
analyze.exceptions.on.the.fly=false
analyze.exceptions.on.the.fly.description=Automatically analyze clipboard on frame activation,\
import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.TextRange;
+import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.pom.Navigatable;
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
XLineBreakpoint<P> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
if (breakpoint != null) {
- breakpointManager.removeBreakpoint(breakpoint);
+ if (Registry.is("debugger.click.disable.breakpoints")) {
+ breakpoint.setEnabled(!breakpoint.isEnabled());
+ }
+ else {
+ breakpointManager.removeBreakpoint(breakpoint);
+ }
}
else {
List<? extends XLineBreakpointType<P>.XLineBreakpointVariant> variants = type.computeVariants(project, position);
/*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.UserDataHolderBase;
+import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.pom.Navigatable;
import com.intellij.ui.ColorUtil;
@Override
@Nullable
public AnAction getClickAction() {
- return new RemoveBreakpointGutterIconAction(XBreakpointBase.this);
+ if (Registry.is("debugger.click.disable.breakpoints")) {
+ return new ToggleBreakpointGutterIconAction(XBreakpointBase.this);
+ } else {
+ return new RemoveBreakpointGutterIconAction(XBreakpointBase.this);
+ }
}
@Override
@Nullable
public AnAction getMiddleButtonClickAction() {
- return new ToggleBreakpointGutterIconAction(XBreakpointBase.this);
+ if (!Registry.is("debugger.click.disable.breakpoints")) {
+ return new ToggleBreakpointGutterIconAction(XBreakpointBase.this);
+ } else {
+ return new RemoveBreakpointGutterIconAction(XBreakpointBase.this);
+ }
}
@Nullable