mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-131710 Unclear behavior of smart step into method after conditional operator - cleanup after review
This commit is contained in:
@@ -50,6 +50,7 @@ public abstract class SmartStepTarget {
|
||||
return myNeedBreakpointRequest;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Range<Integer> getCallingExpressionLines() {
|
||||
return myExpressionLines;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class BasicStepMethodFilter implements NamedMethodFilter {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Range<Integer> getCallingExpressionLines() {
|
||||
return myCallingExpressionLines;
|
||||
|
||||
@@ -82,6 +82,7 @@ public class LambdaMethodFilter implements BreakpointStepMethodFilter{
|
||||
return method.name().startsWith(LAMBDA_METHOD_PREFIX) && (!vm.canGetSyntheticAttribute() || method.isSynthetic());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Range<Integer> getCallingExpressionLines() {
|
||||
return myCallingExpressionLines;
|
||||
|
||||
@@ -18,8 +18,9 @@ package com.intellij.debugger.engine;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluateException;
|
||||
import com.intellij.util.Range;
|
||||
import com.sun.jdi.Location;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface MethodFilter {
|
||||
boolean locationMatches(DebugProcessImpl process, Location location) throws EvaluateException;
|
||||
Range<Integer> getCallingExpressionLines();
|
||||
@Nullable Range<Integer> getCallingExpressionLines();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.Range;
|
||||
import com.sun.jdi.Location;
|
||||
import com.sun.jdi.Method;
|
||||
import com.sun.jdi.VMDisconnectedException;
|
||||
@@ -142,8 +143,8 @@ public class RequestHint {
|
||||
return myPosition.getLine() == locationPosition.getLine();
|
||||
}
|
||||
else {
|
||||
return locationPosition.getLine() >= myMethodFilter.getCallingExpressionLines().getFrom() &&
|
||||
locationPosition.getLine() <= myMethodFilter.getCallingExpressionLines().getTo();
|
||||
Range<Integer> exprLines = myMethodFilter.getCallingExpressionLines();
|
||||
return exprLines != null && locationPosition.getLine() >= exprLines.getFrom() && locationPosition.getLine() <= exprLines.getTo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user