mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-140341 Debugger stops in anonymous class constructor
This commit is contained in:
@@ -67,6 +67,7 @@ import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class LineBreakpoint extends BreakpointWithHighlighter {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.ui.breakpoints.LineBreakpoint");
|
||||
@@ -188,8 +189,16 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private static Pattern ourAnonymousPattern = Pattern.compile(".*\\$\\d*$");
|
||||
private static boolean isAnonymousClass(ReferenceType classType) {
|
||||
if (classType instanceof ClassType) {
|
||||
return ourAnonymousPattern.matcher(classType.name()).matches();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean acceptLocation(DebugProcessImpl debugProcess, ReferenceType classType, Location loc) {
|
||||
return true;
|
||||
return !(loc.method().isConstructor() && isAnonymousClass(classType));
|
||||
}
|
||||
|
||||
private boolean isInScopeOf(DebugProcessImpl debugProcess, String className) {
|
||||
|
||||
Reference in New Issue
Block a user