ABOUT
This plug-in extends code browsing (Ctrl + Click) to comments.
FEATURES
In a comment, insert the path to a document, image, etc. as shown in this example:
// Now we want to change the color of the edit box.
// [d:\docs\uispec15.doc]
IMPORTANT: Browse comments must be placed inside square brackets.
Later, when you need to refer to the document, just Ctrl + Click on the path in brackets. CodeRush does its magic with a call to ShellExecute to start up the application. Assuming you've got an appropriate word processor installed (that can process files having a .doc extension), your document editor will open the specified document.
To get around the problems presented by absolute paths, a special "Click Comments" tab has been added to the Environment Options dialog (see screen shot above). On it is a list of alias names and their associated directories (absolute, or relative using the special macros). On this page you might have:
projinfo=$PROJECTPATH\docs
designs=q:\designs\complete
uidocs=g:\docs\ui
Note the use of the macro $PROJECTPATH, which is evaluated to the directory of the project's .dpr file during comment browsing. This page is also available when the user chooses the "Properties..." from the Editor context menu. To prevent against the problems caused by external applications crashing the system, a check box allows you to autosave all editor files before any link is followed.
This plug-in registers a command CommentEmbedLink, that allows you to specify the document you want to link to (using a dialog to browse to it). This plug-in also adds a menu item to the right-click editor menu. To embed a new link using this menu item, follow these steps:
- Place the cursor on an empty line.
- Right-click the editor (make sure no text is selected), and choose "Insert" (this will bring up the Insert sub menu).
- Select "Comment Link...".
- Navigate to the file you want to link to. You can change the filter at the bottom of the Select File dialog to list files of interest.
- Click Open, and this plug-in will add a specially commented link to your code.