Package peppy :: Package plugins :: Module text_transforms :: Class CommentRegion
[frames] | no frames]

Class CommentRegion

                        object --+        
                                 |        
actions.base.BufferBusyActionMixin --+    
                                     |    
                    object --+       |    
                             |       |    
              debug.debugmixin --+   |    
                                 |   |    
              actions.SelectAction --+    
                                     |    
   actions.base.TextModificationAction --+
                                         |
                                        CommentRegion

Comment a line or region.

This will use the current mode's comment characters to comment out entire blocks of lines. The comment will start in column zero, and if there is an end comment delimiter, it will appear as the last character(s) before the end of line indicatior.

Instance Methods
 
action(self, index=-1, multiplier=1)
Override this to provide the functionality of the action.

Inherited from actions.base.BufferBusyActionMixin: isActionAvailable, isEnabled

Inherited from actions.SelectAction: __call__, __init__, getMenuItemName, getSubIds, getTooltip, initPostHook, initPreHook, insertIntoMenu, insertIntoToolbar, showEnable

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods

Inherited from actions.base.TextModificationAction: worksWithMajorMode

Inherited from actions.SelectAction: getHelp, setAcceleratorText

Inherited from debug.debugmixin: dprint

Class Variables
  alias = 'comment-region'
This alias holds an emacs style name that is used during M-X processing.
  name = '&Comment Region'
This is the name of the menu entry as it appears in the menu bar.
  default_menu = ('Transform', -600)
The default menu location is specified here as a tuple containing the menu path (separated by / characters) and a number between 1 and 1000 representing the position within the menu.
  key_bindings = {'emacs': 'C-C C-C'}
Map of platform to default keybinding.

Inherited from actions.SelectAction: default_toolbar, global_id, icon, keyboard, stock_id, tooltip

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

action(self, index=-1, multiplier=1)

 

Override this to provide the functionality of the action.

This method gets called when the user initiates the action, whether it be from the menu bar, toolbar, or keyboard.

Parameters:
  • index - The index of the item in the list. This is only useful for list or radio items.
  • multiplier - the multiplier supplied by the keyboard handler. The keyboard handler allows for emacs-style repeat commands. For some actions, it makes sense to allow repetition of the command. For instance, in a command that uppercases words, the multiplier could be 4, would mean that the next 4 words get uppercased. The default is 1.
Overrides: actions.SelectAction.action
(inherited documentation)