public static Icon getIcon(Object object, @Iconable.IconFlags int flags, Project project) {
    if (object instanceof PsiElement element) {
      return element.getIcon(flags);
    }
    if (object instanceof Module module) {
      return ModuleType.get(module).getIcon();
    }
    if (object instanceof VirtualFile file) {
      IconManager iconManager = IconManager.getInstance();
      if (iconManager instanceof CoreAwareIconManager manager) {
        return manager.getIcon(file, flags, project);
      }
    }
    return ElementPresentationManager.getIcon(object);
  }
public static Icon getIcon(Object object, @Iconable.IconFlags int flags, Project project)