def _create_action(self, definition):

        traits = {'window' : self.window}

        # Override any traits that can be set in the definition.
        if len(definition.name) > 0:
            traits['name'] = definition.name

        if len(definition.class_name) > 0:
            action = self._actions.get(definition.class_name)
            if action is None:
                klass  = self._import_symbol(definition.class_name)
                action = klass(**traits)
                self._actions[definition.class_name] = action

        # fixme: Do we ever actually do this? It seems that in Envisage 3.x
        # we always specify an action class!?!
        else:
            action = Action(**traits)

        # fixme: We need to associate the action set with the action to
        # allow for dynamic enabling/disabling etc. This is a *very* hacky
        # way to do it!
        action._action_set_ = definition._action_set_

        return action
Returns the union of self and o
dataset/ETHPy150Open enthought/envisage/envisage/ui/workbench/workbench_action_manager_builder.py/WorkbenchActionManagerBuilder._create_action--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/geometry/entity.py/GeometrySet._union