Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are several ways that you can customize CodeSmith Generator:

...

reasons you might want to customize CodeSmith Generator. You might want to reset file associations or change the Sample Directory location. You can configure all of CodeSmith Generators settings through the Options dialog.

Opening the Options dialog.

You can

...

Image Removed

The Options dialog box allows you to change the following settings:

  • Font: Select the font to use in all editor windows.
  • Size: Select the font size to use in all editor windows.
  • Enable Unicode Support: Check this checkbox to enable the display of Unicode characters.
  • Show Line Numbers: Check this checkbox to display line numbers to the left of each line of code.
  • Convert Tabs to Spaces: Check this checkbox to convert each tab to spaces automatically.
  • Tab Size: Select the number of spaces to be used for each tab on screen.
  • Bracket Matching: Check this checkbox to enable the bracket highlighting feature.
  • Outlining: Check this checkbox to enable the outlining features.
  • Indentation Guides: Check this checkbox to display light vertical lines each time you indent code
  • Highlight Target Language: Check this checkbox to ????
  • Outline Target Language: Check this checkbox to ????
  • Line Modification Markers: Check this checkbox to enable line modification markers.
  • Auto Collapse Regions: Check this checkbox to ????
  • Enable Output Editing: Check this checkbox to allow editing the contents of the Output tab.
  • Highlight Current Line: Check this checkbox to show a highlight behind the line where the cursor is currently located.
  • Auto Save on Compile: Check this checkbox to save the template each time it is compiled.
  • Close Start Page on File Open: Check this checkbox to close the Start Page as soon as you open any file.
  • Show Start Page at Startup: Check this checkbox to show the Start Page when you launch CodeSmith Generator.
  • Code Behind Option: Select an option for the treatment of code-behind pages associated with templates.
  • Auto Copy Output to Clipboard: Check this checkbox to copy the contents of the Output tab to the Windows clipboard whenever you run a template.
  • Display Semantic Information: Check this checkbox to display semantic information about the current cursor location in the status bar.
  • Enable IntelliPrompt: Check this checkbox to turn on Statement Completion.
  • Enable IntelliPrompt Summaries (slow): Check this checkbox to have CodeSmith parse the XML comment summaries for methods and properties and display them in tooltips with statement completion.
  • Enable Compiled Source: Check this checkbox to always show the compiled source tab of a template document.
  • Check File Associations: Check this checkbox to have CodeSmith Generator ensure that it is the registered handler for its file types at startup.
  • Display Splash Screen On Startup: Check this checkbox to display the splash screen when you launch CodeSmith Generator.
  • Reset File Associations: Click this button to make CodeSmith Generator the registered handler for its file types.
  • Restore Defaults: Click this button to restore the default settings in the Options dialog box.
  • Reset Docking Layout: Click this button to restore all of the tool windows to their original position, docking, and autohide status.

...

open the Options dialog from the Generator menu. You can also open up the Options dialog by launching the csconfig.exe executable located in the CodeSmith Generator Program Files folder (C:\Program Files\CodeSmith\<VERSION>).

Configuring Settings

All of the configuration settings are grouped into sections and are displayed in nodes on the left hand side as shown in the image below.  

Image Added

In the above image, the Engine node is selected and allows you to configure various settings like the location of the Sample Directory (CodeSmithSampleDirectory). To close the Options dialog, press OK to apply the changes or Cancel to ignore the changes.

Info
You may need to restart CodeSmith Generator after changing property values for the changes to take effect.
Warning
Some properties values may be persisted in real time and will not be rolled back when Cancel is clicked.