Double Text is a repeat text writer that works with virtually any scripting and programming language. I use the program extensively to store, document and repeat code snippets for all of the programming languages in which I work. I find that it is to my advantage, therefore, to have this repeat text writer readily available to me regardless of where I am working in the Microsoft Visual Studio software development environment. With the program on the Visual Studio Tools menu, I do not have to bother with the Windows Start menu, or with getting back to my desktop to start the program.
Adding The Program To The Tools Menu
Here are the steps for adding Double Text, or any other programming tool you use, to the Visual Studio Tools menu. In Visual Studio, click on the Tools menu and then the External Tools command. This will open the External Tools dialog box. Follow these steps in the dialog box.
- Click the Add button. This will add a new Title to the Tools menu at the end of the existing titles.
- In the Title textbox, change the new Title to “Double Text.”
- Click on the browse button to the right of the Command textbox. Browse to the folder where the program is installed. (If the installation path was not changed during installation, the program will be on the C: drive. Drill down through the Program Files and 2 Good Software folders to the Double Text folder.) In the installation folder, select the dbltext.exe file and then click the Open button.
- To change the position of the program within the other tools listed on the Tools menu, use the Move Up and Move Down buttons to change the order of the menu contents.
- Click the OK button.
Starting And Exiting The Program
Double Text will now be listed on the Visual Studio Tools menu. Whenever you are working in Visual Studio, you can start the program by clicking on the Tools menu and then the Double Text command. Unfortunately, when you exit Visual Studio, the repeat text writer will not also be closed. The program must be closed separately.
Using The Program
Repeating code snippets is the process of using Double Text to place a copy of code stored in source libraries on the Windows clipboard. Code that is to be repeated is set up once in a source file using the built in text editor. After a source file has been created, whenever a new copy of the code is needed it is placed on the clipboard with one mouse click. After a new copy has been placed on the clipboard, the repeated code can be pasted where needed in Visual Studio.
For repeat code that requires changes in every new copy, markers are placed in the source file where each change is needed. Markers can also be used to segment the source file into selectable sections thereby letting you pick and choose the code that is included in each new copy. Whenever a source file is repeated, you are prompted which code to include and for ‘fill in the blanks’ information. The source file stays the same while each newly repeated copy of the code can be very different.
As an example, I have a library of source files that I use to create new collections for data objects in Visual Basic. There are separate libraries for building collections for objects store in text files and in Access databases. Using these collection libraries I can generate the object and collection classes, more than 300 lines of fully commented code, in a few seconds.
In addition to saving me valuable coding time, the source code that I generate from my source libraries using a repeat text writer is bug free. That alone puts the program at the top of my coding toolkit.