def METHOD_NAME(self, variant):
    self.tab.setCurrentIndex(0)
    self.stop_loading_packages()
    self.clear()
    self.variant = variant
    if self.variant is None:
        return
    package_paths = self.context_model.packages_path
    if self.variant.wrapped.location not in package_paths:
        txt = "not on the package search path"
        self.label.setText(txt)
        return
    self.setEnabled(True)
    range_ = None
    if self.reference_variant and self.reference_variant.name == variant.name:
        versions = sorted([variant.version, self.reference_variant.version])
        range_ = VersionRange.as_span(*versions)
    self.load_packages(package_paths=package_paths,
                       package_name=variant.name,
                       range_=range_,
                       package_attributes=("timestamp",))