/*
- * 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.
public Breakpoint createJavaBreakpoint(Project project, XBreakpoint breakpoint) {
return new FieldBreakpoint(project, breakpoint);
}
+
+ @Override
+ public boolean canBeHitInOtherPlaces() {
+ return true;
+ }
}
/*
- * 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.
public Breakpoint createJavaBreakpoint(Project project, XBreakpoint breakpoint) {
return new MethodBreakpoint(project, breakpoint);
}
+
+ @Override
+ public boolean canBeHitInOtherPlaces() {
+ return true;
+ }
}
/*
- * 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.
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;
+ }
}
}
}
- myActiveNonLineBreakpoint = !(breakpoint instanceof XLineBreakpoint<?>) ? breakpoint : null;
+ myActiveNonLineBreakpoint =
+ (!(breakpoint instanceof XLineBreakpoint) || ((XLineBreakpoint)breakpoint).getType().canBeHitInOtherPlaces()) ? breakpoint : null;
positionReached(suspendContext);
UIUtil.invokeLaterIfNeeded(new Runnable() {