Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Outlining provides a way to hide detail in your code until you want it.

Outlining in CodeSmith is of two types: automatic and manual. By default, CodeSmith automatically creates outline blocks for every script block, property, enumeration, and object in your code. You can disable automatic outlining from the Outlining submenu of the Edit menu. You can also create manual outline blocks by inserting #region and #endregion (or in VB, #region and #end region) lines in your code.

To collapse an outline block, click the minus sign at the left margin of the block or place the cursor in the block and press Ctrl+M. To expand an outline block, click the plus sign at the left margin of the block or place the cursor in the block and press Ctrl+M.

In this code, CodeSmith has automatically created outline blocks for the script block and the function, and the developer has added a manual outline with a region:

Clicking the minus sign to the left of the script block collapses the entire outline, and shows the script block grayed out. If you hover the mouse over the collapsed outline, CodeSmith Studio will display a tooltip with the first few lines of the code contained within the collapsed block:

Expanding the script block and then collapsing the region displays the text after the #region keyword:

Expanding the region and collapsing the function displays the function name but not its argument list:

This feature is only available in the Professional Edition of CodeSmith.

  • No labels