boolean (PsiThisExpression expression, PsiMethodCallExpression methodCallExpression) { final PsiMethod method = methodCallExpression.resolveMethod(); if (method == null) { return false; } final PsiClass containingClass = ClassUtils.getContainingClass(expression); if (containingClass == null) { return false; } final PsiClass methodClass = method.getContainingClass(); if (method.hasModifierProperty(PsiModifier.STATIC)) { return true; } return methodClass != null && !containingClass.isInheritor(methodClass, true); }