void (@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); } }