You can view content that matches existing snippets in your project, and you can quickly convert these occurrences to snippets. You can also double-click a row to open the topic in question, with the potential snippet content highlighted.
- Open a project.
Do one of the following, depending on the part of the user interface you are using:
Ribbon Select the View ribbon. In the Dynamic Reports section, select Suggestions>Snippet Suggestions.
- Analyzer Summary Window Pane Double-click the row that mentions snippet suggestions.
The Snippet Suggestions window pane opens.
- To see more of the information in the window pane, drag the divider bar to make the pane wider:
- Apply Read more… Displays a check box next to the suggestion. If you decide to replace the content with the suggested snippet, you need to make sure the check box is selected. If you do not want to replace the content with the snippet, but you do want to replace other content in the list, you can click the check box to remove the check mark.
- Suggestion Read more… Displays the suggestion that Analyzer is making to you (i.e., "Replace with Snippet").
- Snippet Path Read more… Displays the location in your project's Content Explorer where the snippet is found, as well as the name of the snippet (e.g., Resources/Snippets/NewSnippet.flsnp).
- File Read more… Displays the path and name of the file where the content in question is found.
- Folder Read more… Displays the folder where the file is found.
- Xml Text Read more… Displays the exact XML tag structure of the content in question.
If a certain number of items have been found, page navigation buttons in the local toolbar may be enabled. You can use these buttons to go to additional pages to display more items. You also have the option to view all items at once in one long list. This is called the View All option. You can toggle these views by clicking the View All/View as Pages button in the local toolbar. The button displays the opposite of whatever view is currently activated (e.g., If the View All option is currently active, the button shows View as Pages to indicate that if clicked, the button will switch the window pane to the View as Pages option).
Do one of the following, depending on whether you want to convert multiple suggestions to a snippet simultaneously, or if you want to convert only one snippet suggestion at a time.
to convert multiple suggestions simultaneously
- In the window pane, select all suggestions that you want to convert. If you want to select all rows click . You can hold the SHIFT key to select a range, or you can hold the CTRL key to select individual items.
- In the local toolbar, click the Apply button.
- In the message that opens, click OK. Another message lets you know how many files were changed.
Click OK. All of the selected suggestions are converted to
Note: If you want to undo the conversions, you can use the Backups window pane (View>Backups).
See Restoring Backup Files.
to convert one suggestion at a time
- In the
SnippetSuggestions window pane, select the row that you want to convert to a snippet.
- Select File>Send to Flare. The file opens in the application with the suggested content highlighted.
In Flare, insert the
snippet(e.g., select Insert>Snippet).
See the online Help in Flare for more information about inserting
Note: Keep in mind that in order for content to be found and included in the Snippet Suggestions window pane, it must match the tag of the existing snippet exactly. For example, let's say that your snippet is a paragraph within a div tag. If you simply type the same text as the snippet on a simple paragraph in a topic, that content will not be found by Analyzer as a snippet suggestion. However, if you were to place that paragraph within a div tag in the topic, then it would be found as a snippet suggestion.
Note: You can also include this information in reports that you create.