String (@NotNull PsiElement element) { String literalString = tryFindMagicLiteralString(element, false); if (literalString != null) { return literalString; } if (element instanceof PyNamedParameter) return PyPsiBundle.message("find.usages.parameter"); if (element instanceof PyFunction) { if (((PyFunction)element).getContainingClass() != null) { return PyPsiBundle.message("find.usages.method"); } return PyPsiBundle.message("find.usages.function"); } if (element instanceof PyClass) return PyPsiBundle.message("find.usages.class"); if (element instanceof PyReferenceExpression) return PyPsiBundle.message("find.usages.variable"); if (element instanceof PyTargetExpression) { final PyImportElement importElement = PsiTreeUtil.getParentOfType(element, PyImportElement.class); if (importElement != null && importElement.getAsNameElement() == element) { return PyPsiBundle.message("find.usages.imported.module.alias"); } return PyPsiBundle.message("find.usages.variable"); } if (element instanceof PyKeywordArgument) { return PyPsiBundle.message("find.usages.keyword.argument"); } return ""; }