private static <Qualifier extends PsiElement> boolean checkIsInnerClass(@NotNull PsiClass resolved, GrQualifiedReference<Qualifier> ref) {
    final PsiClass containingClass = resolved.getContainingClass();
    return containingClass == null ||
           PsiTreeUtil.isAncestor(containingClass, ref, true) ||
           GroovyCodeStyleSettingsFacade.getInstance(containingClass.getProject()).insertInnerClassImports();
  }
private static <Qualifier extends PsiElement> boolean checkIsInnerClass(@NotNull PsiClass resolved, GrQualifiedReference<Qualifier> ref)