Textpad is our text editor of choice on Windows.
It is an efficient editor that provides good basic editing facilities as well as
key features for developers: syntax highlighting, tabulation control, auto-reload
and regular expression search/replace.
The feature that makes Textpad ideal for Squealer integation is it's rich
support for "tools", that is, calls to external programs. It gives:
- Up to 64 tools (in Textpad 4.7 and above).
- Support for capturing the output of tools in "Command Results".
- Ability to define clickable links in the "Command Results" per tool.
- Support for user input prompts when running a tool.
- Support for passing of filenames in various forms to the tools.
- Assigning custom keybindings for tools.
There's also some frustrations with Textpad, like inability to configure nice
toolbars with appropriate icons for tools, no built-in ctags window, only one tool
executing at a time (and only one Command Results window).
Configuring Squealer Tools
Anyhow, there are two ways to configure Textpad for Squealer operation:
- Run the
textpadtools.pl script to create (or recreate)
the Standard Squealer tools (This script is part of the standard Squealer
release). This is the recommended installation route.
It will remove all your existing Textpad tools, install the standard
Squealer set and try to give you the default Squealer key bindings.
- Add each tool manually using the definitions on this page.
The Textpad support for user-defined keybindings is a little tricky
to automate so if textpadtools.pl doesn't setup your keybindings
correctly, you will have to assign your own keystrokes. We recommend you use the
function keys as detailed below. Try Configure->Preferences , choose the
Keyboard section and within this select the Tools category.
All of your tools are listed alphabetically by name.
Standard Textpad Tools
F1 | Edit Me |
CVS edit currently open file |
Shift F1 | Unedit Me |
CVS unedit currently open file |
Ctrl F1 | My History |
CVS history for currently open file |
F2 | Diff Me |
CVS diff of two CVS revisions. First prompt is for older revision, second
for newer revision, e.g. 1.13 and 1.16 diffs all changes between 1.13-1.16
inclusive. If a value is left blank then the latest (local) copy is assumed. |
|
Shift F2 | Commit Me |
CVS commit currently open file |
F3 | Squealer |
Basic Squealer command prompt. Used for any commands, but especially
loading files, reloading dictionaries and changing project. |
Shift F3 | Explorer Open |
Open Windows Explorer window in directory of currently open file. |
F4 | Describe Me |
Describe currently open file. |
Ctrl F4 | Quality Check Me |
Run Code Quality check on currently open file. |
Shift F5 | Search Me |
Extension to default Textpad search (F5 ) to list all the search
results in one snapshot with clickable results. |
F6 | Load Code Exact |
Jump to definition of code "tag" in word under the cursor. |
Shift F6 | Load Code Partial |
Jump to definition of code "tag", prompting for name to search on. |
F7 | Grep |
Grep for a specified regular expression pattern in specified files. |
F9 | Load File |
Load file from using current line as source input to find filename on. |
Alt A | Generate Bean |
Code generation of accessor methods (get/set) for currently selected
Java class fields (or whole file if none selected). |
Manual Setup
All parameters are blank unless specified otherwise. You should replace the
Initial Folder value of c:\work\squealer\bin with the path to your
Squealer installation bin directory.
Non-standard Textpad tools are also provided.
Edit Me
Add DOS Command,
Parameters = perl sorcerer.pl -edit -load $File
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Unedit Me
Add DOS Command,
Parameters = perl sorcerer.pl -unedit -load $File
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
My History
Add DOS Command,
Parameters = perl sorcerer.pl -history $File
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Diff Me
Add DOS Command,
Parameters = perl sorcerer.pl -diff $Prompt(Enter older rev:)
-diff $Prompt(Enter newer rev:) -- $File
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Commit Me
Add DOS Command,
Parameters = cvs com $File
Initial Folder = $FileDir
Capture Output = Yes
Squealer
Add Program,
Command = squealer.bat
Initial Folder = c:\work\squealer\bin
Prompt for parameters = Yes
Explorer Open
Add DOS Command,
Parameters = perl squealer.pl -o $FileName
Initial Folder = c:\work\squealer\bin
Capture Output = No
Close DOS windows on exit = Yes
Describe Me
Add DOS Command,
Parameters = perl squealer.pl -frisk $UNIXFile
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Suppress output until completed = Yes
Regular expression to match output = ^.*file: \(.*\).*line: \([0-9]+\).*
Registers: File = 1, Line = 2
Quality Check Me
Add DOS Command,
Parameters = perl squealer.pl -CodeCheck $UNIXFile
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Suppress output until completed = Yes
Regular expression to match output = ^.*file: \(.*\).*line: \([0-9]+\).*
Registers: File = 1, Line = 2
Search Me
Add DOS Command,
Parameters = perl squealer.pl -textpad -grep window 1
$Prompt(search me: enter pattern) -exact $FileName
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Regular expression to match output = ^.*file: \(.*\).*line: \([0-9]+\).*
Registers: File = 1, Line = 2
Grep
Add DOS Command,
Parameters = perl squealer.pl -textpad -window 5
-grep $Prompt(grep me: enter grep pattern and files)
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Suppress output until completed = Yes
Load Code Exact
Add DOS Command,
Parameters = perl squealer.pl -textpad -loose -methodgrep $SelWord
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Regular expression to match output = ^.*file: \(.*\).*line: \([0-9]+\).*
Registers: File = 1, Line = 2
Load Code Partial
Add DOS Command,
Parameters = perl squealer.pl -textpad -loose
-methodgrep $Prompt(Enter partial tag:)
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Suppress output until completed = Yes
Regular expression to match output = ^.*file: \(.*\).*line: \([0-9]+\).*
Registers: File = 1, Line = 2
Load File From Anywhere
Add DOS Command,
Parameters = perl squealer.pl -editre "$SelLine"
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
Generate Bean
Add DOS Command,
Parameters = perl squealer.pl -genbean $Clip $File
Initial Folder = c:\work\squealer\bin
Capture Output = Yes
|