def set_up(self, entity_type, entity_id):
    '\n        Sets up the button for a given entity.\n\n        :param entity_type: Entity type to set up button for\n        :param entity_id: Entity id to set up button for\n        '
    self._entity_id = entity_id
    self._entity_type = entity_type
    if (not self._bundle.get_setting('enable_context_switch')):
        return
    context = self._bundle.context
    context_entity = (context.task or context.entity or context.project or None)
    self.setVisible(True)
    self.setEnabled(True)
    self.setIcon(self._normal_icon)
    self._is_static = False
    if (context_entity and (context_entity['type'] == entity_type) and (context_entity['id'] == entity_id)):
        self.setPopupMode(QtGui.QToolButton.DelayedPopup)
        self.setToolTip('This is your current work area.\nThe work you do will be associated with this item in Shotgun.')
        self.setIcon(self._current_work_area_icon)
        self.setEnabled(False)
        self._is_static = True
    elif (entity_type in self.NON_WORK_AREA_TYPES):
        self.setToolTip('This cannot be a work area.')
        self.setEnabled(False)
        self._is_static = True
    elif (entity_type == 'Task'):
        self._caption = 'Set Work Area'
        self.setToolTip('Click to set your work area to the current task.')
    else:
        self._caption = 'Pick Work Area'
        self.setToolTip('Click to select a task.')
    self._init_default_state()
Sets up the button for a given entity.

:param entity_type: Entity type to set up button for
:param entity_id: Entity id to set up button for
def set_up(self, entity_type, entity_id):
    '\n        Sets up the button for a given entity.\n\n        :param entity_type: Entity type to set up button for\n        :param entity_id: Entity id to set up button for\n        '
    self._entity_id = entity_id
    self._entity_type = entity_type
    if (not self._bundle.get_setting('enable_context_switch')):
        return
    context = self._bundle.context
    context_entity = (context.task or context.entity or context.project or None)
    self.setVisible(True)
    self.setEnabled(True)
    self.setIcon(self._normal_icon)
    self._is_static = False
    if (context_entity and (context_entity['type'] == entity_type) and (context_entity['id'] == entity_id)):
        self.setPopupMode(QtGui.QToolButton.DelayedPopup)
        self.setToolTip('This is your current work area.\nThe work you do will be associated with this item in Shotgun.')
        self.setIcon(self._current_work_area_icon)
        self.setEnabled(False)
        self._is_static = True
    elif (entity_type in self.NON_WORK_AREA_TYPES):
        self.setToolTip('This cannot be a work area.')
        self.setEnabled(False)
        self._is_static = True
    elif (entity_type == 'Task'):
        self._caption = 'Set Work Area'
        self.setToolTip('Click to set your work area to the current task.')
    else:
        self._caption = 'Pick Work Area'
        self.setToolTip('Click to select a task.')
    self._init_default_state()