boolean (PsiElement psiElement, PsiElement parent) { for (PsiElement sibling = parent.getLastChild(); sibling != psiElement; sibling = sibling.getPrevSibling()) { if (PsiUtil.isJavaToken(sibling, JavaTokenType.RPARENTH)) { return true; } } return false; }