次の方法で共有


The Object Browser: Search

Keyboard:  CTRL + ALT + J
Menu:  View -> Object Browser
Command:  View.ObjectBrowser; View.ObjectBrowserGoToSearchCombo; View.ObjectBrowserClearSearch; View.ObjectBrowserSearch
Versions:  2008,2010
Published:  8/30/2010
Code:  vstipTool0081

 

When you use the Object Browser sometimes you just want to find something fast.  Search is a great way to find what you are looking for within the current browsing scope:

image_thumb

 

 

To use search just type the string you are looking for into the Search box and press enter or click the Search button:

image

image

 

 

Searches are an "includes" operation and are not case-specific.  For example, typing in the search term "ask" will highlight the substring in the results.  The search utility will filter the Objects Pane to only show those items that contain the search string:

image

 

 

You can repeat any previous search by clicking on the drop-down list in the Search area:

image

 

Interestingly, this list persists even after Visual Studio is closed because the values are stored in the Registry(HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<version>\Object_Browser):

image

 

 

You can clear any search (and remove the filter on the Objects Pane) by clicking the Clear Search button to the right of the Search box:

image

 

 

 

View.ObjectBrowserSearch Command

You can invoke the View.ObjectBrowserSearch command to quickly do a search using a command.  This is particularly useful if you have a search you do all the time as you can create an alias for the common search(es).  See vstipTool0068 (https://blogs.msdn.com/b/zainnab/archive/2010/08/09/understanding-commands-aliases-vstiptool0068.aspx) for more information on command aliases.

 

 

The command is relatively straightforward.  Just type in "View.ObjectBrowserSearch [search string]":

image

 

This will yield a result based on the current Object Browser settings:

image