Package pallavi :: Package plugins :: Module ProgrammerActions
[hide private]
[frames] | no frames]

Module ProgrammerActions

source code

This plugin will collect generic actions that will be of use to
programmers but not to others. Such actions include go to line, 
block commenting, etc.

This plugin provides the following actions:
GoToLine
        Go to a specific line number in the file. Prompt for the line
        number if none is specified.
CommentLines
        Insert a comment string at the beginning of each of the selected
        lines.
UncommentLines
        Removes a comment character from the beginning of each of the selected
        lines.
ShiftIndentRight
        Insert indent characters at the beginning of each of the selected lines
ShiftIndentLeft
        Remove indent characters from the beginning of each of the selected lines
JoinLines
        Remove the newline between the current and next line
        
This plugin invokes the following actions:
RequestUserInput
        Request the line number from the user
GetLexerItem
        Request the comment string from the Lexer



Functions [hide private]
 
setup()
Set up the actions that the plugin provides
source code
 
GoToLine(data=None)
If data is specified, assume it is a line-number to go to otherwise prompt using an ugly dialog box
source code
 
CommentLines(data=None)
Comment the lines by retrieving the comment character from the lexer
source code
 
UncommentLines(data=None)
Remove commenting from selected lines by retrieving a comment character from the lexer and determining if the line starts with it
source code
 
ShiftIndentRight(data=None)
Increase indentation by retrieving the indent string from the lexer
source code
 
ShiftIndentLeft(data=None)
Decrease indentation byretrieving the indent string character from the lexer and determining if the line starts with it
source code
 
JoinLines(data=None)
Join the current line with the next one.
source code
 
ActionOnSelected(function, *args)
Calculate the line numbers of each line that is selected and call function on that line number.
source code
Function Details [hide private]

ActionOnSelected(function, *args)

source code 
Calculate the line numbers of each line that is selected and call function on that line number. Function should accept a reference to the textview, linenumber, and line start position plus any additional non-keyword arguments