CLion 2018.2 Help

Viewing Usages of a Symbol

Using the Show Usages function, you can bring up a list of the usages of a symbol across the whole project. So doing, the pop-up window with the list of usages of a symbol features a toolbar with the following buttons:

icons actions groupByTestProduction svgGroup by test/productionIf this button is pressed, the found usages are divided in two categories, Production and Test. This is useful, for example, if you want to exclude the usages found in test files from the overall results.
icons actions GroupByModule svgGroup by moduleIf this button is pressed, the found usages show under the corresponding module or library node. Use the icons objectBrowser flattenModules svgFlatten modules button view all modules on the same level.
icons actions GroupByPackage svgGroup by directoryIf this button is pressed, all the usages found are displayed under their respective directories.
groupByFileStructureGroup by file structureIf this toggle is on, the found usages are shown under the corresponding function nodes.
mergeUsagesMerge usages from the same lineMerge usages of the symbol from the same line.
icons actions showReadAccess svgShow read accessShow read access to the symbol.
icons actions showWriteAccess svgShow write accessShow write access to the symbol.
icons actions previewDetails svgPreview usagesTurns showing the Preview pane on or off.
icons objectBrowser sorted svgSort members alphabeticallyClick this button to have members sorted alphabetically. Otherwise, members are sorted in the order they are declared.

To view the usages of a symbol across the project

  1. Place the caret at the desired symbol in the editor.
  2. On the main menu, choose Edit | Find | Show Usages, or press Ctrl+Alt+F7.
  3. Examine and analyze the detected occurrences of a symbol:
    • Use the toolbar buttons to present search results in the desired way.
    • To jump from search results to a line of source code, click the desired entry.
    • To close the list, press Escape.
  4. If necessary, customize the search options in the search options dialog box. To invoke the dialog box, do one of the following:
    • In the Show Usages pop-up window, click icons general gearPlain svg.
    • Press Ctrl+Shift+Alt+F7.
Last modified: 18 September 2018

See Also