void (final @NotNull List<? extends PsiElement> targets) { PsiElement parent = myTarget.getParent(); if (!(parent instanceof PsiReturnStatement) && !(parent instanceof PsiThrowStatement)) return; PsiCodeBlock body = null; final PsiElement psiElement = PsiTreeUtil.getParentOfType(myTarget, PsiLambdaExpression.class, PsiMethod.class); if (psiElement instanceof PsiLambdaExpression) { final PsiElement lambdaBody = ((PsiLambdaExpression)psiElement).getBody(); if (lambdaBody instanceof PsiCodeBlock) { body = (PsiCodeBlock)lambdaBody; } } else if (psiElement instanceof PsiMethod) { body = ((PsiMethod)psiElement).getBody(); } if (body == null) return; try { highlightExitPoints((PsiStatement)parent, body); } catch (AnalysisCanceledException e) { // ignore } }