Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > ccd2f5c08185f7721754f86a114862fe > files > 357

python-enthought-envisageplugins-3.1.1-2mdv2010.0.noarch.rpm

#-----------------------------------------------------------------------------
#
#  Copyright (c) 2007 by Enthought, Inc.
#  All rights reserved.
#
#-----------------------------------------------------------------------------

"""
An action to rename a data.

"""


# Standard imports.
import logging

# Local imports
from data_plugin_action import DataPluginAction


# Create a logger for this module.
logger = logging.getLogger(__name__)


class RenameDataAction(DataPluginAction):
    """
    An action to rename a data.

    """

    ###########################################################################
    # 'Action' interface.
    ###########################################################################

    #### public interface #####################################################

    def perform(self, event):
        """
        Perform this action.

        """

        logger.debug('Performing action [%s]', self)

        event.tree.edit_label(event.node)

        return

#### EOF #####################################################################