private static boolean inTheSamePackage(PsiJavaFile file, PsiElement element) {
            if (element instanceof PsiClass && ((PsiClass)element).getContainingClass() == null) {
              final PsiFile containingFile = element.getContainingFile();
              return containingFile instanceof PsiClassOwner &&
                     Comparing.strEqual(file.getPackageName(), ((PsiClassOwner)containingFile).getPackageName());
            }
            return false;
          }
private static boolean inTheSamePackage(PsiJavaFile file, PsiElement element)