@on_trait_change('window.perspectives')
    @on_trait_change('window.perspectives_items')
    def rebuild(self):

        # Clear out the old menu. This gives any actions that have trait
        # listeners (i.e. the rename and delete actions!) a chance to unhook
        # them.
        self.destroy()

        # Resetting the trait allows the initializer to run again (which will
        # happen just as soon as we fire the 'changed' event).
        self.reset_traits(['groups'])

        # Let the associated menu know that we have changed.
        self.changed = True

        return

    ###########################################################################
    # Private interface.
    ###########################################################################
Override for notification when getXHeader() action is successful
dataset/ETHPy150Open enthought/pyface/pyface/workbench/action/perspective_menu_manager.py/PerspectiveMenuManager.rebuild--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/news/nntp.py/NNTPClient.gotXHeader