boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context) { final PsiMethod psiMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class, false); if (psiMethod != null && !(psiMethod instanceof PsiCompiledElement)) { final PsiType returnType = psiMethod.getReturnType(); return returnType != null && !PsiTypes.voidType().equals(returnType); } return false; }