Work with code snippets in iLogic

System snippets

Define favorite snippets

  1. Click Edit favorite snippets at the top of the System tab.
  2. Select the snippets to be marked as favorites from the tree. Select a category to include all the snippets in the category, or expand a category and select individual snippets.
  3. Click OK when finished.

Display favorite snippets

To display only your favorite snippets, click the favorites toggle at the top of the System tab.

To display all snippets, click the favorites toggle again.

Copy system snippets to custom snippets

  1. Right-click on a snippet in the System tab.
  2. Select Copy to Custom from the context menu.

    A copy of the snippet is placed on the Custom tab, in the same category as it appears on the System tab. If the category does not exist, it is created.

Custom snippets

Create custom snippet

  1. Highlight the snippet text in the editing window, then right-click and select Capture Snippet.

    The Edit Snippet dialog box displays, with a copy of the snippet text in the Code text box.

  2. Enter the Title of the snippet, to be displayed in the snippets list.
  3. Select the Category in which the snippet is listed, or enter the name of a new category.
  4. Optionally, enter a text string to display as a tooltip when you hover the mouse pointer over the snippet in the list. Click Use Code as Tooltip to place a copy of the snippet text into the tooltip text box, and then edit the text as necessary.
  5. Edit the snippet in the Code text box as necessary. For complicated or long snippets, click the right arrow above the vertical scroll bar on the right to enable automatic outlining.
  6. Click Save or press Ctrl-S to save your snippet.

Snippets are also saved when you click OK in the Edit Rule dialog box. The first time you save custom snippets, you are prompted to choose the save location.

Manage custom snippet categories

Once you have created custom snippets, arrange them in different categories.

  • To create a category, right-click and select Insert Category from the context-menu.
  • To place a snippet into a category, drag it into its proper location within the tree.
  • To rename a code snippet category, select the snippet or category, then right-click and select Rename from the context menu.
  • Use Save As on the toolbar to create different collections of code snippets for specific projects.

Edit custom snippet

  1. Right-click on a snippet, and select Edit.
  2. Make the necessary changes in the Edit Snippets dialog box.
  3. Click OK when finished.

Replace custom snippets from external file

  1. Click at the top of the System tab.
  2. Select the file to replace the snippets in the Custom tab, and click Open.

Merge custom snippets from external file

  1. Click at the top of the System tab.
  2. Select the file to merge with the snippets in the Custom tab, and click Open.

Delete custom snippet

To delete a custom snippet, right-click on the snippet, and select Delete.

Create custom snippet collections for specific projects

  1. Click at the top of the System tab.
  2. Specify a filename and location, and click Save to save a copy of all the Custom snippets in the list as an external .xml file.
  3. If necessary, open the saved file using an XML editor and remove or edit the saved snippets.

Move or hide snippets area

Use the Pin symbol at the top of the Snippets area to customize its behavior.