def prepare_menu ( self, row, column ):
        """ Prepares to have a context menu action called.
        """
        object    = self.model.get_filtered_item( row )
        selection = [ x.obj for x in self.grid.get_selection() ]
        if selection not in object:
            self.set_selection( object )
            selection = [ object ]
        self.set_menu_context( selection, object, column )

    #---------------------------------------------------------------------------
    #  Set one or more attributes without notifying the grid model:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/table_editor.py/TableEditor.prepare_menu/swapped operands of `not in`