Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IVsFindScope Interface

Defines a custom scope that can be chosen in the Find in Files, Look in combo box.

Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in microsoft.visualstudio.textmanager.interop.dll)

[InterfaceTypeAttribute(1)] 
[GuidAttribute("0FE9496A-129C-40EE-99D8-7705A6283518")] 
public interface IVsFindScope
/** @attribute InterfaceTypeAttribute(1) */ 
/** @attribute GuidAttribute("0FE9496A-129C-40EE-99D8-7705A6283518") */ 
public interface IVsFindScope
InterfaceTypeAttribute(1) 
GuidAttribute("0FE9496A-129C-40EE-99D8-7705A6283518") 
public interface IVsFindScope

Implemented by packages that want to extend the scopes available for Find in Files. Your custom scope must be registered with the environment using the shell's IVsRegisterFindScope service. A scope can be either a simple find-in-files query string or a filename enumerator. A query string is what the user can type in the 'Look in' combo:

  • It takes the form of a semicolon-delimited list of folders and filenames.

  • Individual items on the list may be quoted.

  • The 'Look in subfolders' check box applies to the query.

  • The filters selected in the 'File types' combo box apply to the query.

There is no mechanism to override the user's subfolders selection. If you need greater control over recursive file enumeration, you must provide a filename enumerator.

To execute a Find, the Find manager asks first for a query string, and if that fails, it asks for a string enumerator that is expected to return a sequence of filenames. A scope should implement GetQuery or EnumFilenames; never both. The user's 'File types' extension filters are applied to all types of scopes.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.