boolean (@NotNull PsiElement element, DetectedJavaChangeInfo currentInfo) { final PsiMethod method = currentInfo.getMethod(); TextRange range = method.getTextRange(); PsiCodeBlock body = method.getBody(); if (body != null) { range = new TextRange(range.getStartOffset(), body.getTextOffset()); } return element.getContainingFile() == method.getContainingFile() && range.contains(element.getTextRange()); }