1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#-----------------------------------------------------------------------------
#
# 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 #####################################################################
|