def get_action_names(self, context, targets): kind = self._get_kind(context, targets) if not kind: return [] actions = kind.get_action_names() actions += self.get_custom_actions(kind.name).keys() return actions
def get_action_names(self, context, targets): kinds = set() for target in targets: kinds.add(self._get_kind(context, target)) if len(kinds) != 1: self.error('Multiple kinds are detected') return [] kind = kinds.pop() if not kind: return [] actions = kind.get_action_names() actions += self.get_custom_actions(kind.name).keys() return actions