TextRange (SourcePosition sourcePosition) { // Highlight only return keyword in case of conditional return breakpoint. PsiElement element = sourcePosition.getElementAt(); if (element != null && JavaLineBreakpointType.isReturnKeyword(element) && element == JavaLineBreakpointType.findSingleConditionalReturn(sourcePosition)) { return element.getTextRange(); } // Highlight only lambda body in case of lambda breakpoint. PsiElement method = DebuggerUtilsEx.getContainingMethod(sourcePosition); if (method instanceof PsiLambdaExpression) { return method.getTextRange(); } return null; }