@Nullable
  public static GrTypeDefinition getPublicClass(@Nullable VirtualFile virtualFile, @NotNull PsiManager manager) {
    if (virtualFile == null) return null;

    PsiElement psiFile = manager.findFile(virtualFile);
    if (psiFile instanceof PsiCompiledFile) {
      psiFile = psiFile.getNavigationElement();
    }

    if (psiFile instanceof GroovyFile) {
      return getClassDefinition((GroovyFile)psiFile);
    }

    return null;
  }
@Nullable
  public static GrTypeDefinition getPublicClass(@Nullable VirtualFile virtualFile, @NotNull PsiManager manager)