show breakpoint sign if stopped on method/field breakpoint

This commit is contained in:
Egor.Ushakov
2015-02-26 16:23:48 +03:00
parent 5c89b02232
commit a68e81ad7c
4 changed files with 23 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -181,4 +181,9 @@ public class JavaFieldBreakpointType extends JavaLineBreakpointTypeBase<JavaFiel
public Breakpoint createJavaBreakpoint(Project project, XBreakpoint breakpoint) {
return new FieldBreakpoint(project, breakpoint);
}
@Override
public boolean canBeHitInOtherPlaces() {
return true;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -127,4 +127,9 @@ public class JavaMethodBreakpointType extends JavaLineBreakpointTypeBase<JavaMet
public Breakpoint createJavaBreakpoint(Project project, XBreakpoint breakpoint) {
return new MethodBreakpoint(project, breakpoint);
}
@Override
public boolean canBeHitInOtherPlaces() {
return true;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -108,4 +108,12 @@ public abstract class XLineBreakpointType<P extends XBreakpointProperties> exten
public int getPriority() {
return 0;
}
/**
* Return true if this breakpoint could be hit on lines other than the one specified,
* an example is method breakpoint in java - it could be hit on any method overriding the one specified
*/
public boolean canBeHitInOtherPlaces() {
return false;
}
}
@@ -713,7 +713,8 @@ public class XDebugSessionImpl implements XDebugSession {
}
}
myActiveNonLineBreakpoint = !(breakpoint instanceof XLineBreakpoint<?>) ? breakpoint : null;
myActiveNonLineBreakpoint =
(!(breakpoint instanceof XLineBreakpoint) || ((XLineBreakpoint)breakpoint).getType().canBeHitInOtherPlaces()) ? breakpoint : null;
positionReached(suspendContext);
UIUtil.invokeLaterIfNeeded(new Runnable() {