{"id":713,"date":"2014-06-17T00:51:39","date_gmt":"2014-06-17T00:51:39","guid":{"rendered":"http:\/\/blog.wholetomato.com\/?p=713"},"modified":"2019-05-03T17:28:18","modified_gmt":"2019-05-03T21:28:18","slug":"filtering-results-of-find-references","status":"publish","type":"post","link":"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/","title":{"rendered":"Filtering results of Find References"},"content":{"rendered":"<p>We regularly hear from C\/C++ and C# users that Find References is their most-used feature of Visual Assist. Despite the existence of a similarly named feature in Visual Studio, the functionality and speed provided by our version appears to be a game changer. And Find References\u00c2\u00a0keeps getting better.<\/p>\n<p>Beginning with Visual Assist build 2036, you\u00c2\u00a0can filter the results of Find References, in original and cloned windows. Although filtering is available via\u00c2\u00a0the context menu, keyboard access is the way to go.<\/p>\n<p>I begin with a simple example that includes a reference to a quantity in a comment, its\u00c2\u00a0definition, one write\u00c2\u00a0access, and one read\u00c2\u00a0access.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"714\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsexample\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?fit=594%2C239&amp;ssl=1\" data-orig-size=\"594,239\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsExample\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?fit=300%2C121&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?fit=594%2C239&amp;ssl=1\" class=\"alignnone size-full wp-image-714\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?resize=594%2C239&#038;ssl=1\" alt=\"findRefsExample\" width=\"594\" height=\"239\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?w=594&amp;ssl=1 594w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?resize=300%2C121&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsexample.png?resize=360%2C145&amp;ssl=1 360w\" sizes=\"(max-width: 594px) 100vw, 594px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Find References (Shift+Alt+F) on quantity produces a results window with four entries, one of each type.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"721\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsresultsall\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?fit=567%2C141&amp;ssl=1\" data-orig-size=\"567,141\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsResultsAll\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?fit=567%2C141&amp;ssl=1\" class=\"alignnone size-full wp-image-721\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?resize=567%2C141&#038;ssl=1\" alt=\"findRefsResultsAll\" width=\"567\" height=\"141\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?w=567&amp;ssl=1 567w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsall2.png?resize=360%2C90&amp;ssl=1 360w\" sizes=\"(max-width: 567px) 100vw, 567px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Although Find References has always differentiated read versus write references\u00e2\u20ac\u201dblue and pink in my example\u00e2\u20ac\u201dyou can now use shortcuts R and W to filter by\u00c2\u00a0type. When focus is in the results, press W to remove the write\u00c2\u00a0reference(s).<\/p>\n<p><img decoding=\"async\" data-attachment-id=\"718\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsresultsw\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?fit=567%2C141&amp;ssl=1\" data-orig-size=\"567,141\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsResultsW\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?fit=567%2C141&amp;ssl=1\" class=\"alignnone size-full wp-image-718\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?resize=567%2C141&#038;ssl=1\" alt=\"findRefsResultsW\" width=\"567\" height=\"141\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?w=567&amp;ssl=1 567w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsw.png?resize=360%2C90&amp;ssl=1 360w\" sizes=\"(max-width: 567px) 100vw, 567px\" data-recalc-dims=\"1\" \/><\/p>\n<p>Press W again to make\u00c2\u00a0the write\u00c2\u00a0reference reappear, then\u00c2\u00a0R to remove the read\u00c2\u00a0reference(s).<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"717\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsresultsr\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?fit=567%2C141&amp;ssl=1\" data-orig-size=\"567,141\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsResultsR\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?fit=567%2C141&amp;ssl=1\" class=\"alignnone size-full wp-image-717\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?resize=567%2C141&#038;ssl=1\" alt=\"findRefsResultsR\" width=\"567\" height=\"141\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?w=567&amp;ssl=1 567w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsr.png?resize=360%2C90&amp;ssl=1 360w\" sizes=\"(max-width: 567px) 100vw, 567px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Initializations aren\u00e2\u20ac\u2122t considered write references. Instead, they are included in\u00c2\u00a0definition references, which are filtered with the D shortcut. (In C\/C++, declarations are also filtered with D.)<\/p>\n<p>&#8220;References&#8221; in coMments and strings are filtered using M, and if my example had any, unknown\/Guess hits would be\u00c2\u00a0filtered with G.\u00c2\u00a0Hence, pressing RDM immediately after my initial find would leave\u00c2\u00a0me\u00c2\u00a0with only the write reference.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"719\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsresultswonly\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?fit=567%2C141&amp;ssl=1\" data-orig-size=\"567,141\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsResultsWOnly\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?fit=567%2C141&amp;ssl=1\" class=\"alignnone size-full wp-image-719\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?resize=567%2C141&#038;ssl=1\" alt=\"findRefsResultsWOnly\" width=\"567\" height=\"141\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?w=567&amp;ssl=1 567w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultswonly.png?resize=360%2C90&amp;ssl=1 360w\" sizes=\"(max-width: 567px) 100vw, 567px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Filter states aren\u00e2\u20ac\u2122t sticky. Each Find References begins with all results, and each of the shortcuts initially removes references.<\/p>\n<p>Additionally, filter states are specific to the window. You can show read references in one window and write references in a cloned window\u00e2\u20ac\u201dto one or different symbols. If you can\u00e2\u20ac\u2122t remember the state of a filter in a window, toggle it and look for a change in\u00c2\u00a0the vertical scroll bar.<\/p>\n<p>Shortcuts for Highlight All (H) and Search All Projects (P) work similarly. H toggles the highlighting of references in source windows; P refreshes search results to include references\u00c2\u00a0from all projects, or restrict them to\u00c2\u00a0the current project. (Because quantity is a local variable in my example, my searches were\u00c2\u00a0always restricted to the current file.) .<\/p>\n<p>Open the context menu of Find References if you forget the\u00c2\u00a0shortcuts. Only those that apply to your results are visible.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsmenu1.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"730\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/filtering-results-of-find-references\/findrefsresultsmenu\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsmenu1.png?fit=281%2C90&amp;ssl=1\" data-orig-size=\"281,90\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"findRefsResultsMenu\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsmenu1.png?fit=281%2C90&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsmenu1.png?fit=281%2C90&amp;ssl=1\" class=\"alignnone size-full wp-image-730\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/06\/findrefsresultsmenu1.png?resize=281%2C90&#038;ssl=1\" alt=\"findRefsResultsMenu\" width=\"281\" height=\"90\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Find References in Visual Assist is powerful and complex, and you need time and revisits\u00c2\u00a0to take full advantage of the command. Try the filtering described in this post, check out\u00c2\u00a0a previous post about <a title=\"Using Find References to Manage a Task\" href=\"https:\/\/stage.wholetomato.com\/blog\/2014\/03\/18\/using-find-refs-to-manage-a-task\/\">using Find References to manage a task<\/a>\u00c2\u00a0, then\u00c2\u00a0hit <a href=\"http:\/\/docs.wholetomato.com\/default.asp?W189\">the documentation<\/a> when you are ready for more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We regularly hear from C\/C++ and C# users that Find References is their most-used feature of Visual Assist. Despite the existence of a similarly named feature in Visual Studio, the functionality and speed provided by&#8230;<\/p>\n","protected":false},"author":28485711,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[672],"tags":[],"class_list":["post-713","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfhqii-bv","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/users\/28485711"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/comments?post=713"}],"version-history":[{"count":10,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/713\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/713\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/categories?post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/tags?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}