File: data_action_set.py

package info (click to toggle)
python-envisageplugins 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,616 kB
  • ctags: 1,970
  • sloc: python: 7,047; makefile: 11; sh: 11; lisp: 1
file content (43 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (2)
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
#-----------------------------------------------------------------------------
#
#  Copyright (c) 2007 by Enthought, Inc.
#  All rights reserved.
#
#-----------------------------------------------------------------------------

"""
An action set for contributing actions to Data.

"""

# Enthought library imports.
from enthought.envisage.action.action_plugin_definition import ActionSet


##############################################################################
# Constants
##############################################################################

# A commonly used string within our declarations.
ROOT = 'data.plugin.resource_type'

# The prefix used to identify menu-building resources, within an action set,
# for the context menu applying to a Data.  This string MUST MATCH the string
# that the Data's node type is looking for!
DATA_CONTEXT_MENU = '%s.data_node_type' % ROOT


class DataActionSet(ActionSet):
    """
    Action and menu definitions for the project view.

    """

    # A mapping from human-readable root names to globally unique Ids.
    aliases = {
        'DataContextMenu': DATA_CONTEXT_MENU
        }


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