do not show slowness warning for emulated breakpoints

This commit is contained in:
Egor.Ushakov
2016-10-28 15:37:35 +03:00
parent eb5a2c20ef
commit 7eebc85df8
3 changed files with 8 additions and 2 deletions
@@ -113,7 +113,12 @@ public class BreakpointManager {
private static boolean checkAndNotifyPossiblySlowBreakpoint(XBreakpoint breakpoint) {
if (breakpoint.isEnabled() &&
(breakpoint.getType() instanceof JavaMethodBreakpointType || breakpoint.getType() instanceof JavaWildcardMethodBreakpointType)) {
XDebugSessionImpl.NOTIFICATION_GROUP.createNotification("Method breakpoints may dramatically slow down debugging", MessageType.WARNING)
Breakpoint bpt = getJavaBreakpoint(breakpoint);
if (bpt instanceof MethodBreakpoint && ((MethodBreakpoint)bpt).isEmulated()) {
return false;
}
XDebugSessionImpl.NOTIFICATION_GROUP
.createNotification(DebuggerBundle.message("method.breakpoints.slowness.warning"), MessageType.WARNING)
.notify(((XBreakpointBase)breakpoint).getProject());
return true;
}
@@ -455,7 +455,7 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
return false;
}
private boolean isEmulated() {
public boolean isEmulated() {
return getProperties().EMULATED && Registry.is("debugger.emulate.method.breakpoints");
}