boolean (PsiElement element) { final PsiExpressionList expressionList = PsiTreeUtil.getParentOfType(element, PsiExpressionList.class, true, PsiCodeBlock.class, PsiStatement.class, PsiClass.class); if (expressionList == null) { return false; } final PsiElement parent = expressionList.getParent(); return parent instanceof PsiMethodCallExpression && isFormatCall((PsiMethodCallExpression)parent); }