PsiElement (@NotNull PsiElement element) { if (element instanceof PsiReferenceExpression) { PsiElement elementToSlice = ((PsiReferenceExpression)element).resolve(); if (elementToSlice != null) { return elementToSlice; } } return element; }