Automatically (or manually) fills in the code you type at the editor, based on scope.  Also provides instant access to recent single-line clipboard operations.


This plug-in makes it easy to:
The AutoFill plug-in is highly configurable to the way you work.  It is strongly recommended that you read through this documentation before installing, so you can get the most from the plug-in.

This plug-in provides basic AutoFill functionality.  After installing and enabling automatic AutoFill, the AutoFill plug-in will be active.  To use it, just write code as you normally would.  When the plug-in detects one or more suggestions matching the code you've typed in Delphi, it will display a suggestion to the right of the cursor.

After typing in "od", AutoFill activates with a suggestion.

Once AutoFill is active, you have several options:

Shift+Enter is useful when you need to create a new variable name that is similar to a portion of an existing suggestion, or when you want to quickly access a different but similarly-named suggestion (differing only in the latter portions of the text). You can press Shift+Enter to move the selection right, and then start typing to get other suggestions.

How AutoFill Collects Suggestions
Suggestions for AutoFill are dynamically parsed from the current method & class, and include parameters to the current method, variables declared locally, methods, properties, and field identifiers from the current class, and the most recent single-line clipboard operations.  These suggestions are sorted, with recently-selected suggestions optionally appearing at the top of the list.  Because AutoFill has such a narrow focus of scope, it is more appropriate to use on empty lines than Delphi's Code Completion.

AutoFill can also get suggestions contributed by AutoFill extensions.

Additional Functionality
In addition to basic AutoFill functionality, this plug-in registers seven new commands that can be assigned to a keystroke, toolbar button, or a menu item.  The commands are detailed below:

This command presents the AutoFill Options dialog.  One easy way to access this command is through the CodeRush About box.  After installing this plug-in, bring up the CodeRush About box, open the AutoFill node, right-click the AutoFillOptions command and select "Execute...".

The AutoFill Options dialog is described in more detail here.

This command invokes the AutoFill logic based on the text to the left at the cursor.  This command is useful when you want to manually invoke AutoFill.  You can bind a shortcut key to this command using the CodeRush Options dialog, or by using the Shortcuts page of the AutoFill Options dialog.

This command displays the Find Entry dialog.

Using the Find Entry dialog to select and paste an AutoFill entry.

This command is for developers that have the SmartParenWithEmbed command bound to their open parenthesis key (e.g., Shift+9 or Shift+8 for some non-U.S. keyboards). This is the default for a CodeRush install. If you want the open parenthesis key to accept the selection when AutoFill is active, you'll need to replace your existing Shift+9 (or Shift+8 keymapping), with the following:


This command will invoke the SmartParenWithEmbed command whenever the open parenthesis is pressed and AutoFill is not actively suggesting entries.  However, if AutoFill is suggesting entries and the open parenthesis key is pressed, the current suggestion will be accepted (selected text will be deselected) before SmartParenWithEmbed is called.

If you do not reassign the open paren key binding for this command (in other words, the open parenthesis key remains bound to the SmartParenWithEmbed command), pressing the open parenthesis key when AutoFill is active will result in the current suggestion becoming embedding inside parentheses.

You can reassign this shortcut key by following these steps:

This command accepts the current highlighted suggestion (clearing the highlight and placing the cursor to the right of the suggestion).

For example, if you want the period key (".") to accept the current suggestion and add a period to the end of the suggestion, create a key-binding to this shortcut in the CodeRush Options dialog.  Be sure to select the "Send key to Delphi" option if you want the character you press to be inserted after the suggestion.

Setting up the period (".") character to accept suggestions.

Note that characters bound to the AutoFillAcceptSuggestion command will behave normally when AutoFill is inactive.

This command displays the Global Suggestion Manager dialog which allows you to add or remove AutoFill suggestions that will be offered nearly every time that AutoFill is invoked.

You can bind this command to a keystroke execute it directly from the Plug-ins page of the CodeRush About box.  Once the dialog is up, simply add any suggestions that you would like to always be available from AutoFill.  It is recommended that you keep this list small to avoid suggestion bloat.

This list is persistent (saved in your CodeRush folder in the AutoFill.glo text file).

Extended Clipboard History
This dialog can be reused to display a list of all recent single-line clipboard operations (cuts and copies performed in the Delphi edit window), use this command:


You can also click the Select Clipboard Entries toolbar button, if it is installed on your toolbar, and you can quickly bind a shortcut key to this command using the Shortcuts page of the AutoFill Options dialog.

Toolbar Buttons
The AutoFill plug-in registers four toolbar buttons with CodeRush.  The buttons can be found in the AutoFill category, and are described below.

You can configure the AutoFill functionality through the AutoFill Options dialog.  To bring up this dialog, invoke the AutoFillOptions command, or click the AutoFill Options button, if it is installed on your toolbar.  For more information on AutoFill options, please click here.

AutoFill Extensions
The AutoFill plug-in has an advanced architecture that alloww it to load other plug-ins.  For more information about AutoFill's plug-ins and its extension architecture, please click here.

Known Issues
If Delphi changes the source programmatically CodeRush is not notified of these changes.  We anticipate that Borland will correct this Tools API limitation in Delphi 6, however in CodeRush 5, if this happens, AutoFill will not be aware of the latest additions.  For example, if you drop several components on a form AutoFill won't know to re-parse the class declaration.  The work-around is to move the cursor to the class declaration, add a line, remove it, then save (forcing CodeRush to realize a change has occurred).  You can also force a parse by closing and then reopening the file.

Method parameters and variables are not suggested in static procedures (procedures not belonging to a class).

If AutoFill fails to pick up on changes to a method, the work-around is to page up out of it and then back into it (forcing AutoFill to re-parse the method).


Version 1.52


CodeRush 5

CodeRush 6

Copyright 2004 Ackerson Software, All Rights Reserved.
Ackerson Software

Author: Arno van Jaarsveld and Mark Miller

Created: Sept. 22, 2000

Plug-In Type: Standard

Options Page: Yes
This plug-in is NOT currently supported.
This plug-in is not the property of Developer Express; it is the sole property of its author.  As such, Developer Express cannot be held liable for any incidental damages that may be related to the usage of this plug-in.