MethodFilter (SmartStepTarget stepTarget) { if (stepTarget instanceof MethodSmartStepTarget methodSmartStepTarget) { final PsiMethod method = methodSmartStepTarget.getMethod(); if (stepTarget.needsBreakpointRequest()) { return Registry.is("debugger.async.smart.step.into") && method.getContainingClass() instanceof PsiAnonymousClass ? new ClassInstanceMethodFilter(method, stepTarget.getCallingExpressionLines()) : new AnonymousClassMethodFilter(method, stepTarget.getCallingExpressionLines()); } else { return new BasicStepMethodFilter(method, methodSmartStepTarget.getOrdinal(), stepTarget.getCallingExpressionLines()); } } if (stepTarget instanceof LambdaSmartStepTarget lambdaTarget) { LambdaMethodFilter lambdaMethodFilter = new LambdaMethodFilter(lambdaTarget.getLambda(), lambdaTarget.getOrdinal(), stepTarget.getCallingExpressionLines()); if (Registry.is("debugger.async.smart.step.into") && lambdaTarget.isAsync()) { PsiLambdaExpression lambda = ((LambdaSmartStepTarget)stepTarget).getLambda(); PsiElement expressionList = lambda.getParent(); if (expressionList instanceof PsiExpressionList) { PsiElement method = expressionList.getParent(); if (method instanceof PsiMethodCallExpression) { return new LambdaAsyncMethodFilter(((PsiMethodCallExpression)method).resolveMethod(), LambdaUtil.getLambdaIdx((PsiExpressionList)expressionList, lambda), lambdaMethodFilter); } } } return lambdaMethodFilter; } return null; }