def register_action_decorators(self, actions): # Keep a mapping: Decorated Leaf Type -> List of actions decorate_types = {} for action in actions: for appl_type in action.item_types(): decorate_types.setdefault(appl_type, []).append(action) sc = GetSourceController() sc.set_action_decorators(decorate_types) self.output_debug("Action decorators:") for typ in decorate_types: self.output_debug(typ.__name__) for dec in decorate_types[typ]: self.output_debug(type(dec).__module__, type(dec).__name__,sep=".")