public static void setExtension(@NotNull ExtendableTextComponent editor, @Nullable ValidationInfo vi) {
    if (vi == null) {
      editor.removeExtension(ERROR_EXTENSION);
      editor.removeExtension(WARNING_EXTENSION);
    } else if (vi.warning) {
      editor.addExtension(WARNING_EXTENSION);
    } else {
      editor.addExtension(ERROR_EXTENSION);
    }
  }
public static void setExtension(@NotNull ExtendableTextComponent editor, @Nullable ValidationInfo vi)