LinkedHashSet<String> (@NotNull PsiMember member) { LinkedHashSet<String> allLookupStrings = new LinkedHashSet<>(); String name = member.getName(); allLookupStrings.add(name); PsiClass containingClass = member.getContainingClass(); while (containingClass != null) { String className = containingClass.getName(); if (className == null) { break; } name = className + "." + name; allLookupStrings.add(name); PsiElement parent = containingClass.getParent(); if (!(parent instanceof PsiClass)) { break; } containingClass = (PsiClass)parent; } return allLookupStrings; }