boolean (@NotNull PsiExpression occurrence) { PsiElement parent = occurrence.getParent(); while(parent instanceof PsiExpression) { parent = parent.getParent(); } if(!(parent instanceof PsiExpressionList)) return true; parent = parent.getParent(); if(!(parent instanceof PsiMethodCallExpression)) return true; final String text = ((PsiMethodCallExpression) parent).getMethodExpression().getText(); return !getKeywordText().equals(text); }