GlobalSearchScope (@NotNull PsiElement element) { PsiFile file = element.getContainingFile(); if (file != null) { return getInstance(file.getProject()).getResolveScope(file); } return getInstance(element.getProject()).getResolveScope(element); }