'Update the domain hints to be stored in the widgets settings.'

def update_domain_role_hints(self):

    hints_from_model = (lambda role, model: [((attr.name, vartype(attr)), (role, i)) for (i, attr) in enumerate(model)])
    hints = dict(hints_from_model('available', self.available_attrs))
    hints.update(hints_from_model('attribute', self.used_attrs))
    hints.update(hints_from_model('class', self.class_attrs))
    hints.update(hints_from_model('meta', self.meta_attrs))
    self.domain_role_hints = hints
