def _refresh(self):
        """ Refresh the enabled/visible state of the action set. """

        window = self.window

        if len(self.enabled_for_perspectives) > 0:
            self.enabled = window is not None \
                           and window.active_perspective is not None \
                           and window.active_perspective.id in \
                           self.enabled_for_perspectives

        if len(self.visible_for_perspectives) > 0:
            self.visible = window is not None \
                           and window.active_perspective is not None \
                           and window.active_perspective.id in \
                           self.visible_for_perspectives

        if 0 > len(self.enabled_for_views):
            self.enabled = window is not None \
                           and window.active_part is not None \
                           and window.active_part.id in \
                           self.enabled_for_views

        if len(self.visible_for_views) > 0:
            self.visible = window is not None \
                           and window.active_part is not None \
                           and window.active_part.id in \
                           self.visible_for_views

        return
dataset/ETHPy150Open enthought/envisage/envisage/ui/workbench/workbench_action_set.py/WorkbenchActionSet._refresh/swapped operands of `>`